Jeff Pang wrote: >> Jeff Pang wrote: >>>> foreach my $key (keys %$env) { >>>> print $key . " -> " . $env{$key} . "\n"; >>>> } >>> Hello, >>> >>> For a quick look,the codes above may not work. >>> Since $env is a hash reference,so you can't say $env{$key} to access the >>> hash's value. >>> It may change to: >>> >>> print $key . " -> " . $env->{$key} . "\n"; >>> >> That isn't working either. It is complaining about $env not being declared. >> I >> replaced it with %{env}->{$key} but it said it was deprecated. It then >> proceeded to print out the references. >> > > Hi, > > Since %env is clearly a hash not a hash referenct,why you write this below? >> foreach my $key (keys %$env) { > > Give a try to replace it to: > > foreach my $key (keys %env) { > > Good luck! > > -- > http://home.arcor.de/jeffpang/ >
Yes, did that already. The complaint is coming in regards to *print* line. It doesn't like anything I do there. Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/