You just remove the anchors ^ and $ to match the substrings.

@result = grep/\Q$a\E/, @sea;

Prasad


In reply to Re^3: compare two text files by prasadbabu
in thread compare two text files by juergenkemeter

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":