Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: open to pipe fails with exit on Windows

by romandas (Pilgrim)
on Oct 07, 2009 at 02:47 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://799641]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found