Code Comments
Programming Forum and web based access to our favorite programming groups.just tell me the name of module, my english too poor to can't understand all module help files, forgive me.... -- Your fault as a Government is My failure as a citizen
Post Follow-up to this message"Alont" <end@dream.life> wrote in message news:4151a17b.15044562@130.133.1.4... > Subject: what module could easiely load all files to a @array from a specified folder(and subfolders)? > just tell me the name of module, > my english too poor to can't understand all module help files, forgive > me.... File::Find Paul Lalli
Post Follow-up to this message*** post for FREE via your newsreader at post.newsfeed.com ***
Alont> just tell me the name of module,
Alont> my english too poor to can't understand all module help files, forgiv
e
Alont> me....
use File::Finder; # in CPAN
my @array = File::Finder->type('f')->in($specified_folder);
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training
!
-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----
Post Follow-up to this messageAlont <end@dream.life> wrote in news:4151a17b.15044562@130.133.1.4: > just tell me the name of module, Don't order people around. > my english too poor to can't understand all module help files, forgive > me.... Oh, you put your entire question in the subject line. Don't do that. (This has nothing to do with your language abilities, it is just common sense). Your question was: > what module could easiely load all files to a @array > from a specified folder(and subfolders)? Well, there is actually a nontrivial choice between using a hash versus an array to store the list of files, so think about that. It depends on what you want to do with those files ones you have the names. Take a look at File::Find or File::Finder. -- A. Sinan Unur 1usa@llenroc.ude.invalid (remove '.invalid' and reverse each component for email address)
Post Follow-up to this messagemerlyn@stonehenge.com (Randal L. Schwartz)Wrote at 22 Sep 2004
09:23:55 -0700:
>use File::Finder; # in CPAN
>my @array = File::Finder->type('f')->in($specified_folder);
>
So simple! but if I only want *.txt file list, should "type('f')"
change to "type('*.txt')" or "type('txt')"?
--
Your fault as a Government is My failure as a citizen
Post Follow-up to this message"A. Sinan Unur" <1usa@llenroc.ude.invalid>Wrote at 22 Sep 2004 18:15:36 GMT: >Don't order people around. sorry soory, it's not what I want describe, it's my failure in english language, my original meaning is that I've read a lot of CPAN module, but can't find what I want, in fact I don't want bother people here, I know everybody have no time to answer stupid question with me, so I carefully say "just tell me the name"------however, I know what "just" mean since you tell me :-) -- Your fault as a Government is My failure as a citizen
Post Follow-up to this message"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote: > Alont <end@dream.life> wrote in > news:4151a17b.15044562@130.133.1.4: > > > Don't order people around. Which is what you just did. And you did it *knowing* you are doing it, which definitely can't be said for Alont, who, which he made quite clear, is not a native speaker of English. Didn't that give you a clue? -- Cheers, Bernard
Post Follow-up to this messageOn Thu, 23 Sep 2004 00:02:27 +0800, Alont wrote: > just tell me the name of module, File::Find::Rule is one of my favorites; my @files = File::Find::Rule->file()->name( '*.txt' )->in( $directory ); -- Tore Aursand <tore@aursand.no> "What we anticipate seldom occurs. What we least expected generally happens." (Benjamin Disraeli)
Post Follow-up to this messageAlont <end@dream.life> wrote in message news:<4151a17b.15044562@130.133.1.4>... > just tell me the name of module, > my english too poor to can't understand all module help files, forgive > me.... maybe you mean this: perl -e '@array=<>; #your code' directory/* this will load all files (content of files, not filename) in directory to @a rray Gerhard
Post Follow-up to this messageAlont <end@dream.life> wrote in message news:<4151a17b.15044562@130.133.1.4>... > just tell me the name of module, > my english too poor to can't understand all module help files, forgive > me.... Here's a better question... If your english is too poor to understand a plain english help file how is your english going to be sufficient enough to understand a plain english reply? :)
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.