Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2023-05-31 15:30 GMT
Find Nodes?
    Voting Booth?

    No recent polls found