Thanks Jeff.
-----Original Message-----
From: Jeff Pang [mailto:[EMAIL PROTECTED]
Sent: Friday, June 01, 2007 3:21 PM
To: Nath, Alok (STSD)
Cc: [email protected]
Subject: Re: Simplest hash initialization with no value
Nath, Alok (STSD) 写道:
> Hi,
> What is the simplest way to initialize the hash keys with no values ?
>
> I know the crude form :
>
> %myhash =('A' => undef,
> 'B' => undef) ;
>
> Is there anything simpler than this ?
> Thanks,
> Alok
>
Maybe you want,
@myhash{qw/A B/} = ();
--
http://home.arcor.de/jeffpang/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/