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 $_);}'
In reply to Re: Read a list of files into an array
by citromatik
in thread Read a list of files into an array
by monkeybus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |