Pablo, For @keys=%gen try @keys = keys(%gen)
Hope this helps Craig > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:perl-unix- > [EMAIL PROTECTED]] On Behalf Of [EMAIL PROTECTED] > Sent: Thursday, January 23, 2003 7:36 AM > To: [EMAIL PROTECTED] > Subject: [Perl-unix-users] Hash in win and Unix > > Ok, for those of you that ask for an example: > in windows I read a file and store as hash, let's say %gen. > > @keys=%gen; > print $keys[0];#will produce the rigth thing, 'At1G0100' > > But if in Unix I read a list from a file, let's say @list_names > print $list_names[34];# will produce 'At1G0100', and > print $gen{$list_names[34]}; #won't work, again not in unix but fine > in windows. > print $gen{$keys[0]};# it will work fine, printing the contents of the > hash. > > Thanks for the interest. > Pablo T. > > _______________________________________________ > Perl-Unix-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs