Sent: Monday, May 25, 2009 4:30 AM
To: beginners@perl.org
Subject: Re: readdir() question
On Mon May 25 2009 @ 4:34, sanket vaidya wrote:
> Hi all,
>
>
>
> Kindly look at the code below:
>
>
>
> use warnings;
>
> use strict;
>
> opendir(DIR, "D:\
On Mon May 25 2009 @ 4:34, sanket vaidya wrote:
> Hi all,
>
>
>
> Kindly look at the code below:
>
>
>
> use warnings;
>
> use strict;
>
> opendir(DIR, "D:\\test") || die "can't opendir: $!";
>
> my @dots = readdir(DIR);
>
> print map{"$_.\n"}...@dots;
>
>
>
> ..
>
> ...
>
> Tes
Hi all,
Kindly look at the code below:
use warnings;
use strict;
opendir(DIR, "D:\\test") || die "can't opendir: $!";
my @dots = readdir(DIR);
print map{"$_.\n"}...@dots;
..
...
Test1
Test2
Test3
Where Test1, Test2, Test3 are files within test directory.
Apart from that
On 9/30/05, Gergely Buday <[EMAIL PROTECTED]> wrote:
> Hi,
>
> this is a working code snippet:
>
> opendir (DIR, $dir) || die "Open failed: $!\n";
>
> $\ = "\n";
> while ($_ = readdir(DIR)) { print; };
>
> But when I try to use
>
> while (readdir(DIR)) ...
>
> my script writes only empty lines. It
Hi,
Gergely Buday <[EMAIL PROTECTED]> wrote:
> this is a working code snippet:
>
> opendir (DIR, $dir) || die "Open failed: $!\n";
>
> $\ = "\n";
> while ($_ = readdir(DIR)) { print; };
>
> But when I try to use
>
> while (readdir(DIR)) ...
>
> my script writes only empty lines. It seems that
Hi,
this is a working code snippet:
opendir (DIR, $dir) || die "Open failed: $!\n";
$\ = "\n";
while ($_ = readdir(DIR)) { print; };
But when I try to use
while (readdir(DIR)) ...
my script writes only empty lines. It seems that the proper number of
empty lines are written. Does the prepended