Publish Events & Email Alerts

Subscribe our email alerts and Publish your events with us

You'll Receive & Get Benefits :

Publish & Subscribe

 Technicalsymposium

Perl Materials-Free Download

• Question 54. What Are The Different Types Of Eval Statements?

Answer :

There are two different types of eval statements they are eval EXPR and eval BLOCK.

Eval EXPR executes an expression and eval BLOCK executes BLOCK. Eval Block executes an entire block, BLOCK. First one is used when you want your code passed in the expression and the second one is used to parse the code in the block. 

• Question 55. What Is Your Experience Of Interfacing Perl To Database?

Answer :

The correct answer is DBI

• Question 56. What Is Cpan ? What Are The Modules Coming Under This?

Answer :

CPAN is Comprehensive Perl Archive Network. It’s a repository contains thousands of Perl modules, source and documentation, and all under GNU/GPL or similar license. Some Linux distributions provide a tool named "cpan" with which you can install packages directly from CPAN 

• Question 57. Given A File, Count The Word Occurrence (case Insensitive)?

Answer :

open(FILE,"filename"); 

@array=; $wor="word to be found"; 

$count=0; foreach $line (@array) { @arr=split (/s+/,$line); 

foreach $word (@arr) { if ($word =~ /s*$wors*/i) $count=$count+1; } } 

print "The word occurs $count times";

• Question 58. How Do I Set Environment Variables In Perl Programs?

Answer :

As you may remember, "%ENV" is a special hash in Perl that contains the value of all your environment variables. 

Because %ENV is a hash, you can set environment variables just as you'd set the value of any Perl hash variable. Here's how you can set your PATH variable to make sure the following four directories are in your path:: 

$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/home/yourname/bin';

• Question 59. Why We Use Perl?

Answer :

1.Perl is a powerful free interpreter.

2.Perl is portable, flexible and easy to learn.

-For shell scripting

-For CGI 

-Tons of scripts are available.

-Easy development

-Enormous big support script archive like CPAN

-No one starts to write a Perl scripts from scratch, you choose one from an archive and modify that.

-It is a "mature" scripting language.

-You may find Perl interpreter on every mission critical environment

-Easy to learn

• Question 60. Why Does Perl Not Have Overloaded Functions?

Answer :

Because you can inspect the argument count, return context, and object types all by yourself. 

In Perl, the number of arguments is trivially available to a function via the scalar sense of @_, the return context via want array(), and the types of the arguments via ref() if they're references and simple pattern matching like /^d+$/ otherwise. In languages like C++ where you can't do this, you simply must resort to overloading of functions. 

• Question 61. Which Of These Is A Difference Between C++ And Perl?

Answer :

Perl can have objects whose data cannot be accessed outside its class, but C++ cannot.

