the $number is generated by another loop, just testing with a single value. it is unable to perform the last line of the code and prints the die message. Where $strutcure should be $str when $ref =1 Thanks%names; { open (name, "<data/gly.txt"); while (<name>) { ($ref, $str) = split /\|/; $names{$refnum} = $str; } } $number =1; $structure = $names{ $number} or die "unable to open";
In reply to hash problem by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |