So maybe you want to have a look at -l -a -n -e -p ...(and so on) options in perlrun ?
e.g.
causes Perl to assume the following loop around your program, which makes it iterate over filename arguments somewhat like sed -n or awk:
Note that the lines are not printed by default. See -p to have lines printed. If a file named by an argument cannot be opened for some reason, Perl warns you about it and moves on to the next file.
-n
As replacement for
grep PATTERN *
try
perl -ne'/PATTERN/&&print' *
for a start. :)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re: perl grep clone (CLI & perlrun)
by LanX
in thread perl grep clone
by pythondude
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |