Using grep on undefined array

Paul Makepeace paulm at paulm.com
Wed Aug 14 00:26:42 BST 2013


On Tue, Aug 13, 2013 at 4:09 PM, Andrew Beverley <andy at andybev.com> wrote:

>     my $select_fields = $fields ? join(',', map { 'users.' . $_ } @fields)
> : '*';
>

    my $select_fields = @fields ? join(',', map { 'users.' . $_ } @fields)
: '*';

?

Maybe a lesson in variable naming there ;-)

Paul


More information about the london.pm mailing list