Perl can use closures with unreachable private data as objects, and C++ doesn't support closures. Furthermore, C++ does support pointer arithmetic via `int *ip = (int*)&object', allowing you do look all over the object. Perl doesn't have pointer arithmetic. It also doesn't allow `#define private public' to change access rights to foreign objects. On the other hand, once you start poking around in /dev/mem, no one is safe. 

• Question 62. How To Concatenate Strings With Perl?

Answer :

Method #1 - using Perl's dot operator:

$name = 'checkbook';

$filename = "/tmp/" . $name . ".tmp";

Method #2 - using Perl's join function

$name = "checkbook";

$filename = join "", "/tmp/", $name, ".tmp";

Method #3 - usual way of concatenating strings

$filename = "/tmp/${name}.tmp";

• Question 63. What Is The Difference Between Chop & Chomp Functions In Perl?

Answer :

chop is used to remove last character,chomp function removes only line endings.

• Question 64. What Is Hash?

Answer :

Hash is an associative array where data is stored in

"key"->"value" pairs.

Eg : fruits is a hash having their names and price

%fruits = ("Apple", "60", "Banana", "20", "Peers", "40");

• Question 65. How Would You Replace A Char In String And How Do You Store The Number Of Replacements?

Answer :

$str='Hello';

$cnt= ($str=~s/l/i/g);

print $cnt;

• Question 66. How Do You Open A File For Writing?

Answer :

open FILEHANDLE, ">$FILENAME"

• Question 67. What's Your Favorite Module And Why?

Answer :

My Favourite module is CGI.pm Bcoz it can handle almost all the tasks like

1. parsing the form input

2. printiing the headers

3. can handle cookies and sessions and much more

• Question 68. How To Implement Stack In Perl?

Answer :

Stack is LIFO (Last in First out), In perl that could be inplemented using the push() and shift() functions. push() adds the element at the last of array and shift() removes from the beginning of an array. 

• Question 69. Why Do You Program In Perl?

Answer :

Perl is easy, fast and its fun to code in perl.

Perl is rich with various packages, N/w programming is very easy and there are lot more advantages to say.

• Question 70. How We Can Navigate The Xml Documents?

Answer :

You can use SAX if what you require is simple accesing of the xml structure. You can go for DOM if you need node handling capabilities like inserting a node, modifying a node, deleteing node and stuff like that. 

• Question 71. Help In Perl?

Answer :

perldoc -f print

• Question 72. What Is The Use Of "stderr()"?

Answer :

STDERR: 

The special filehandle for standard error in any package.

• Question 73. Advantages Of C Over Perl?

Answer :

In reality PERL interpreter is written in C. So what all advantages C have are also possesed by PERL. Otherwise C is faster than PERL, because PERL is an interpreted language. 

• Question 74. Perl Regular Expressions Are Greedy" What Does This Mean?

Answer :

Perl regular expressions normally match the longest string possible. that is what is called as "greedy match"

• Question 75. What Does The Word '&myvariable' Mean?

What Does The Symbol '&' Means? What's Purpose Of It?

Answer :

&myvariable is calling a sub-routine.

& is used to identify a sub-routine.

• Question 76. What Is Super?

Answer :

Super refers to current package ancestor.

• Question 77. What Is Rpc? Why Do I Need It?

Answer : RPC:A call to a procedure in a different address space. In a traditional procedure call, the calling procedure and the called procedure are in the same address space on one machine. In a remote procedure call, the calling procedure invokes a procedure in a different address space and usually on a different machine. 

• Question 78. What Does Init 5 And Init 0 Do?

Answer :

init 5 will shutdown and Power-off the server.

init 0 will bring the server to the ok> prompt (Fourth monitor)

• Question 79. What Does Ndd Do?

Answer :

ndd command will hardcore the speed of the network interface card.

• Question 80. What Is Obp And How Do You Access It?

Answer :

OBP is called as Open Boot PROM. This OBP can be accessiable thru ok> prompt

• Question 81. How Do You Boot From Cd-rom?

Answer :

Booting form CD-ROM can be done by the command

ok >boot cdrom

• Question 82. What Is /etc/system For?

Answer :

/etc/system is a kernal file of Solaris OS.

• Question 83. How Do You Boot From A Network With Jumpstart?

Answer :

boot net - install

• Question 84. What Is Jumpstart?

Answer : The Jumpstart feature is an automatic installation process available in the Solaris operating environment. It allows system administrators to categorize machines on their network and automatically install systems based on the category to which a system belongs. 

• Question 85. What Is Lom

Answer :

Short for LAN on motherboard. The term refers to a chip or chipset capable of network connections that has been embedded directly on the motherboard of a desktop, workstation or server. Instead of requiring a separate network interface card to access a local-area network, such as Ethernet, the circuits are attached to the motherboard. An advantage of a LOM system is an extra available PCI slot that is not being used by the network adapter. 

• Question 86. How To Create A Package?

Answer :

pkgmk -o -r / -d /tmp -f Prototype

• Question 87. How Do You View Shared Memory Statistics?

Answer :

swap -l -> displays swap usage

prstat -> examines all active processes on the system and reports statistics based

on the selected output mode and sort order

vmstat -> reports information about processes, memory, paging, block IO, traps,

and cpu activity

pmap -> lists the virtual memory mappings underlying the given process

• Question 88. What Is Vts?

Answer :

Sun Validation Test Suite -> tests and validates Sun hardware by verifying the configuration and functionality of hardware controllers, devices 

• Question 89. What Is Grep Used For In Perl?

Answer :

Grep is used with regular expression to check if a parituclar value exist in an array. it returns 0 if the value does not exists, 1 otherwise. 

• Question 90. How To Code In Perl To Implement The Tail Function In Unix?

Answer :

You have to maintain a structure to store the line number and the size of the file at that time eg. 1-10bytes, 2-18bytes.. you have a counter to increase the number of lines to find out the number of lines in the file. once you are through the file, you will know the size of the file at any nth line, use 'sysseek' to move the file pointer back to that position (last 10) and then start reading till the end. 

• Question 91. What Are The Arguements We Normally Use For Perl Interpreter

Answer : -e for Execute, -c to compile, -d to call the debugger on the file specified, -T for traint mode for security/input checking -W for show all warning mode (or -w to show less warning) 

• Question 92. What Is It Meants By '$_'?

Answer :

it is a default variable which holds automatically, a list of arguements passed to the subroutine within parenthesis.

• Question 93. What Is The Tk Module?

Answer :

it provides a GUI interface.

• Question 94. How To Concatinate Strings In Perl?

Answer :

through . operator

• Question 95. What Value Is Returned By A Lone 'return;' Statement?

Answer :

The undefined value in scalar context, and the empty list value () in list context. This way functions that wish to return failure can just use a simple return without worrying about the context in which they were called. 

• Question 96. How Do Find The Length Of An Array?

Answer :

$@array

• Question 97. What Does Read() Return At End Of File?

Answer :

A defined (but false) 0 value is the proper indication of the end of file for read() and sysread().

• Question 98. How Do You Print Out The Next Line From A Filehandle With All Its Bytes Reversed?

Answer :

print scalar reverse scalar Surprisingly enough, you have to put both the reverse and the into scalar context separately for this to work. 

• Question 99. What Does Perl Do If You Try To Exploit The Execve(2) Race Involving Setuid Scripts?

Answer :

Sends mail to root and exits. It has been said that all programs advance to the point of being able to automatically read mail. While not quite at that point (well, without having a module loaded), Perl does at least automatically send it. 

• Question 100. What Are Scalar Data And Scalar Variables?

Answer :

Perl has a flexible concept of data types. Scalar means a single thing, like a number or string. So the Java concept of int, float, double and string equals to Perl's scalar in concept and the numbers and strings are exchangeable. Scalar variable is a Perl variable that is used to store scalar data. It uses a dollar sign $ and followed by one or more aphanumeric characters or underscores. It is case sensitive. 

• Question 101. How To Start Perl In Interactive Mode?

Answer :

perl -e -d 1 PerlConsole.

• Question 102. What Package You Use To Create A Windows Services?

Answer :

use Win32::OLE.

• Question 103. What Is A Datahash()

Answer :

in Win32::ODBC, DataHash() function is used to get the data fetched through the sql statement in a hash format.

• Question 104. What Does This Symbol Mean '->'?

Answer :

In Perl it is an infix dereference operator. for array subscript, or a hash key, or a subroutine, then this must be a reference. can also be used as method invocation. 

• Question 105. What Is Cpan?

Answer :

CPAN is comprehensive Perl Archive Network. its a repository contains thousands of Perl Modules, source and documentation, and all under GNU/GPL or smilar licence. Some linux distribution provide a till names 'cpan'; which you can install packages directly from cpan. 

• Question 106. What Is The Difference Between Exec And System?

Answer :

exec runs the given process, switches to its name and never returns while system forks off the given process, waits for its to complete and then return. 

• Question 107. What Is The Difference Between For And Foreach?

Answer :

functionally, there is no difference between them.

• Question 108. What Is A Regular Expression?

Answer :

it defines a pattern for a search to match.

• Question 109. What Is Stderr() In Perl?

Answer :

special file handler to standard error in any package.

• Question 110. List The Files In Current Directory Sorted By Size ?

Answer : - ls -l | grep ^- | sort -nr

Source: Contents are provided by Technicalsymposium Google Group Members. 
Disclaimer: All the above contents are provided by technicalsymposium.com Google Group members. 
Further, this content is not intended to be used for commercial purpose. Technicalsymposium.com is not liable/responsible for any copyright issues.


Government Jobs

All State and Central Government Jobs/Railway & Bank Jobs/Alll Competitive Exams-Complete Details.

Software Jobs

Entry Level Software & IT Jobs in Chennai/Bangalore & Leading Metro Cities-Complete Details.

Conference/Symposium

Engineering Colleges & University /Premier Institute (IIT/IIM/etc.,) Events Details.

Off-Campus/Walk-in

All Software Companies & Core Companies Off-Campus Interviews & Walk-in across India-Complete Details.

All Bank Jobs

All Government Bank & Private Bank Jobs-Complete Details.

Internships

All Companies Internships-Complete Details.

IBPS

Probationary Officers/Clerk and Management Trainees & All IBPS Exams/Syllabus-Complete Details.

GATE

All Branches Syllabus & Question Papers-Free Download.

IES-Exam

Indian Engineering Services Syllabus & Question.Papers-Complete Details.

Software Program

Top Programming Source Codes/Lab Manuals with Solutions-Complete Details

Anna University

B.E/B.Tech/M.E/M.Tech/MCA/MBA Latest Syllabus & Question Papers

Scholarships

All Central & State Govt Scholarships/ International Scholarships/Merit Scholarships Details.

Placement Papers

All Companies Placement Papers with Answers - Free Download of Materials

Aptitude

All Aptitude Test Topics with Answers-Complete Details & Free Download

Technical Round Interview

All Companies Technical Round Interview Asked Questions with Answers

Certifications

All Certifications Software & All Branches Certifications-Complete Details.

Group Discussion

Group Discussion Various Topics with Valid Points-Complete Details.

HR Round

All HR Round Questions and Answers/Tips & Do's and Don'ts of HR Round.

General Job

Job Interview Tips & Do's/Dont's/Dress Codes/Body Language-Complete Details.

Placement ebooks

All Companies Placement Materials with Answers-Complete Details.

Technical Round Tips

All Kind of Technical Round Interview Tips and Answers/ Do's and Don'ts

Resume

Resume Writing Tips/Do's & Don'ts-Complete Details.

Career Pages

All MNC Companies Career Pages & Current Openings-Complete Details.

Software Projects

All Software Projects with Source Codes-Free Download & Details.

GRE

GRE Exam Procedure and Complete Details.

TOEFL

TOEFL Exam Procedure and Complete Details.

IELTS

IELTS Exam Procedure and Complete Details

SAT

SAT Exam Procedure and Complete Details

GMAT

GMAT Exam Procedure and Complete Details

MS in USA

MS in USA Procedure and Complete Details

Civil Engineering

Civil Engineering Lecture Notes for All Universities & Lab Manuals for All Semester.-Free Download

Mechanical Engineering

Mechanical Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Automobile Engineering

Automobile Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Computer Science

Computer Science Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Information Technology

Information Technology Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

MBA

MBA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Biotechnology

Biotechnology Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Biomedical

Biomedical Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Aeronautical Engineering

Aeronautical Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download

Chemical Engineering

Chemical Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Electronics & Communication

Electronics & Communication Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Electrical & Electronics

Electrical & Electronics Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

MCA

MCA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

B.Sc

B.Sc All Branches (Maths/Physics/Computer Science/Electronics/etc.,)-Lecture Notes-Free Download

BCA

BCA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

BBA

BBA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

M.Sc

M.Sc All Branches (Maths/Physics/Computer Science/Electronics/etc.,)-Lecture Notes-Free Download

M.Com

M.Com Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Engineering Maths

All Semester Engineering Maths (M1/M2/M3/M4/etc.,) Lecture Notes-Free Download

Engineering EBooks

All Engineering Branches of ebooks Free Download-Complete Details.

Engineering Physics

All Semester Engineering Physics Lecture Notes-Free Download

GATE Preparation Books

All Branches of GATE Free Preparation eBooks-Free Download.

Engineering Chemistry

All Semester Engineering Chemistry Lecture Notes-Free Download

Software Companies Info

All Software Companies in India - Complete Details.

Admission

Foreign Universities All Course Admission Procedures-Complete Details.

Software Ebooks

All Programming Software free Eboooks-Free Download.

Web Hosting

All Web Hosting Procedure-Complete Details.