in reply to Re: Using wildcards to open files.in thread Using wildcards to open files.
I haven't had a chance to test this in your exact usage situation, but try the following. It replaces spaces in the file names with escaped spaces.
#!/usr/bin/perl @files = glob("*.msg"); foreach $file(@files) { $file =~ s/ /\\\ /g; $cmd = "perl script.pl < $file"; system($cmd); } [download]