in reply to printing line number
Look in perlvar for $., the current input line number. Presuming it's on STDIN and the columns are separated by white space:
my @columns = split /\s+/; print $., "\n" if $column[0] == $column[1];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: printing line number
by Anonymous Monk on Sep 16, 2004 at 15:19 UTC |