Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^11: incrementing already existing file

by broomduster (Priest)
on Mar 03, 2011 at 13:50 UTC ( [id://891222]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while ( <MYFILE> ) {
        chomp;
    ...
        $a_vals[ $index ] = $value;
        $b_vals[ $index ] = $value;
    }
    
  2. or download this
    if ($label eq "A"){
    $fields[-2] = $a_vals[ $index ]
    ...
       }
       if ($label eq "B"){
    $fields[-2] = $b_vals[ $index ]
    
  3. or download this
    if ($label eq "A") {
        $fields[-2] = $a_vals[ $index ]
    ...
    else {
        print "OOPS!  bad label\n";  # complain if something is fishy
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found