Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: shell to perl question

by b10m (Vicar)
on Aug 18, 2005 at 07:41 UTC ( #484692=note: print w/replies, xml ) Need Help??


in reply to shell to perl question

File::Find ?

You also might like the program find2perl that comes with that module.

--
b10m

All code is usually tested, but rarely trusted.

Replies are listed 'Best First'.
Re^2: shell to perl question
by inman (Curate) on Aug 18, 2005 at 07:51 UTC
    An example
    use File::Find; find (\&wanted, @ARGV); sub wanted { return unless /\.jpe?g$/i; print "Found $_\n"; }

      You probably want

      print "Found $File::Find::name\n";
      there, otherwise only the basename gets printed out.

      the lowliest monk

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://484692]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2023-02-04 22:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (31 votes). Check out past polls.

    Notices?