#!/usr/bin/perl use strict; use warnings; use String::Compare; my $str1 = "string1 eq 79%"; my $str2 = "string2 eq 79%"; my $points12 = compare($str1, $str2); if($points12 == 1) { print 'They are the same', "\n"; } else { print 'They are not the same', "\n"; }