in reply to upto match please, my one-lina!!
Update: as japhy points out below, this is Win32 syntax. Use single-quotes for *nix.perl -ne "push @a,$_;m/foo/ and exit 1;shift @a if $#a>3;END{$?==1 and + print @a }" myfile.txt
"For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: upto match please, my one-lina!!
by Firefly258 (Beadle) on Jun 09, 2006 at 01:17 UTC | |
by japhy (Canon) on Jun 09, 2006 at 01:24 UTC |