|
|
| Welcome to the Monastery | |
| PerlMonks |
Re:{2} Adding Files in a directory to an arrayby jeroenes (Priest) |
| on Oct 09, 2001 at 15:10 UTC ( #117693=note: print w/ replies, xml ) | Need Help?? |
|
Not exactly. While it is better (and I mean really, really better) to use the functional glob, you still can force perl to interpolate variables. Actually, only filehandles and simple scalars are not interpolated (see perlop). So these: are interpreted as globs. Note that this is a caveat in the last case! Since you probably want the <> to do a readline in the last case, people really need to be aware that nested structures are always globbed. Only simple, straightforward variables like $foo result in readlines.
Jeroen
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||