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