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
In reply to Re: upto match please, my one-lina!!
by NetWallah
in thread upto match please, my one-lina!!
by Firefly258
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |