On Tue, May 6, 2008 at 10:43 AM, Rodrigo Tavares <[EMAIL PROTECTED]> 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 =" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/