@ARGV= map glob, @list; #### @ARGV= map { my @g= glob; @g ? @g : $_ } @list; #### @mispel= glob( "g{u,a,au,ua}r{r,}{a,u,e}nt{i,e,}{e,y}" ); #### print "File(s): "; chomp( my $fileSpec= or exit(0) ); my @files= glob($fileSpec) # vvv or warn "No files matching $fileSpec found.\n"; # ^^^ This line not needed with current glob(). foreach my $file ( @files ) { if( ! open( FILE, "<$file" ) ) { warn "Can't read file, $file: $!\n"; next; } #... #### print "File(s): "; my $fileSpec= or exit(0); my @files= map { glob($fileSpec) or (warn "No files matching $fileSpec found.\n")[()]; } split ' ', $fileSpec; foreach my $file ( @files ) { #... #### grep -e, glob