Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    my @columns = split /\|/, $line;
    
    print "@columns[-1,-4,4,3]\n"; # "zip state hireDate empName"
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    
    The "|" separated line is like this:
    123445678|45612 11|Steve Smith|11012015|16|1001 Main Street|GA|7|Atlan
    +ta|30553|x|y|z
    
  3. or download this
    @tokens = map{s/\s*$//; $_;}@tokens;  #delete trailing spaces