Interview Helper
Translate Page To German Tranlate Page To Spanish Translate Page To French Translate Page To Italian Translate Page To Japanese Translate Page To Korean Translate Page To Portuguese Translate Page To Chinese
[Valid RSS feed]
 
Number Times Read : 4535    
 
  Go To Article :    
Categories

Air India (2)
Campus Interviews (505)
Career Helper (6)
Certification Dumps (10)
Code Samples (118)
Competitive Exams (163)
Interview Questions (4686)
Test Dev (0)
Test Director (25)
test... (0)
test_php (0)
Walkin Interviews (20)
 
Stats
Total Articles: 4534
Total Authors: 781
Total Downloads: 1183168


Newest Member
sukhvir chahal
 
   

Question Popularity: 99 or more times read
Submitted 2008-11-05 10:13:07 [Valid RSS feed]


Perl Interview Questions






What is Perl one-liner?

There are two ways a Perl script can be run:

a)from a command line, called one-liner, that means you type and execute immediately on the command line. You'll need the -e option to start like "C: %gt perl -e "print "Hello";". One-liner doesn't mean one Perl statement. One-liner may contain many statements in one line.

b)from a script file, called Perl program.

Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}?

${var} is the lexical variable $var, and ${"var"} is the dynamic variable $var.

Note that because the second is a symbol table lookup, it is disallowed under `use strict "refs"'. The words global, local, package, symbol table, and dynamic all refer to the kind of variables that local() affects, whereas the other sort, those governed by my(), are variously knows as private, lexical, or scoped variable.

Name all the prefix dereferencer in perl?

The symbol that starts all scalar variables is called a prefix dereferencer. The different types of dereferencer are.

(i) $-Scalar variables

(ii) %-Hash variables

(iii) @-arrays

(iv) &-subroutines

(v) Type globs-*myvar stands for @myvar, %myvar.

Explain about an ivalue?

An ivalue is an item that can serve as the target of an assignment. The term I value originally meant a “left value”, which is to say a value that appears on the left. An ivalue usually represents a data space in memory and you can store data using the ivalues name. Any variable can serve as an ivalue.

What exactly is grooving and shortening of the array?

You can change the number of elements in an array simply by changing the value of the last index of/in the array $#array. In fact, if you simply refer to a non existent element in an array perl extends the array as needed, creating new elements. It also includes new elements in its array.

What are the three ways to empty an array?

The three different ways to empty an array are as follows

1) You can empty an array by setting its length to a negative number.

2) Another way of empting an array is to assign the null list ().

3) Try to clear an array by setting it to undef, but be aware when you set to undef.

How do you work with array slices

An array slice is a section of an array that acts like a list, and you indicate what elements to put into the slice by using multiple array indexes in square brackets. By specifying the range operator you can also specify a slice.

What is meant by splicing arrays explain in context of list and scalar.

Splicing an array means adding elements from a list to that array, possibly replacing elements now in the array. In list context, the splice function returns the elements removed from the array. In scalar context, the splice function returns the last element removed.

What are the different types of perl operators?

There are four different types of perl operators they are

(i) Unary operator like the not operator

(ii) Binary operator like the addition operator

(iii) Tertiary operator like the conditional operator

(iv) List operator like the print operator

Related Stuff
Answers
Example perl one liners for command line use, a summary of important perl command line arguments, and how to convert between 1-liners and full Perl scripts. This page assumes the reader has a reasonable amount of Perl experience. Consult sites like learn.perl.org and Perl Monks to learn more about Perl, or visit the #perl channel on the Freenode IRC network. Also consider the book Minimal Perl by Tim Maher, which covers one liner style Perl in great detail... Term papers

Submitted By:

Johndecruse

On:

01-02-2010        

New Members
select
Sign up
select
learn more
Affiliate Sign in
Affiliate Sign In
 
Nav Menu
Home
Login
Submit Articles
Submission Guidelines
Top Articles
Link Directory
About Us
Contact Us
Privacy Policy
RSS Feeds

Actions
Print This Article
Add To Favorites

 
Sponsors

 

All Rights Reserved Interview Helper

Proudly associated with Job Interview Helper | Interviewhelper Articles