develooper Front page | perl.beginners | Postings from January 2002

RE: What's wrong with this?

Thread Previous | Thread Next
From:
Jeff 'japhy' Pinyan
Date:
January 29, 2002 07:23
Subject:
RE: What's wrong with this?
Message ID:
Pine.GSO.4.21.0201291022110.27903-100000@crusoe.crusoe.net
On Jan 29, Jonathan E. Paton said:

>> How can the param's be placed into a new hash?
>
>my %hash = param();
>
>since param() detects whether it's in list/array/hash
>context and does the Right Thing.

These is no such thing as "hash context" or "array context".  There is
void context, scalar context, and list context.

  my %hash = param();

is list context, and stores only the NAMES of the fields (not their
values) in %hash.

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About