Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: incrementing the file

by toolic (Bishop)
on Feb 21, 2012 at 20:10 UTC ( [id://955378]=note: print w/replies, xml ) Need Help??


in reply to incrementing the file

You could use a file test like -e in a while loop:
my $output_file = "output_$input_file"; my $i = 1; while (-e $output_file) { $output_file = "output_$input_file$i"; $i++; } $abc_cmd = "abc.exe -i $input_file -o $output_file ";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-25 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found