Interesting...Never heard the term goatse before! I don't know that the lexical variable is "redundant". I figure that Perl creates it whether it has a name or not! Adding a lexical name to this goatse list appears to be just a minor detail. It could be that there are even shorter ways to formulate this function. I just wrote the first 2 obvious lines of code that came to mind.
This was not a difficult problem and quite frankly, I would expect the OP to spend more time thinking about it. | [reply] |
Believe me, you want to leave that term right where it is. It is not a term for polite company, and when viewing the, umm, data behind the term, you may want to gouge out your eyes, rip out your memories by your brain stem, and do all sorts of other purging activities.
That is all I am going to say *shudder*.
I, in my more naive days, opened the link from /. on my desktop at work. Thankfully, I was at a more permissive employer at the time. Once was more than enough.
--MidLifeXis
The tomes, scrolls etc are dusty because they reside in a dusty old house, not because they're unused. --hangon in this post
| [reply] |
I figure that Perl creates it whether it has a name or not!
No. The results are placed on the stack in both cases, but no array is created or used when assigning to (). The elements on the stack are simply discarded.
Independently, since the (rightmost) assignment is evaluated in scalar context, it evaluates to the number of elements returned by its RHS. This occurs whether an array or a list is found on its LHS.
| [reply] [d/l] |
| [reply] |
That's beyond disgusting. Gordon Ramsay wouldn't even use terms like that!
| [reply] |
Aargh! I had almost forgotten. Damn you!
Just a something something...
| [reply] |