[code]my $pat;$pat='Using push we can add multiple items into an array in a single instance.If we are trying to add a module or library files in our program using require or use statement then it will search that module or library files in the Perl's default search path.

The statement use lib is used to add the directories to default search path.

So if the module or library file is not located inthe Perl's default search path then it will find thelibrary files in the path we have given with the use lib$path.';

if($pat=~/push/){print "Pattern push get matched
";}[/code]

If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-

Try pattern matching for the following:1) 10.111.23.112) /root/abc/cde/fgg/ac.xml --> Get file name without extention.3) /root/abc/ac.xml/fgg/ac.xml --> Get file name without extention.4) What does "DIE" meant in PERL?5) chomp6) "This is saturday" --> Print the weekday number.7) 11-2-2009 --> Print the name of the month.8) Reverse the string without using func in C.?