Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Perl globbing syntax with $variables?

by abualiga (Scribe)
on Aug 01, 2012 at 20:41 UTC ( #984891=note: print w/ replies, xml ) Need Help??


in reply to Perl globbing syntax with $variables?

I think the problem is in '*.*'. Perhaps this would work better:

$WantedFiles = '//server/path/WantedFiles'; @files = <$WantedFiles/*>;

If you also wanted the dot files from that directory, then:

@files = <$WantedFiles/* $WantedFiles/.*>;

Perl expands variables to current values before globbing them (Learning Perl).


Comment on Re: Perl globbing syntax with $variables?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://984891]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2015-07-02 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls