in reply to Looking for the error in this code!

When you access a hash item, the % becomes a $. %index is accessed as $index{foo}. See perlintro and perldata.

Oh, and I hope you put the => only in for illustration, it would make no sense in real code.

Replies are listed 'Best First'.
Re^2: Looking for the error in this code!
by Sombrerero_loco (Beadle) on Jan 12, 2009 at 14:48 UTC
    ha ha ha yes, => its only for see it better... i think i dont have a very good to do perl, i did't saw it...my god :=) Thanks! should i go sleep?