Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: What is the difference?

by jasonk (Parson)
on Apr 08, 2003 at 14:30 UTC ( [id://248939]=note: print w/replies, xml ) Need Help??


in reply to Re: What is the difference?
in thread What is the difference?

Split doesn't return a string, it returns a list, the scalar value of which is the number of elements, and since the split is splitting into individual characters, $line (although a poorly chosen variable name) contains the count of all the characters so far. Your 'fixed' example would end up giving you a list of numbers, if the text file contained two lines of 8 characters each, your example would return '88'.


We're not surrounded, we're in a target-rich environment!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 23:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found