Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Loading all .txt files within current directory

by choroba (Cardinal)
on Jan 31, 2016 at 12:44 UTC ( [id://1154131]=note: print w/replies, xml ) Need Help??


in reply to Loading all .txt files within current directory

@ARGV is not a lexical variable. Remove the my. See perlvar:

Perl identifiers that begin with digits, control characters, or punctuation characters are exempt from the effects of the package declaration and are always forced to be in package main; they are also exempt from strict vars errors. A few other names are also exempt in these ways:
ENV STDIN INC STDOUT ARGV STDERR ARGVOUT SIG
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Loading all .txt files within current directory
by TJCooper (Beadle) on Jan 31, 2016 at 13:34 UTC
    Thanks. So I can load in all .txt files simply using @ARGV = glob('*.SAM');? I have tried this, but as before - the script does not execute the commands (besides printing the headers) and I can't figure out why.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-03-29 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found