On Wednesday, April 3, 2002, at 01:09 , Allison Ogle wrote:
[..]
> However, if I didn't know the name of the datafile how would I open it? I
> tried $inputFile="(*).dat"; and $inputFile="*.dat"; but neither works.
> Does
> anyone have any ideas? Thanks,
>
> Allison
### #!/usr/bin/perl
###
### use strict;
###
### my $dir ='.';
### my $suffix = '.txt';
### opendir(THEDIR, $dir) or die "unable to read $dir:$!";
### my @allfiles = grep { $_ =~ /$suffix/ } readdir THEDIR;
### closedir THEDIR ;
###
###
### print "found file $_\n" foreach (@allfiles);
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]