Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Perl globbing syntax with $variables?

by toolic (Bishop)
on Aug 01, 2012 at 20:23 UTC ( #984890=note: print w/replies, xml ) Need Help??


in reply to Perl globbing syntax with $variables?

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) { (); }

I/O Operators

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://984890]
help
Chatterbox?
[stevieb]: Perhaps my experience with HP is a bit different as I always bought the highest end models through business.
[Corion]: 1nickt: At least the machines that $work is introducing to replace the Lenovo T60 here do not inspire confidence with me

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (19)
As of 2017-03-27 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.