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 4177

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 7641

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

Nokia,

8 29585

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

Nokia,

3 14960

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

emc2,

2 6668

How to sort dates in Perl ?

1 5706

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 3739

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 10935

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

HCL,

5 13758

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

2155

Why we use CGI?

Wipro,

2537

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

AppLabs,

2478

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

2293

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,

2396

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

3086


Post New CGI Perl Questions

Un-Answered Questions { CGI Perl }

What is epoch time in perl?

938


How to know whether a key exists or not in perl?

982


Explain chomp, chop, cpan, tk.

933


You want to add two arrays together. How would you do that?

881


Enlist the advantages of using c over perl?

916


How can you call a subroutine and identify a subroutine?

987


You want to concatenate strings with perl. How would you do that?

876


How do I read command-line arguments with Perl?

1018


How many loop control keywords are there in perl?

939


What are the various perl data types based on the context?

939


Which has the highest precedence, List or Terms? Explain?

891


If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}?

1009


How can you use Perl warnings and what is the importance to use them?

974


How to change a directory in perl?

927


How do I debug a perl program?

986