Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Parse for a name after a keyword search in all the files, given directory as input

by Discipulus (Canon)
on Feb 17, 2017 at 09:01 UTC ( [id://1182193]=note: print w/replies, xml ) Need Help??


in reply to Parse for a name after a keyword search in all the files, given directory as input

Hello prash_sri and welcome to the monastery and to the wonderful world of Perl!

This of traversing directory structure is one of the first question asked here in the monastery: node id 847

Please read elder's wisdom: see Recursive Directory print where I point to the tachyon's solution.

Note that since that time you can now use local variable to open dirs like open my $dir instead of bareword DIRHANDLE syntax

opendir my $path or die "unable to open '$path' dir for read!"

See opendir readdir telldir seekdir rewinddir and closedir pages.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
  • Comment on Re: Parse for a name after a keyword search in all the files, given directory as input
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-24 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found