
Is it possible to convert a UNIX shell command into PERL?
Dan Nguyen wrote in comp.lang.perl.misc:
Quote:
> I would like to convert one of the two lines below from UNIX shell into perl
> but I was not able to do it.
> Please HELP HELP HELP!
> find . -name "*.h" -follow -print | sed -e 's/^/\"/;s/$/\"/' | xargs
> wc -l | sed '$\!d' | nawk '{print $1}'
A good start is to look at the File::Find perl module, and at the
find2perl utility, that converts find(1) commands to perl code (that
uses File::Find).
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
But what about a bit of artistic license?
-- Monty Python, The Penultimate Supper