Loading ...
Sorry, an error occurred while loading the content.

RE: [PBML] Hash assignment keys

Expand Messages
  • Dukelow, Don
    Disregard I found it, I had a hidden character in my assignment line. I ve found that vi does that when you have fat fingers. ... Don Dukelow HP UNIX OVO
    Message 1 of 2 , Sep 10, 2007
    • 0 Attachment
      Disregard I found it, I had a hidden character in my assignment line.
      I've found that vi does that when you have fat fingers.


      -----
      Don Dukelow
      HP UNIX OVO Enrollment
      Hewlett-Packard (Canada) Co.
      e-mail: dukelow@...
      URL: http://www.hp.ca <http://www.hp.ca/>




      ________________________________

      From: perl-beginner@yahoogroups.com
      [mailto:perl-beginner@yahoogroups.com] On Behalf Of Dukelow, Don
      Sent: Monday, September 10, 2007 2:40 PM
      To: perl-beginner@yahoogroups.com
      Subject: [PBML] Hash assignment keys




      I'm dong a for loop and using the number count to assign as part of the
      hash key. The test print inside the sub program work fine, but outside
      the program it comes up uninitialized. I think the $i is being used as
      part of the key name and not the value of $i which is what I want.
      HELP!

      &get_assign(\%refHas, $zone_dir, $lic)
      print "TEST $refHas->{$lic}->{ass_port1}\n";
      print "TEST $refHas->{$lic}->{ass_port1}\n";

      sub get_assign{
      my ($refHas, $zone_dir, $lic) = @_;
      for ($x = 0, my $i = 0 ; $x <= $#gline; $x++, $i++) {
      if ($x == 0) {
      $refHas->{$lic}->{ass_master} = $lic_dat[1];
      $refHas->{$lic}->{ass_master_port} = $lic_dat[3];
      } else {
      $refHas->{$lic}->{ass_slave.Si} = $lic_dat[1];
      $refHas->{$lic}->{ass_port.$i} = $lic_dat[3];
      print "TEST $refHas->{$lic}->{ass_port.$i}\n";
      print "TEST $refHas->{$lic}->{ass_port.$i}\n";
      }
      }

      -----
      Don Dukelow
      HP License Management Team
      Hewlett-Packard Company
      Cell: 1-810-728-3388
      e-mail: dukelow@... <mailto:dukelow%40hp.com>
      URL: http://www.hp.ca <http://www.hp.ca>





      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.