in reply to Read a list of files into an array
you can use the glob function:
perl -e 'my @arr=glob ("*.*");print "$_\n" for (@arr)'
HTH
citromatik
Update: Or even more compressed
perl -e 'print "$_\n" for (glob ("*.*"))'Update2: And lets add the test fot text files:
perl -e 'for (glob ("*.*")){print "$_\n" if (-T $_);}'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read a list of files into an array
by halley (Prior) on Jun 22, 2007 at 16:22 UTC | |
by shmem (Chancellor) on Jun 26, 2007 at 10:37 UTC | |
by Argel (Prior) on Jun 22, 2007 at 21:33 UTC | |
by halley (Prior) on Jun 25, 2007 at 12:49 UTC | |
| |
by Argel (Prior) on Jun 22, 2007 at 23:08 UTC |