Perllace has asked for the wisdom of the Perl Monks concerning the following question:
Please have a look at this code and let me know what I'm doing wrong that the values of the hash is not getting printed in the function CatchText.
Wait(test,2000,0.96); sub Wait { my ( $tag, $duration,$thresh ) = @_; my $threshvalue = $thresh || "0.95" ; my $tmp = { 'Command' => 'Wait', 'Tag' => $tag, 'Duration' => $duration, 'Threshold'=> $threshvalue }; CatchText($tmp); } sub CatchText { my ($self,$hash) = @_; my $str = $hash->{'Threshold'}; print "The command is $str \n"; }
I am getting the output as "The command is "
Thank you
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why is the valu of the hash not geting printed
by ikegami (Patriarch) on Nov 07, 2011 at 07:36 UTC | |
|
Re: Why is the valu of the hash not geting printed
by Anonymous Monk on Nov 07, 2011 at 07:45 UTC | |
by Anonymous Monk on Nov 07, 2011 at 07:46 UTC | |
by Perllace (Acolyte) on Nov 07, 2011 at 08:23 UTC | |
|
Re: Why is the valu of the hash not geting printed
by mrstlee (Beadle) on Nov 07, 2011 at 15:11 UTC |