Solved

open statement help needed

Posted on 2007-11-20
4
178 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 500 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Sending email via Perl on Windows 3 194
Perl script to parse xml file 2 132
perl split by | 2 109
Perl modules on linux ec2 3 123
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…

756 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