So try it like this (similar to what was suggested in a later reply below):
while (<INFILE>) { my @Elements = split(/;/,$_); if ($Elements[1] =~ /\S/){ # if second arg contains non-whitespac +e print OUTFILE; # ("$_" is implied here) } }
In reply to Re^3: select elements in a list
by graff
in thread select elements in a list
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |