&find_pattern($dir1); sub find_pattern { my $file3="/etc/filesystems"; my $pattern = $_; my $result = `grep $pattern $file3`; if ($result) { print "Entry for $pattern is updated in $file3/n!"; } else { print "Entry for $pattern not found in $file3/n!"; } return; }