in reply to Re: Re: flattening a list-of-lists
in thread flattening a list-of-lists
sub flatten { map { ref $_ eq 'ARRAY' ? @$_ : $_ } @_ }
This is an extremely scary solution. So scary that I can only assume you are joking. Please dont suggest things like this without a security disclaimer. A fresh newbie might think its a good plan then end up having their hard drive deleted or other nasty tings.
This sounds freaky. I'm curious, can you post an exploit against flatten_stringeval?. The only thing interpolated is $_, which iterates through (0..$#_). Everything else is quoted. Also, it checks for hard array ref before putting @{...}, so one can't play games with symbolic references (one doesn't need string eval for that, just no strict 'refs'). Maybe I'm missing something...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: flattening a list-of-lists
by demerphq (Chancellor) on Nov 21, 2003 at 09:06 UTC |