Re: Need a list of files in a dir.

2005-09-27 Thread bright true
Hello , in your examples you're opening "files" not dir's , to open a directory use this instead opendir(DIR,$dirname) or die $!; my @content = readdir(DIR); closedir(DIR); then to read files inside it , for (@content){ print ; } that's it , if you need to remove ("." and "..") which means the

Re: Need a list of files in a dir.

2005-09-26 Thread Tom Allison
Wiggins d'Anconia wrote: Please bottom post... Daniel Kurtz wrote: Ooh ooh ooh! One I know! open(COMMAND, "dir |"); @files = ; Well, there's two methods that I use where I can and they are probably more portable. glob works well most of the time: @files = ; But it has problems with la

Re: Need a list of files in a dir.

2005-08-27 Thread Randal L. Schwartz
> "Ryan" == Ryan Frantz <[EMAIL PROTECTED]> writes: Ryan> I don't think that Randal was arguing that there are more UNIX vs. Ryan> Windows systems as much as he was stating that given a number of UNIX Ryan> systems vs. Windows systems, more UNIX systems have Perl Ryan> implementations. I *was

RE: Need a list of files in a dir.

2005-08-26 Thread Daniel Kurtz
From: Bob Showalter [mailto:[EMAIL PROTECTED] >>> OK, you weren't kidding. Since you're new to Perl, you get a free pass :~) <<< I appreciate the indulgence . >>> Seriously, though, not all of us run Perl on Windows. Your approach is Windows-specific. <<< True, I hadn't thought of that. I'm p

Re: Need a list of files in a dir.

2005-08-26 Thread Bob Showalter
Daniel Kurtz wrote: Bob Showalter wrote: Please tell me you're kidding. Why? It works. The question asked how you can do it, not the BEST way to do it. And after a week of Perling, this was the one way I knew. Now I know two ways. OK, you weren't kidding. Since you're new to Perl, you get

RE: Need a list of files in a dir.

2005-08-26 Thread Ryan Frantz
> -Original Message- > From: Daniel Kurtz [mailto:[EMAIL PROTECTED] > Sent: Friday, August 26, 2005 3:49 PM > To: beginners@perl.org > Subject: RE: Need a list of files in a dir. > > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > >>> Daniel>

RE: Need a list of files in a dir.

2005-08-26 Thread Daniel Kurtz
From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] >>> Daniel> Why? It works. Not on Unix it doesn't. And there are far more Unix installations of Perl than Windows installations of Perl. <<< Good point. Although... while I'm certain that a higher PERCENTAGE of Unix systems have Perl than Wind

Re: Need a list of files in a dir.

2005-08-26 Thread Randal L. Schwartz
> "Daniel" == Daniel Kurtz <[EMAIL PROTECTED]> writes: Daniel> Why? It works. Not on Unix it doesn't. And there are far more Unix installations of Perl than Windows installations of Perl. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.

RE: Need a list of files in a dir.

2005-08-26 Thread Daniel Kurtz
Bob Showalter wrote: > Please tell me you're kidding. Why? It works. The question asked how you can do it, not the BEST way to do it. And after a week of Perling, this was the one way I knew. Now I know two ways. daniel -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

RE: Need a list of files in a dir.

2005-08-26 Thread Chance Ervin
-Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 9:40 AM To: Daniel Kurtz; beginners@perl.org Subject: Re: Need a list of files in a dir. Daniel Kurtz wrote: > Ooh ooh ooh! One I know! > > open(COMMAND, "dir |"); > @

Re: Need a list of files in a dir.

2005-08-26 Thread Bob Showalter
Daniel Kurtz wrote: Ooh ooh ooh! One I know! open(COMMAND, "dir |"); @files = ; Please tell me you're kidding. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Need a list of files in a dir.

2005-08-26 Thread Luinrandir
from the holes in the ground, that lead to the caverns of the bottomposters in the land of Scorch... who lived unhappily ever after..) - Original Message - From: "Daniel Kurtz" <[EMAIL PROTECTED]> To: Sent: Friday, August 26, 2005 8:12 AM Subject: RE: Need a list of files

RE: Need a list of files in a dir.

2005-08-26 Thread Ryan Frantz
> -Original Message- > From: Luinrandir [mailto:[EMAIL PROTECTED] > Sent: Friday, August 26, 2005 2:53 PM > To: Daniel Kurtz > Cc: beginners@perl.org > Subject: Re: Need a list of files in a dir. > > Thanks Daniel.. and keep on TOP POSTING! > Not to start a

RE: Need a list of files in a dir.

2005-08-26 Thread Ryan Frantz
> -Original Message- > From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED] > Sent: Friday, August 26, 2005 11:27 AM > To: Daniel Kurtz > Cc: beginners@perl.org > Subject: Re: Need a list of files in a dir. > > Please bottom post... > > Daniel Kurtz

Re: Need a list of files in a dir.

2005-08-26 Thread Wiggins d'Anconia
http://danconia.org > Daniel > > -Original Message- > From: Luinrandir [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 25, 2005 21:33 > To: beginners@perl.org > Subject: Need a list of files in a dir. > > > How do I get the list of files in a DIR and put

RE: Need a list of files in a dir.

2005-08-26 Thread Daniel Kurtz
Ooh ooh ooh! One I know! open(COMMAND, "dir |"); @files = ; Daniel -Original Message- From: Luinrandir [mailto:[EMAIL PROTECTED] Sent: Thursday, August 25, 2005 21:33 To: beginners@perl.org Subject: Need a list of files in a dir. How do I get the list of files in a DIR and

Re: Need a list of files in a dir.

2005-08-25 Thread Ezra Taylor
Your a funny dude Chris. On 8/25/05, Chris Devers <[EMAIL PROTECTED]> wrote: > On Thu, 25 Aug 2005, Luinrandir wrote: > > > How do I get the list of files in a DIR and put in an array? > > > > I'm drawing a blank on my search for this. > > Try writing a program instead, that seems to work better

Re: Need a list of files in a dir.

2005-08-25 Thread Luinrandir
Thanks.. I'll look it over Lou - Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: "Perl Beginners" Sent: Thursday, August 25, 2005 6:26 PM Subject: Re: Need a list of files in a dir. > Luinrandir wrote: > > How do I get the li

Re: Need a list of files in a dir.

2005-08-25 Thread John W. Krahn
Luinrandir wrote: > How do I get the list of files in a DIR and put in an array? perldoc -f opendir perldoc -f readdir perldoc -f glob John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Need a list of files in a dir.

2005-08-25 Thread Chris Devers
On Thu, 25 Aug 2005, Luinrandir wrote: > How do I get the list of files in a DIR and put in an array? > > I'm drawing a blank on my search for this. Try writing a program instead, that seems to work better than drawing. Some people use globs in their programs for this. What did you try? -

Need a list of files in a dir.

2005-08-25 Thread Luinrandir
How do I get the list of files in a DIR and put in an array? I'm drawing a blank on my search for this. thanks Lou -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]