On 10/25/06, Mug <[EMAIL PROTECTED]> wrote:
I actually want to write a piece of code like that :

my %u_info = user_detail ( $ENV{QUERY_STRING} );
# I have $u_info{id} = 'foo' , $u_info{pass} = 12345

my @attribs = user_detail ( $ENV{QUERY_STRING} );
# I have @attribs = ( 'foo', 12345 );

while I am asking %u_info , the user_detail will return a hash ,
and while I am asking @attribs, I got an array return.


It cannot be done with the bare Perl interpreter, which only
recognizes scalar, list and void context. In your case, both %u_info =
and @attribs = call for a list context and that's all.

But you may try the CPAN module Want.

http://search.cpan.org/dist/Want

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to