B::Deparse (Tip #6 from the Basic debugging checklist) shows that <> in your 1st example is indeed a glob, but <> in the 2nd example is not a glob:
1st:
use File::Glob (); use warnings; @FILES = glob('//server/path/WantedFiles*.*'); foreach $file (@FILES) { (); }
2nd:
$WantedFiles = '//server/path/WantedFiles*.*'; @FILES = <$WantedFiles>; foreach $file (@FILES) { (); }
In reply to Re: Perl globbing syntax with $variables?
by toolic
in thread Perl globbing syntax with $variables?
by shadowfox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |