Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Help with SAPI5 Speech Recognition HASH

by sk (Curate)
on Dec 24, 2005 at 17:38 UTC ( #518920=note: print w/ replies, xml ) Need Help??


in reply to Help with SAPI5 Speech Recognition HASH

Don't know anything about SAPIS. I guess you are trying to print out the hash or convert it to a some sort of string to view the match. For starters you can use Data::Dumper.

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 hashes for more information on hashes.


Comment on Re: Help with SAPI5 Speech Recognition HASH
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://518920]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2015-07-03 11:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (51 votes), past polls