Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: open to pipe fails with exit on Windows

by romandas (Pilgrim)
on Oct 07, 2009 at 02:47 UTC ( #799641=note: print w/ replies, xml ) Need Help??


in reply to open to pipe fails with exit on Windows

I believe it is to be expected, because normally you pipe to a command or to an executable. After all, piping is essentially redirecting output going to a filehandle to some executable's STDIN. See perlopentut for more details

In this case, it's expecting 'foo.plx' to be an executable Perl script. Was the original file (sort3.plx) an existing Perl script?

If so, I suppose the workaround would be to check whether the command or script you want to pipe to actually exists first. Also, you want to get into the habit of using the three-argument version of open, considering that the two-argument version (used most often in educational texts) has some potential security issues when used with a variable filename.


Comment on Re: open to pipe fails with exit on Windows

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://799641]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2014-07-31 03:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls