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); }
In reply to Re^3: Using wildcards to open files.
by frozenwithjoy
in thread Using wildcards to open files.
by starface245
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |