Help for this page

Select Code to Download


  1. or download this
    perl -ne 'if(/(\w+\.csv)/){close $fh if defined $fh;open $fh,">$1"} el
    +sif(/([0-9.-]+)/){print $fh "$1\n"}' file.txt
    
  2. or download this
    open FILE, "<file.txt";           # Open the file
    while( <FILE> ) {                 # read a line
    ...
    }
    close $fh;                        # close the files opened
    close FILE;