Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: find or grep?

by ZZamboni (Curate)
on Jun 21, 2001 at 17:41 UTC ( #90350=note: print w/replies, xml ) Need Help??

in reply to find or grep?

The find line that you have won't work, unless you enclose the find command in backticks (and are on Unix). See the documentation for the File::Find module to see the proper way of doing a find from Perl. It's a standard module, so you wouldn't have to install anything.


Replies are listed 'Best First'.
Re: Re: find or grep?
by nkpgmartin (Sexton) on Jun 21, 2001 at 18:34 UTC
    If I use:
    use File::Find; find(\&wanted, '$file'); sub wanted { $rlfile = `find2perl / -name $file -exec ls {} \;`; }
    I get the error: cant stat blah: no such file or directory. How can I get $rlfile to equal the full path name to blah (which is $file)?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2022-01-22 16:54 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (63 votes). Check out past polls.