Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Sequentially numbering output files rather than overwriting an existing file

by marinersk (Priest)
on Jan 08, 2014 at 18:03 UTC ( #1069844=note: print w/replies, xml ) Need Help??


in reply to Re: Sequentially numbering output files rather than overwriting an existing file
in thread Sequentially numbering output files rather than overwriting an existing file

For more visually pleasing output:
if (-f "$name.txt") { $n=1; my $fn = sprintf "%s-%05d\.txt", $name, $n; $n++ while -f $fn; }
  • Comment on Re^2: Sequentially numbering output files rather than overwriting an existing file
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2021-12-07 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (34 votes). Check out past polls.

    Notices?