Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I wrote a simple script to display a list of files in a directory:-
The files in the directory are f1 f2 and g3. But I'm getting an output as:-opendir(DIR, $dirname); @FILES= readdir(DIR); foreach $FILE (@FILES){ print $FILE."\n"; } closedir DIR;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem in displaying files
by moritz (Cardinal) on Dec 08, 2012 at 16:23 UTC | |
by Anonymous Monk on Dec 08, 2012 at 16:45 UTC | |
|
Re: Problem in displaying files
by eyepopslikeamosquito (Archbishop) on Dec 08, 2012 at 22:28 UTC | |
|
Re: Problem in displaying files
by Vijay81 (Acolyte) on Dec 08, 2012 at 17:51 UTC |