.
Below is a Perl program that is getting a diagnostic (Global symbol "$fle" requires explicit package name).
#!/usr/bin/perl -w
use strict;
use Scalar::Util qw(blessed dualvar isweak
readonly refaddr reftype tainted
weaken isvstring looks_like_number
set_prototype);
opendir(Dir1,"f:/spreadsheets/taxes/08 taxes");
$fle = readdir(Dir1);
print "$fle\n";
Any idea whats wrong? I realize that it will only do the first entry. I do not want a list (eg array) of names, just one name at a time.
Ummm.... so, what you are trying to do here is read a directory and print the file names of that directory?
#!/usr/bin/perl -w
@files = <*>;
foreach $file (@files) {
print $file . "\n";
}
does that work for you?
Rob