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
    }