in reply to *.txt
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: *.txt
by Abigail-II (Bishop) on Sep 29, 2003 at 16:17 UTC |