Sun751 has asked for the wisdom of the Perl Monks concerning the following question:
After running above code I am getting following values in @a (array), 0 '.' 1 '..' 2 'p17' but I am suppose to get just p17, Have I done any thing wrong, can any one suggest me how can I get just another directory(p17)name???my @a; my $dir = "/and/evel/aap/list/60"; opendir(PATCH, $dir) || die "Unable to open $dir "; @a = readdir(PATCH); print "@a\n"; closedir(PATCH); exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading Directory
by moritz (Cardinal) on Jul 14, 2009 at 08:03 UTC | |
by MidLifeXis (Monsignor) on Jul 14, 2009 at 13:33 UTC | |
|
Re: Reading Directory
by ELISHEVA (Prior) on Jul 14, 2009 at 08:44 UTC | |
|
Re: Reading Directory
by Anonymous Monk on Jul 14, 2009 at 08:00 UTC | |
|
Re: Reading Directory
by tokpela (Chaplain) on Jul 14, 2009 at 09:25 UTC | |
|
Re: Reading Directory
by ropey (Hermit) on Jul 14, 2009 at 11:10 UTC | |
by Sun751 (Beadle) on Jul 14, 2009 at 23:28 UTC | |
by toolic (Bishop) on Jul 14, 2009 at 23:45 UTC |