Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Append to file or create file depending on input filename.

by pKai (Priest)
on Nov 20, 2009 at 13:48 UTC ( #808435=note: print w/ replies, xml ) Need Help??


in reply to Re: Append to file or create file depending on input filename.
in thread Append to file or create file depending on input filename.

I was wondering the same.

To (ab)use 2-arg open in the way the OP describes, he has to do some trickery like:

C:\>perl script.pl ">outfile" C:\>rem Or C:\>perl script.pl ^>outfile

which will effectively hide the output redirect from the cmd and result in an $ARGV[0] containing >outfile.


Comment on Re^2: Append to file or create file depending on input filename.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2015-07-04 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls