Xavier Mas i Ramón wrote:
> Hi all!,

Hello,

> I'm trying to create a sorted (ASCII) hash file but get all time a syntax 
> error in line "my $abreviatures{$clau} = 1;" at  "$abreviatures{ <--". Sure 
> is an stupid mistake but I'm not able to see it even checking with my 
> "Learning Perl" book.
> 
> Pls, can someone tell me where is the syntax error?
> 
> ...
> while (<ABREVIATURES>) {
> chomp;
> my $clau = $_;
> my $abreviatures{$clau} = 1;

You can't use my() with hash or array elements, only with the hash or array
itself.

my %abreviatures = ( $clau => 1 );



John
-- 
use Perl;
program
fulfillment

-- 
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