Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Problem stripping directory listing

by integral (Hermit)
on Feb 15, 2003 at 08:43 UTC ( #235518=note: print w/ replies, xml ) Need Help??


in reply to Problem stripping directory listing

Couple of points from me: You can replace the use of `find` with the File::Find module which uses perl, although this would require restructuring your code, because of the callback style interface of that module.

The second point is that your use of split could be optimised. This is one situation where a regex with capturing parenthesis could be used instead (see perlop for more about the return value of m// in list context).

my ($reqd) = m{users/(.+?)/};

--
integral, resident of freenode's #perl


Comment on Re: Problem stripping directory listing
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2015-03-30 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (651 votes), past polls