in reply to Awk usage in perl
And the results are:#!/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
More on split:C:\Code>perl cols_print.pl 1111 2222 3333 4444
|
|---|