Re: Readdir to array

2002-12-13 Thread Mystik Gotan
quot;$_\n"; } } -- Bob Erinkveld (Webmaster Insane Hosts) www.insane-hosts.net MSN: [EMAIL PROTECTED] From: "Paul Kraus" <[EMAIL PROTECTED]> To: "Perl" <[EMAIL PROTECTED]> Subject: Readdir to array Date: Fri, 13 Dec 2002 09:56:19 -0500 fo

RE: Readdir to array

2002-12-13 Thread Paul Kraus
doht! Thanks! > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 13, 2002 10:13 AM > To: Paul Kraus; Perl > Subject: RE: Readdir to array > > > You are foreah'ing in your foreach. So it is printing the >

RE: Readdir to array

2002-12-13 Thread wiggins
You are foreah'ing in your foreach. So it is printing the contents of the array foreach of the files in the directory... http://danconia.org On Fri, 13 Dec 2002 09:56:19 -0500, "Paul Kraus" <[EMAIL PROTECTED]> wrote: > for some reason the outpu

Readdir to array

2002-12-13 Thread Paul Kraus
for some reason the output is different for this script. If I print $_ I get the correct list. If I print the Array I get roughly the same list 4 times? #!/usr/bin/perl -w $dir = "/backup"; opendir BACKUPDIR, $dir or die "Cannot open $dir!"; foreach (readdir BACKUPDIR){ unless ($_ eq "." or $_