in reply to Re: Glob strange bahavor
in thread Glob strange behavior
#!/usr/bin/perl use strict; use warnings; my $path='C:/dataset/'; my @sign_arr=('A1', 'A2', 'A3','A4', 'A5', 'A6', 'A7', 'A8', 'A9'); foreach (@sign_arr) { my $filename = "$path*$_*.pkl"; if (-e $filename) {print "$filename $_\n"} else {print "not found $_\n";} }
Update: Ack, nevermind, I didn't notice his use of *. First post of the morning, sorry.
|
|---|