Below is part of some code that reads from a file to an array and then
attempts to assign the array to a hash.  I get no compiling errors, but
%label_hash is empty. No doubt I am being stupid. Has anyone a
suggestion how to fill the hash variable?
Thanks,
Dick Fell


        open LABEL_FILE, "$current_directory/label_file" or die "Cannot open
label file:$!";
        my @label_array;
        while ( <LABEL_FILE>)
          {
            push(@label_array,$_);     

          }
        print "label array=@label_array\n";
        my %label_hash=@label_array;
        print "label hash=%label_hash\n";

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to