Help for this page

Select Code to Download


  1. or download this
    my $string = '(<some word> | No Qualifier | <some word> | <some word>'
    +;
    my $start = index( $string, '|' );          # find first pipe position
    my $end = index( $string, '|', $start+1 );  # find next pipe position
    
    my $qualifier = substr( $string, $start, $end-$start+1 ); # extract
    
  2. or download this
    use IO::File;
    use Text::CSV_XS;
    ...
        my $row = $csv->getline($io);  # read and parse line into an ARRAY
    +ref
        print "Second field says: ", $row->[1], "\n";
    }