Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by kcott (Chancellor)
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

Replies are listed 'Best First'.
Re^2: How do I change the code to get percent match and matched words between two texts?
by supriyoch_2008 (Monk) 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?
[stevieb]: choroba my GPS home device is done, at least prototype v1 is. I'm just making sure all of my code does what it says now
[stevieb]: I test/prototype code on my Pi, then I migrate it over to Arduino when it's ready (if that's a better platform for what I'm doing). The whole RPi stuff was for learning at first, then it snowballed. I'm just trying to get my in-house CI...
[stevieb]: ...done, which obviously requires a specific hardware setup.
[stevieb]: I don't write tests for the lower-level distributions (ie. ICs, sensors etc) within those distributions, I have all tests in a master distribution which encompasess all of the sub-modules

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2017-06-25 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (572 votes). Check out past polls.