in reply to Help with SAPI5 Speech Recognition HASH
The error message is telling you the $result is a hash ref so you need to treat it as hash to view the contents. Here is an example -
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $result = { 'word1' => 1, 'word2' => 1}; print Dumper ($result); # manual printing print $_, " => " , $result->{$_},$/ for (keys %$result); # note the %$
Output
$VAR1 = { 'word2' => 1, 'word1' => 1 }; word2 => 1 word1 => 1
BTW check out QandASection: hashes for more information on hashes.
|
---|