Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: using function output ananymous array vs. named array in foreach

by BrowserUk (Pope)
on Dec 26, 2012 at 17:18 UTC ( #1010410=note: print w/ replies, xml ) Need Help??


in reply to Re^2: using function output ananymous array vs. named array in foreach
in thread using function output ananymous array vs. named array in foreach

actually chomp() returns the number of "characters" that were chomped - not the delimiters.

You're right of course. (But your over elaborate demonstration added nothing to the simple statement of fact.)

I remember discovering early on that the return from chomp wasn't useful and I've never concerned myself with what non-useful thing it actually returned ever since.

So the OP's code is not going to work...

That was the point I was making when I said: "Neither snippet will do what you think it will do.".


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^3: using function output ananymous array vs. named array in foreach
Re^4: using function output ananymous array vs. named array in foreach
by Marshall (Prior) on Dec 27, 2012 at 02:38 UTC
    Yes, I was overly elaborate.
    Yes, I have never used the return value from chomp().
    That's it and I think we agree about that.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2014-10-30 15:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls