in reply to Tying events to perl warnings and errors
...which prints this output:use strict; $SIG{__WARN__} = \&mywarn; sub mywarn { print "here!\n @_\n"; } { test ('arf', undef, 'dog'); } sub test { @_ == 3 or die "Incorrect number of arguments"; my ($a, $b, $c) = @_; my %hash = ('arf' => {'spot' => {'dog' => 3}}); print $hash {$a}->{$b}->{$c}; }
here! Use of uninitialized value in hash element at test.txt line 23. here! Use of uninitialized value in hash element at test.txt line 23. here! Use of uninitialized value in print at test.txt line 23.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Tying events to perl warnings and errors
by Adam (Vicar) on Sep 13, 2000 at 23:37 UTC | |
by merlyn (Sage) on Sep 13, 2000 at 23:45 UTC | |
by Adam (Vicar) on Sep 13, 2000 at 23:53 UTC | |
|
(jcwren) Re: (2) Tying events to perl warnings and errors
by jcwren (Prior) on Sep 14, 2000 at 00:17 UTC | |
by reptile (Monk) on Sep 14, 2000 at 00:23 UTC | |
|
RE: Re: Tying events to perl warnings and errors
by geektron (Curate) on Sep 13, 2000 at 23:37 UTC |