?
Solved

open statement help needed

Posted on 2007-11-20
4
Medium Priority
?
186 Views
Last Modified: 2010-04-21
In the following code, what does open TEMP do?  Is TEMP a file.  ddump dumps the debugging information.  Is it dumped in the TEMP file.  If TEMP is created, in which directory can I find it?

open TEMP, "$ddump -D $elf|" or die("\nError dumping file!\n");
0
Comment
Question by:naseeam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 39

Expert Comment

by:Adam314
ID: 20320896
In this case, open will run the command "$ddump -D $elf", and create a filehandle named TEMP as a pipe from that program.
When your program reads from TEMP, it will be reading the output from the $ddump program.
0
 
LVL 1

Author Comment

by:naseeam
ID: 20320978
I thought there is a file coupled with every file handle.  Which file goes with TEMP filehandle.  
It looks like the output of ddump program are stored in TEMP filehandle, instead of a file.
Am I understanding this correctly?

Thanks.
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 2000 total points
ID: 20321086
From the documentation for open:
    http://perldoc.perl.org/functions/open.html
"if the filename ends with a '|' , the filename is interpreted as a command which pipes output to us"

So, in this case there is no actual file.
The output from ddump is stored in the TEMP filehandle - you are correct on this part.
0
 
LVL 1

Author Closing Comment

by:naseeam
ID: 31410143
Quick Response.  Almost Immediate.  
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question