Interview questions
Cgi Perl interview questions – page 4
141 questions. Tap “Show answer” to check yourself.
-
How to extract pin_code,phone_number,year from text file using regular expressions in perl
-
What is caller function in perl?
-
How to disable the mod_perl from apache_server as i have used perlfect search on the site and its pagination is not working and the remedy is to disable the mod_perl.
-
Write a script to generate n prime no.s?
-
Why we use "use lib $path"?
-
Difference between Perl and Mod_perl?
-
Write a script to check whether user enter a value is a leap year or not?
-
Write a script to display mirror image of a entered value and also check whether Palindrome
-
my @array=('data1','data2'); my @array1=('data1','data2'); my ($i,$k); $i=7; $k=7; while($i){ $array [++$#array] = 'ree'; $i--; print "@array"; } while($k){ push(@array1,'ree'); $k--; print "@array1"; } Are these two while loop are doing the same functionality ? What may be the difference?
-
Consider the following example #! /bin/perl use strict; sub sample { my @arr=(1,2,3,4); return @arr; } my ($a,$b,$c,$d) = &sample; print "$an$bn$cn$dn"; In the above code, How can I get the $c without using the arguments such as $a,$b. I don't want to use any array to get the return values.
-
package MYCALC; use Exporter; our @EXPORT = (); our @ISA = qw(Exporter); our @EXPORT_OK = qw(addition multi); our %EXPORT_TAGS = (DEFAULT => [qw(&addition)],Both => [qw(&addition & +multi)]); sub addition { return $_[0] + $_[1]; } sub multi { return $_[0] * $_[1]; } 1; Program: use strict; use warnings; my @list = qw (2 2); use Module qw(:DEFAULT); print addition(@list),"n"; Above coding is my module MYCALC and the program which using this module, I have not exported any function using @EXPORT, but I have used the DEFAULT in %EXPORT_TAGS with the function addition, when I call this function from the main it says the error as,
-
What is the difference between $array[1] and @array[1]?
-
How can I implement the function overloading in Perl ? I read about the operator overloading, I do not know how to implement the function overloading. Thanks in advance ?
-
What is the difference between require and use in perl?
-
What is the difference b/w coldfusion MX 6 and Coldfusion MX 7?
-
Which web site will help the student to download the Java mini Project ?
-
while(my($key, $value) = each(%hash) ) { print "$key => $valuen"; } my($key, $value); while(($key, $value) = each(%hash) ) { print "$key => $valuen"; } What is the different between these two code in case of "my" usage ?
-
How to install a package in perl ?
-
How to count no of occurrence of a unique patterns in perl?
-
How do you debug a Perl scripting ( at the compile time error or run time error) in Unix environment ?
-
How to search a unique pattern in a file by using perl hash map function ? plz answer me
-
What r the different type of function in perl ?
-
How can you create an object of a class in a package?
-
What is the procedure to define a user define module in your perl application?
-
How would you trap error occurred in the perl program/file?
-
Can any1 tell me 2 write the script using perl script 2 looking at a log file 2 see wheather the test has passed or not.
-
What is the difference between module and package?
-
Write a script for 'count the no.of digits using regular expressions in perl..
-
i have a folder called 'error' and in that, i have error log files which are generated by the build, now i want to findout the string 'error' from each log file and that error has to be copied into the another file called 'analysis'. how do you do this in perl?
-
What is the difference between chop & chomp functions in perl?