http://www.perlmonks.org?node_id=996291


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

Once you fix that compilation error, you'll want to fix line 15 as well.

     foreach my $comparison (my @comparison_texts) {

You: "Hey, I want you to loop through the new (and empty) @comparison_texts array!"

Perl: "Okay, that's a no-op. Enjoy your lack of results."