InterviewSolution
Saved Bookmarks
| 1. |
Write a Perl program to search your name from a string through regular expression. |
|
Answer» Here’s the program to search my NAME from a string through REGULAR expression. $strr = "My name is GAURAV and I'm here for a Perl interview"; if ($strr =~ /Gaurav/) { print " Your name is there in the string \n"; } else { print " Your name is not there in the string \n"; } |
|