in reply to Use of special character "*" to retrieve the contents
See glob.
for (glob "$var1/$var2/$var3/*.ksh") { print "$_\n"; }
For portability, it is better to use File::Spec:
use File::Spec; ... my $pat = File::Spec->catfile($var1,$var2,$var3,'*.ksh'); for(glob $pat) { print "$_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use of special character "*" to retrieve the contents (updated)
by haukex (Archbishop) on Jun 07, 2017 at 14:06 UTC |