in reply to Re: Creating hash: Key is unique string in array element, value is number of times it appears
in thread Creating hash: Key is unique string in array element, value is number of times it appears

%genus = { } ; #genus is empty

Let's try that!

knoppix@Microknoppix:~$ perl -Mstrict -wE 'my %genus = {};' Reference found where even-sized list expected at -e line 1. knoppix@Microknoppix:~$

You probably meant to use parentheses rather than curly braces, which construct a reference to an anonymous hash.

knoppix@Microknoppix:~$ perl -Mstrict -wE 'my %genus = ();' knoppix@Microknoppix:~$

I hope this is helpful.

Cheers,

JohnGG

  • Comment on Re^2: Creating hash: Key is unique string in array element, value is number of times it appears
  • Select or Download Code