
Laurent_R
Veteran
/ Moderator
Nov 27, 2012, 10:51 AM
Post #5 of 5
(3746 views)
|
Re: [rovf] Can you explain me the following code?
[In reply to]
|
Can't Post
|
|
I think you do. In the OP's code, grep removes all lines which are either * initially empty, or * consist only of a curly brace (or just an empty pair of curlies), or - as a funny side effect - * consist only of the digit zero (after removal of appropriate curlies) Don't ask me whether this makes sense, but this is different from using map - unless it is me who is missing something now ;-) Yes, you are absolutely right, I reacted too quickly, I should have explained better what I meant. It does indeed some filtering if $_ is reduced to 0 or "". What I really meant to say is that I wasn't sure this was really the desired effect to do this. But perhaps it makes sense, after all...
|