Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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
Node Status?
node history
Node Type: note [id://799641]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2017-03-29 17:31 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (352 votes). Check out past polls.