neversaint has asked for the wisdom of the Perl Monks concerning the following question:
The following is the typicall AWK ways to access field, by printing lines where the value of second column is 0 (zero).foo 1.02 bar 0 qux 2.33 tuq 0
What's Perl one-liner way to do it?$ awk '$2==0; {print}' mydat.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing Tab Delimited Field in Perl One-Liner
by jwkrahn (Abbot) on Jun 01, 2009 at 01:32 UTC | |
by aufflick (Deacon) on Jun 01, 2009 at 01:42 UTC | |
by Marshall (Canon) on Jun 01, 2009 at 19:39 UTC | |
|
Re: Accessing Tab Delimited Field in Perl One-Liner
by aufflick (Deacon) on Jun 01, 2009 at 01:32 UTC | |
|
Re: Accessing Tab Delimited Field in Perl One-Liner
by citromatik (Curate) on Jun 01, 2009 at 06:57 UTC |