Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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....
--
Your fault as a Government is My failure as a citizen

Report this thread to moderator Post Follow-up to this message
Old Post
Alont
09-22-04 09:00 PM


Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Paul Lalli
09-22-04 09:00 PM


Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
*** 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! =-----


Report this thread to moderator Post Follow-up to this message
Old Post
Randal L. Schwartz
09-22-04 09:00 PM


Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Alont <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)


Report this thread to moderator Post Follow-up to this message
Old Post
A. Sinan Unur
09-22-04 09:00 PM


Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
merlyn@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

Report this thread to moderator Post Follow-up to this message
Old Post
Alont
09-23-04 08:56 AM


Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
"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

Report this thread to moderator Post Follow-up to this message
Old Post
Alont
09-23-04 08:56 AM


Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
"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

Report this thread to moderator Post Follow-up to this message
Old Post
Bernard El-Hagin
09-23-04 01:56 PM


Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
On 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)

Report this thread to moderator Post Follow-up to this message
Old Post
Tore Aursand
09-23-04 01:56 PM


Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Alont <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

Report this thread to moderator Post Follow-up to this message
Old Post
Gerhard M
09-23-04 01:56 PM


Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Alont <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? :)

Report this thread to moderator Post Follow-up to this message
Old Post
krakle
09-24-04 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

PERL Miscellaneous archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:14 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.