Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

CGI Perl Interview Questions
Questions Answers Views Company eMail

Why do you use only Perl when there a lot of more languages available in market like C, Java?

1 4267

Try pattern matching for the following: 1) 10.111.23.11 2) /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) chomp 6) "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.

2 7752

Write a script to reverse a string without using Perl's built in function

Nokia,

8 29832

how to find a substring in a string without using substr built in functions, and print the substring found

Nokia,

3 15080

sort a word "system" in perl/shell without using built in functions output should be emssty

emc2,

2 6782

How to sort dates in Perl ?

1 5814

Packing and Unpacking. Hi, I want to get output as 0x23400000345.... in the below example How to get? i tried out, but unable to get the answer $r=0x234; $t=0x345; $y=pack('L L',$t,$r); $x1=unpack('L!',pack('P',$y)); printf("\nThe value is $x1"); I didn't get constant output

1 3819

while (my ($key, $value) = each(%ENV)) { print "$key - $value\n"; } What does the above sample code produce? What function do you use for reading a list of files within a directory? my %hash = ( 'hi' => {'hello' => 'all'}, 'bye' => {'later' => 'gone'} ); print $hash{'hi'}; What is printed when the above code is executed? sub new { my $pkg = shift; my $test = {'name' => shift;}; ???? return $test; } Which one of the following replaces "????" in the above code in order to cause the function new to return an object of type "Test"? while () { ???? print "$_\n"; } Which one of the following statements causes the above code to strip all whitespace from the end of all lines of input and to print the resulting lines to standard output while (my ($key,$value) = each(%hash)) { print "$key - $value\n"; delete $hash{$key}; } open(FILE,"; } close(FILE); my $foo = 21; $foo <<= 5; $foo >>= 4; print $foo; @arr = (1,2,3); {local $" = "\n"; print "@arr\n"; } my $line = "Hello World"; substr($line,5,2) = "abc"; print $line; Why is sprintf rarely used in perl in comparison to similar (or the same) functions in other languages? my $subRef = sub {print shift;}; How is the subroutine above called with one parameter? How can the values of an associative array be placed in sorted order in a new array? What function is often necessary for building data structures to be passed to low-level routines such as ioctl and fcntl? sub foo { if (shift(@_) > 0) { shift; } } print foo(10,5); print foo(-10,5); What does the above sample for (my $i = 1; $i <= 3; $i++) { print 1..$i; print "\n"; } my $data = 5**3 * 12,2+2; print $data; sub foo { my $value = shift; if ($value) { print 1; shift; } else { return shift(@_) + 3; } } print foo(10,20); What is printed as the result of executing the above code? $var = 20; sub s1 { print "$var "; } sub s2 { local $var = 10; s1;} sub s3 { my $var = 30; s1;} s3; s2; s1; On systems that record file ownership, how may the owner of a file be identified? Which one of the following sets $y to be a copy of $x with every occurrence of foo changed to bar? Which one of the following is an array literal that represents a 4-element array containing the numbers 1, 4, 2, and 6? sub foo {2*shift || 'x';} printf ("%s %s %s", foo(5),foo(0),foo(-5)); What does the above sample code print? Suppose $x contains a number. Which one of the following statements sets $y to be a string containing the octal value of $x?

2 11037

Write an expression or perl script to identify the entered ip address is valid or not?

HCL,

5 13912

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??

2203

Why we use CGI?

Wipro,

2595

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

AppLabs,

2568

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

2362

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 ?"

Cisco, Oracle,

2452

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

3137


Post New CGI Perl Questions

Un-Answered Questions { CGI Perl }

Explain the various characteristics of perl.

1018


What does the qq{ } operator do?

1013


Suppose an array contains @arraycontent=(‘ab’, ‘cd’, ‘ef’, ‘gh’). How to print all the contents of the given array?

1024


What does next statement do in perl?

1058


Explain the internal working of cgi

979


How can you call a subroutine and identify a subroutine?

1036


What are the advantages of programming in perl?

1100


What syntax is used for grep() function?

1269


What is the use of -w, -t and strict in Perl?

1060


What is chomp() operator/function?

1123


What is 'commit' command in perl?

1143


Explain 'grep' function.

1032


What does `$result = f() .. g()' really return?

1298


you are required to replace a char in a string and store the number of replacements. How would you do that?

981


How many loop control keywords are there in perl?

993