foreach my $filename (<*.seq>) { print "$filename\n"; }
Update: (as per Abigail-II's comments below)
while (my $filename = <*.seq>) { print "$filename\n"; }
Method 2:
use IO::Dir; my $dh = IO::Dir->new('.'); while (defined(my $filename = $dh->read)) { next unless $filename =~ /\.seq$/; print "$filename\n"; }
And, there's at least 3-4 others people could come up with, depending on your exact needs.
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to Re: *.txt
by dragonchild
in thread *.txt
by usless_blonde
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |