Re: hash keys

[email protected] ("Rodrick Brown")
Newsgroups perl.beginners
Message-ID <[email protected]>
On Thu, Jun 12, 2008 at 12:15 AM, beast <[email protected]> wrote:

> Hi All,
>
>
> Why this following code has not working as expected?
>
>    print "Number of element(s) : " . sprintf("%10d", keys(%hash) ) . "\n";
>

Try: print "Number of element(s): " . sprintf("%10d", scalar keys(%h)),"\n";


>
> Thanks.
>
> --budhi
>
> --
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> http://learn.perl.org/
>
>
>


-- 
[ Rodrick R. Brown ]
http://www.rodrickbrown.com http://www.linkedin.com/in/rodrickbrown
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.