develooper Front page | perl.perl5.porters | Postings from January 2008

Re: a warning I'd like to see

Thread Previous | Thread Next
Juerd Waalboer
January 24, 2008 17:36
Re: a warning I'd like to see
Message ID:
David Nicol skribis 2008-01-24 17:45 (-0600):
> alert me when I give map an arrayref instead of an array

map takes a LIST, not an ARRAY. A reference by itself is a fine
single-element list.

There is no way to not-give a list to map, since every Perl EXPRession
in list context results in a valid list. A list can have zero or any
positive number of elements.
Met vriendelijke groet,  Kind regards,  Korajn salutojn,

  Juerd Waalboer:  Perl hacker  <>  <>
  Convolution:     ICT solutions and consultancy <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About