skip values:
%hash = qw( fred filntstone barney rubble tom delong );
print( map { $a=!$a ? $_ : () } reverse( %hash ) );
perhaps not too bad map() example :)
P! Vladi.
On Tue, 19 Oct 2004 09:50:39 -0400
Jason Foster <[EMAIL PROTECTED]> wrote:
> Can anyone help me to understand why this code refuses to compile?
> Even better, can anyone help fix it :)
>
> %hash = qw( fred filntstone barney rubble tom delong );
> print( keys( reverse( %hash ) ) );
>
> The error message...
>
> Type of arg 1 to keys must be hash (not reverse) at ./killme.pl
> line 4, near ") ) "
>
> ... was pretty confusing since it implies that "reverse" is a type?!
>
> I tried making an anonymous hash as follows...
>
> print( keys( %{ reverse( %hash ) } ) );
>
> ... but got no results at all.
>
> Help!
>
>
--
Vladi Belperchinov-Shabanski <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
http://cade.datamax.bg/
Cross the ocean deep, wake now from your sleep
Kiss the past goodbye, don't follow empty skies...
pgprJakZluUXS.pgp
Description: PGP signature
