write a Perl script to find a particular word in a paragraph???
Answer / guest
[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 in
the Perl\'s default search path then it will find the
library files in the path we have given with the use lib
$path.';
if($pat=~/push/)
{
print "Pattern push get matched\n";
}
[/code]
| Is This Answer Correct ? | 7 Yes | 0 No |
How do you debug a Perl scripting ( at the compile time error or run time error) in Unix environment ?
sort a word "system" in perl/shell without using built in functions output should be emssty
How many types of variable in perl?
There are two types of eval statements i.e. Eval expr and eval block. Explain them.
In CPAN module, name an instance you use.
What is warn function in perl?
Where do we require ‘chomp’ and what does it mean?
Does Perl have reference type?
How would you trap error occurred in the perl program/file?
Can you add two arrays together?
In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?
What is caller function in perl?