Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://984891]
help
Chatterbox?
[marto]: I'm sure it'll be fun :)
[marto]: of course I can take you to some of the best/worst bars in Glasgow ;)
[LanX]: is Glasgow that city where catholics and protestants fight in bars? ; )
[marto]: not really, but pick your side, we'll visit some real dumps
LanX will keep his pope tshirt at home

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2017-12-14 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (397 votes). Check out past polls.

    Notices?