Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: quickest way to find number of files in a directory?

by zoroaster (Initiate)
on Jul 01, 2012 at 22:10 UTC ( [id://979343]=note: print w/replies, xml ) Need Help??


in reply to Re: quickest way to find number of files in a directory?
in thread quickest way to find number of files in a directory?

Thanks a lot, that works great. Does anybody know if it's possible to include variables in the file handle? For example, if I want all the .pl files starting with 'blabla' is it possible to do something like this: my $prename = 'blabla'; my @files = <$prename*.pl> my $count = @files It works with just <*.pl> but I can't get the variable to work.

Replies are listed 'Best First'.
Re^3: quickest way to find number of files in a directory?
by Anonymous Monk on Jul 01, 2012 at 22:21 UTC
      Yes, it was mistake on my part - it works with variables, too. Sorry about that.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-03-28 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found