Use a hash.
my %data_for; # XXX bad name, but I don't know what you need foreach my $filename (@filenames) { next unless $filename =~ /^(.*)\.txt$/; $data_for{$1} = 'whatever you need to store'; }
Cheers,
Ovid
New address of my CGI Course.
In reply to Re: How to create the varibles with the file names
by Ovid
in thread How to create the varibles with the file names
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |