Help for this page

Select Code to Download


  1. or download this
    for my $line (@lines_from_data_file) {
        my($idx,$fname,$sname,$loc,$time) = $line =~
            /^(\d+),("[^"]+"),("[^"]+"),("[^"]+"),(.*)$/;
    }
    
  2. or download this
    perl -i.bak -ne "s/([\d\x22]),/$1.'|'/eg;print" datafile
    
    # for some reason I can't use single quotes for a
    # perl -e on Win32 so I have to use \x22 for "
    
  3. or download this
    @data = split /([\d"]+),/;