Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How do I change the code to get percent match and matched words between two texts?

by kcott (Abbot)
on Sep 28, 2012 at 09:32 UTC ( #996153=note: print w/ replies, xml ) Need Help??


in reply to How do I change the code to get percent match and matched words between two texts?

G'day supriyoch_2008,

You get this message from Perl:

syntax error at C:\Users\DR-SUPRIYO\Desktop\match.pl line 21, near "print"

Then you write:

"But something has gone wrong in the script either in naming (assigning) the original and matching texts to variables at lines 9-10 or missing some code at line 11."

I looked at the print on line 21. It's part of this statement spanning lines 20-21:

[my $sentence,my $possible_match] print Dumper($text->matches);

I haven't looked at any other parts of your code because Perl clearly states where the problem lies.

-- Ken


Comment on Re: How do I change the code to get percent match and matched words between two texts?
Select or Download Code
Re^2: How do I change the code to get percent match and matched words between two texts?
by supriyoch_2008 (Scribe) on Sep 28, 2012 at 13:28 UTC

    kcott,

    Thanks for your comment. I shall look into the lines 20-21 once again. I am sorry that I didn't look at the lines 20-21 as indicated in cmd. I shall try once again to fix it.

    Regards,

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2015-07-06 09:23 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 (70 votes), past polls