Please also note that when looking for a pattern contained as a substring of a line, it can be much simpler and clearer to use the
index function:
my $line = ' [Category("notestrecord")]';
my $pattern = 'Category("notestrecord")';
if (index($line, $pattern) >= 0) {
print "We have a match!\n";
} else {
print "No match!\n";
}
The index function gives a negative one if the match wasn't found, and the position of the match if it was (which can be a zero if the match was at the beginning), hence the comparison of zero or greater:
if (index($line, $pattern) >= 0) { ... }
say
substr+lc crypt(qw $i3 SI$),4,5