Further to AnonyMonk's advice above, also consult perlrun about the effects of the -i, -n and -l flags; they all act to add code around the code you supply on the command line.
Update: E.g.,
See O and B::Deparse.c:\@Work\Perl\monks>perl -MO=Deparse,-p -i -n -le "/apple/||print " BEGIN { $^I = ""; } BEGIN { $/ = "\n"; $\ = "\n"; } LINE: while (defined(($_ = <ARGV>))) { chomp($_); (/apple/ or print($_)); } -e syntax OK
Give a man a fish: <%-{-{-{-<
In reply to Re: Delete a line from files
by AnomalousMonk
in thread Delete a line from files
by alokranjan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |