in reply to Re: Accessing Tab Delimited Field in Perl One-Liner
in thread Accessing Tab Delimited Field in Perl One-Liner
A Perl variable evaluates to false if either: undefined, numeric zero or "" (empty string).perl -ne "(split)[1] || print" temp.txt #same thing... perl -ne "print if !((split)[1]);" temp.txt
Update: also of note: default split operates on whitespace which is (\s\t\f\r\n). Above would work fine with combination of spaces and tabs between tokens.
|
|---|