Front page | perl.beginners |
Postings from May 2008
Re: Compile error
Thread Previous
From:
yitzle
Date:
May 6, 2008 07:46
Subject:
Re: Compile error
On Tue, May 6, 2008 at 10:43 AM, Rodrigo Tavares
<digolinopage@yahoo.com.br> wrote:
> Hello,
>
> I create a hash, and i want take the keys.
> Using Deitel Book, i take this example:
>
> numbers =
> (
> 1 => 'one',
> 3 => 'two',
> 5 => 'three',
> 7 => 'four',
> 9 => 'five',
> );
> @hashkey = keys (%numbers);
>
> When I try to run come this message.
> Undefined subroutine &main::chaves called at line
>
> What's wrong ?
>
> By,
>
> Faria
1) You forgot to provide which line the error is occurring at.
2) The error message says that you are calling the function "chaves"
which is not defined. Yet the code you provided does not have "chaves"
in it anywhere.
3) The first line of code you provided is "numbers =". It should be "%numbers ="
Thread Previous