Using grep on undefined array

Avleen Vig avleen at gmail.com
Wed Aug 14 01:19:53 BST 2013


On Aug 13, 2013 7:35 PM, "Paul Makepeace" <paulm at paulm.com> wrote:
>
> 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 ;-)

Hehe

Also in case readability.
Breaking that into many discrete statements would show it a lot easier too
:)


More information about the london.pm mailing list