in reply to Re: map not returning
in thread map not returning

While that's a great use of map if you're trying to win an obfu contest, that method is too aggressive at removing single quotes. He specified that he wanted to remove single quotes from the number, not from the word 'berg'.

It would work better like this:

my @list_of_params = map { s/^'(\d+?)'$/$1/ } map { $_ eq 'NULL' ? 'undef' : $_ } split (/\s*,\s*/,$params);

Dave

"If I had my life to do over again, I'd be a plumber." -- Albert Einstein

Replies are listed 'Best First'.
Re: Re: Re: map not returning
by surag (Novice) on Sep 11, 2003 at 01:37 UTC
    Thanks I got it fixed.