%hash =('key1'=>'value1','key2'=> 'value2');
 
PrintHash(\%hash);
sub PrintHash{
  $rhash = shift;
  for(keys %{$rhash}){
        print "$_ => $rhash->{$_}\n";
  }
}

would work.

-- Rex

-----Original Message-----
From: jonathan vandine [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 15, 2001 11:08 AM
To: [EMAIL PROTECTED]
Subject: Printing with arrow notation


I am passing a hash as a reference to a subroutine and want to print its 
values using arrow notation. Such as..
%hash ("value1", "value2", etc..);
PrintHash(\%hash);
    sub PrintHash
{
  $rhash = @_;
  What would work here for print using arrow notation?
}
Thanks

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

Reply via email to