in reply to Awk usage in perl

In situations like this, the split function is your friend. Split can be used to separate on a variety of delimiters.

My code:

#!/usr/bin/perl use warnings; use strict; while(<DATA>) { my @cols = split " ", $_; print $cols[3],"\n"; } __DATA__ 1 222 ssss 1111 fgfg 2 333 ssse 2222 dshg 3 444 ssws 3333 sjsh 4 555 wwsw 4444 skss
And the results are:

C:\Code>perl cols_print.pl 1111 2222 3333 4444
More on split:

http://www.comp.leeds.ac.uk/Perl/split.html
http://www.perlmeme.org/howtos/perlfunc/split_function.html