Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: How to create the varibles with the file names

by mrpeabody (Friar)
on Nov 16, 2005 at 16:26 UTC ( [id://509092]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to create the varibles with the file names
in thread How to create the varibles with the file names

Well, if you're going to use File::Find, you might as well use the saner syntax of File::Find::Rule.
#!/usr/bin/perl use warnings; use strict; use File::Find::Rule; my $dir = "C:/Windows"; my @files = File::Find::Rule ->file() ->name('*.txt') ->mindepth(1) ->maxdepth(1) ->in($dir); print "$_\n" for @files;
For a job this simple, though, I would probably use glob().

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-24 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found