Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by kcott (Archbishop)
on Jan 08, 2014 at 15:34 UTC ( [id://1069822]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl -l
    
    ...
    my $next_file = 'pm_1069813_results' . ++$highest . '.txt';
    
    print "Next file: $next_file";
    
  2. or download this
    Next file: pm_1069813_results4.txt
    
  3. or download this
    $ ls -1 pm_1069813_results*.txt
    pm_1069813_results1.txt
    pm_1069813_results2.txt
    pm_1069813_results3.txt
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2024-04-18 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found