Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: putting text into array word by word

by jms53 (Monk)
on Jan 10, 2012 at 19:46 UTC ( #947223=note: print w/ replies, xml ) Need Help??


in reply to Re^3: putting text into array word by word
in thread putting text into array word by word

Far from me to accuse your code, rather I'm thankful for showing it to me, it's just that while Perl is a great language for coding (and damn logical on its syntax), there are far too many elements that still appear extremely obscure to me. My main issue was that you didn't seem to have a handle <FILE> which I assumed to be a requirement for reading files, and then this line:

 my @words = split /\W+/, do { local $/ = <$infile> };

thank you very much however for explaining the local scope of $/. that will most certainly come in handy in the upcoming term.


Comment on Re^4: putting text into array word by word
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-07-11 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (224 votes), past polls