Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^9: incrementing already existing file

by broomduster (Priest)
on Mar 02, 2011 at 23:11 UTC ( #891127=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @fields = ( split /\s+/ );           # need to hold on to all field
    +s for later
    my( $index, $label ) = @fields[4, -1];  # this is an array slice
    
  2. or download this
    use 5.010;
    
    ...
        when ( 'B' ) { $fields[ -2 ] = $y; }
        default { say "OOPS!  bad label"; }
    }
    
  3. or download this
    say join "\t", @fields;    # separates fields with TAB
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (16)
As of 2014-10-23 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (125 votes), past polls