CGI Perl Interview Questions
Questions Answers Views Company eMail

How do you debug a Perl scripting ( at the compile time error or run time error) in Unix environment ?

4 6474

how to search a unique pattern in a file by using perl hash map function ??? plz answer me

2 5445

how to install a package in perl ????

2 3413




How to count no of occurrence of a unique patterns in perl?

Ness Technologies,

4 11463

what is the difference between require and use in perl?

IBM,

3 6706

what is the difference b/w coldfusion MX 6 and Coldfusion MX 7?

1 3074

Which web site will help the student to download the Java mini Project ?

3 1505

while(my($key, $value) = each(%hash) ) { print "$key => $value\n"; } my($key, $value); while(($key, $value) = each(%hash) ) { print "$key => $value\n"; } What is the different between these two code in case of "my" usage ?

1 3369




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?

A1 Technology,

1 1926

What is the difference between $array[1] and @array[1]?

1 2556

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 ?

1698

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?

2 2000

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 "$a\n$b\n$c\n$d\n"; 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.

2 1840

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,

1328

write a script to check whether user enter a value is a leap year or not?

Oracle, Persistent, ViPrak,

3 9248


Post New CGI Perl Questions






Un-Answered Questions { CGI 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.

1129


We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?

1244


how to create a flat file database as shown below s.no name age city phone 0 hema 22 Calcutta 4312542 1 hema 21 Bangalore 2344345 2 ganesh 25 delhi 2445454 3 kartik 45 pune 4312121 4 santosh 25 Hyderabad 2254231 5 kumar 25 mysore 2344567 6 gita 34 mangalore 6532123 7 gita 32 pune 2213456 Q1.print the details of the person who r from bangalore q2.Replace the city name managlore to pune q3.prints no of person having name gita and hema q4.print how many are of age 25.

1016


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 ?

1698


How to check the status of airplane mode (enable/disable) in perl for Android mobile?

1868






Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??

1127


I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line. eval \'exec perl -S $0 ${1+\"$@\"}\' if 0; $0 for script name $@ set if error occur

981


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,

1328


There is no strict data types in perl unlike in other high level languages like Java so wouldn't that be a problem if a code in perl is to be a written by a big team of 20+ members ?"

1320


how to get back up from private character editor which is saved in the format of .udf

1161


Why we use CGI?

1196


how to connect cisco switch uisng perl script

2421


what are steps to do to lock the sony ericsson mobile with password?

1065


how to extract pin_code,phone_number,year from text file using regular expressions in perl

1153