Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by BrowserUk (Patriarch)
on Dec 26, 2012 at 17:18 UTC ( [id://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

Replies are listed 'Best First'.
Re^4: using function output ananymous array vs. named array in foreach
by Marshall (Canon) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1010410]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found