Data Warehousing (1107) Databases (3004) JAVA Related 2673) MainFrames (975) Microsoft Related (2296) Networking (553)
Operating Systems (919) Programming (3254) SAP (2318) Testing FAQS (1674) Testing Material (252) Web Related (994)

what is '1000 projects'?

'fullinterview.com' is a educational content website dedicated to finding and realizing final year projects for btech, be, mtech, mca students, here you can search, find your projects and get guidance from experts the below are the different technological projects.
visual Studio projects .net projects, asp projects, c & ds projects, c++ projects (all), cold fusion projects, delphi projects, java projects, perl projects, php projects, sql projects, vc++ projects, visual basic projects.

how it works?

well, everything on this site is submitted by the student and professional community. after you submit your project, it is being verified and approved by our administrator. after approval, other people can read/discuss it, save to favorites.

more number of projects?

here you can find morethan 1000 projects on different technologies, if u want to get more projects please visit our sister sites www.fullinterview.com & Chetanasprojects.com


Category Articles
What exactly is grooving and shortening of the array??
Added on Sat, Nov 21, 2009
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... Read More
Write a simple regular expression to match an IP address, e-mail address, city-state-zipcode
Added on Fri, Nov 20, 2009
combination. /([0-255])(.)$11$11$1/; Read More
Explain about Typeglobs?
Added on Sat, Nov 21, 2009
Type globs are another integral type in perl. A typeglob`s prefix derefrencer is *, which is also the wild card character because you can use typeglobs to create an alias for all types associated with a particular name. All kinds of... Read More
what does ’qw()’ mean? what’s the use of it
Added on Thu, Nov 19, 2009
qw is a construct which quotes words delimited by spaces. use it when you have long list of words that are nto quoted or youjust do not want to type those quotes as youtype out a list of space delimited words. like @a = qw(1234) which is like @a=("1"... Read More
What’s the significance of @ISA, @EXPORT @EXPORT_OK %EXPORT_TAGS list & hashes in a perl package? With example?
Added on Sat, Nov 21, 2009
@ISA ->  each package has its own @ISA array. this array keep track of classes it is inheriting. ex: package child; @ISA=( parentclass); @EXPORT this array stores the subroutins to be exported from... Read More
Name all the prefix dereferencer in perl?
Added on Sat, Nov 21, 2009
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... Read More
How to dereference a reference?
Added on Thu, Nov 19, 2009
There are a number of ways to dereference a reference. Using two dollar signs to dereference a scalar. $original = $$strref; Using @ sign to dereference an array. @list = @$arrayref; Similar for hashes Read More
How do I write OO programs in Perl?
Added on Sat, Nov 21, 2009
Put -00 on your #! line, like this:         #!/usr/bin/perl -00 -w Read More
What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash??
Added on Sat, Nov 21, 2009
length() is a built-in prototyped as sub length($), and a scalar prototype silently changes aggregates into radically different forms. The scalar sense of a hash is false (0) if it’s empty, otherwise it’s a string... Read More
what does the word ’&myvariable’ mean? what does the symbol ’&’ means? What’s purpose of it?
Added on Sat, Nov 21, 2009
&myvariable is calling a sub-routine. & is used to identify a sub-routine. Read More
Why is it hard to call this function: sub y { "because" }
Added on Thu, Nov 19, 2009
. Because y is a kind of quoting operator. The y/// operator is the sed-savvy synonym for tr///. That meAns y(3) would be like tr(), which would be looking for a second string, as in tr/a-z/A-Z/, tr(a-z)(A-Z), or tr[a-z][A-Z]. Read More
1.What happens when you return a reference to a private variable?
Added on Sat, Nov 21, 2009
Perl keeps track of your variables, whether dynamic or otherwise, and doesn’t free things before you’re done using them. Read More
Print this array @arr in reversed case-insensitive order
Added on Thu, Nov 19, 2009
@solution = sort {lc $a comp lc$b } @arr Read More
How to substitute a particular string in a file containing million of record?
Added on Thu, Nov 19, 2009
perl -p -ibak -e ’s/search_str/replace_str/g’ filename Read More
Which has the highest precedence, List or Terms? Explain?
Added on Sat, Nov 21, 2009
Terms have the highest precedence in perl. Terms include variables, quotes, expressions in parenthesis etc. List operators have the same level of precedence as terms. Specifically, these operators have very strong left word precedence Read More
What does read() return at end of file?
Added on Thu, Nov 19, 2009
0 A defined (but false) 0 value is the proper indication of the end of file for read() and sysread(). Read More
I have a variable named $objref which is defined in main package. I want to make it as a Object of class XYZ. how could I do it?
Added on Thu, Nov 19, 2009
use XYZ my $objref =XYZ -> new() OR, bless $objref, ’XYZ’ Read More
How do you view shared memory statistics?
Added on Sat, Nov 21, 2009
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,... Read More
What is the difference between die and exit ?
Added on Thu, Nov 19, 2009
Die prints out stderr message in the terminal before exiting the program while exit just terminate the program without giving any message. Die also can evaluate expressions before exiting. Read More
what is your favorite module in Perl?
Added on Thu, Nov 19, 2009
CGI and DBI. CGI(Common Gateway Interface) because we do not need to worry about the subtle features of form processing. Read More
what does this symbol mean ’->’?
Added on Thu, Nov 19, 2009
In Perl it is an infix dereference operator. for array subscript, or a hash key, or a subroutine, then the ihs must be a reference. can also be used as method invocation Read More
what is it meant by @ISA, @EXPORT, @EXPORT_0?
Added on Thu, Nov 19, 2009
@ISA -> each package has its own @ISA array. this array keep track of classes it is inheriting. ex: package child; @ISA=( parentclass); @EXPORT this array stores the subroutins to be exported from a module. @EXPORT_OK this array stores the... Read More
How to start Perl in interactive mode?
Added on Thu, Nov 19, 2009
perl -e -d 1 PerlConsole Read More
Assume both a local($var) and a my($var) exist, what’s the difference between ${var} and ${"var"}?
Added on Thu, Nov 19, 2009
${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... Read More
How to read from a pipeline with Perl?
Added on Thu, Nov 19, 2009
To run the date command from a Perl program, and read the output of the command, all you need are a few lines of code like this: open(DATE, "date|"); $theDate = ; close(DATE); The open() function runs the external date command, then opens a file... Read More
How to read file into hash array ?
Added on Thu, Nov 19, 2009
open(IN, ") { chomp; $hash_table{$_} = 0; } close IN; print "$_ = $hash_table{$_} " foreach keys %hash_table; Read More
When would `local $_’ in a function ruin your day?
Added on Thu, Nov 19, 2009
When your caller was in the middle for a while(m//g) loop The /g state on a global variable is not protected by running local on it. That’ll teach you to stop using locals. Too bad $_ can’t be the target of a my() -- yet. Read More
Explain the difference between use and require?
Added on Fri, Nov 20, 2009
Use : 1. The method is used only for the modules(only to include .pm type file) 2. The included objects are varified at the time of compilation. 3. No Need to give file extension.   Require: 1. The method is used... Read More
I was asked how to implement the unix tail command in perl $ tail.pl t.txt 10 (display last 10 lines) I kind of managed with the simple ARRAY and they playing around with the $<hash>Array etc but he wanted not without an array
Added on Fri, Nov 20, 2009
you can use the following shell command in your perl script .  `cat filename|tail -10f ;`   This may not be accepted as well. But this can be done in numerous ways ! One way is here : ... Read More
what’s is the use of ’require’ and what does this mean?
Added on Fri, Nov 20, 2009
require loads the code at run time. if the require file is not listed in the directory it produces an fatal error. Read More
what is a Tk module? WHere it is used? What’s the use of it? Plse tell me ..
Added on Sat, Nov 21, 2009
It provides a GUI Read More
What is difference between perl and jsp.What are the Advantages
Added on Sat, Nov 21, 2009
if the code inside a page gets too big, or if you want to use it elsewhere, you can cut it out, make it into a Java class, and invoke it from anywhere in your application (even not from a page). With Perl, you’re stuck inside the... Read More
What is LOM
Added on Sat, Nov 21, 2009
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... Read More
How do you get system diagnostics information??
Added on Sat, Nov 21, 2009
prtdiag -v -> Shows mem, cpu, Power supply, add-on cards info, LEd status iostat -En -> Shows disk status.(look for hard error) /var/adm/messages -> Logs most commont failures and the entire system events ... Read More
Why do you use Perl?
Added on Sat, Nov 21, 2009
Perl is a powerful free interpreter. Perl is portable, flexible and easy to learn. Read More
How do I do < fill-in-the-blank > for each element in a hash??
Added on Sat, Nov 21, 2009
Here’s a simple technique to process each element in a hash: #!/usr/bin/perl -w %days = ( ’Sun’ =>’Sunday’, ’Mon’ => ’Monday’, ’Tue... Read More
How do I replace every <TAB> character in a file with a comma?
Added on Sat, Nov 21, 2009
perl -pi.bak -e ’s/ /,/g’ myfile.txt What is the easiest way to download the contents of a URL with Perl? Once you have the libwww-perl library, LWP.pm installed, the code is this: #!/usr/bin/perl use LWP:... Read More
How many ways can we express string in Perl??
Added on Sat, Nov 21, 2009
Many. For example ’this is a string’ can be expressed in: "this is a string" qq/this is a string like double-quoted string/ qq^this is a string like double-quoted string^ q/this is a string/ q&... Read More
How do I clear the screen?
Added on Sat, Nov 21, 2009
Use this function:         sub clear_the_screen {           print $ x 1_000_000;         } Read More
How do I sort a hash numerically?
Added on Sat, Nov 21, 2009
        %sorted = sort {$a <=> $b} %hash; Read More
How do I sort a 2-D array?
Added on Sat, Nov 21, 2009
You need to use a data structure that is more suited to your problem. 2-D Arrays, being rectangular, can be difficult to sort. If you instead use a triangular data structure, such as a heap, you need only hold it with the point downward,... Read More
How to code in Perl to implement the tail function in unix??
Added on Sat, Nov 21, 2009
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... Read More
What are the three ways to empty an array??
Added on Sat, Nov 21, 2009
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... Read More
1.What does Perl do if you try to exploit the execve(2) race involving setuid scripts?
Added on Sat, Nov 21, 2009
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. Read More
what is the difference between ’use’ and ’require’ function?
Added on Thu, Nov 19, 2009
Use: 1. the method is used only for modules (only to include .pm type file) 2. the included object are verified at the time of compilation. 3. No Need to give file extentsion. Require: 1. The method is used for both libraries ( package ) and modules... Read More
What is the use of ’chomp’ ? what is the difference between ’chomp’ and ’chop’?
Added on Thu, Nov 19, 2009
’chop’ functiononly removes the last character completely ’from the scaler, where as ’chomp’ function only removes the last character if it is a newline. by default, chomp only removes what is currently defined as the ... Read More
What is ’->’ in Perl?
Added on Thu, Nov 19, 2009
it is a symbolic link to link one file name to a new name. so lets say we do it like file1-> file2, if we read file1, we end up reading file2 Read More
how do you check the return code of system call?
Added on Thu, Nov 19, 2009
System calls "traditionally" returns 9 when successful and 1 when it fails. system (cmd) or die "Error in command" Read More
<Hash>create directory if not there
Added on Thu, Nov 19, 2009
Q:  #create directory if not there if (! -s "$temp/engl_2/wf"){ System "mkdir -p $temp/engl_2/wf"; } if (! -s "$temp/backup_basedir"){ system "mkdir -p $temp/backup_basedir"; } ${pack_2} = -M "${temp}/engl_2/wf/${wf_package_name}.data"; $... Read More
what is meant by a ’pack’ in perl?
Added on Thu, Nov 19, 2009
 Pack Converts a list into a binary representation. Takes an array or list of values and packs it into a binary structure, returning the string containing the structure It takes a LIST of values and converts it into a string. The string... Read More
how to implement stack in Perl?
Added on Thu, Nov 19, 2009
through push() and shift() function. push adds the element at the last of array and shift() removes from the beginning of an array. Read More
What is Grep used for in Perl?
Added on Thu, Nov 19, 2009
Grep is used with regular expression to check if a parituclar value exist in an array. it returns 0 it the value does not exists, 1 otherwise. Read More
How to code in Perl to implement the tail function in unix?
Added on Thu, Nov 19, 2009
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,... Read More
Explain the difference between ’my’ and ’local’ variable scope declarations?
Added on Thu, Nov 19, 2009
Both of them are used to declare local variables. The variables declared with ’my’ can live only within the block and cannot gets its visibility inherited fucntions called within that block, but one defined as ’local’ canlive... Read More
How do you navigate thorugh an XML documents?
Added on Thu, Nov 19, 2009
You can use the XML::DOM navigation methods to navigate thorugh an XML::DOM node tree and use the getnodevalue to recover the data. DOM Parser is used when it is neede to do node operation. Instead we may use SAX parser if you require simple... Read More
what is it meants by ’$_’?
Added on Thu, Nov 19, 2009
it is a default variable which holds automatically, a list of arguements passed to the subroutine within parentheses. Read More
How to connect to sql server through Perl?
Added on Thu, Nov 19, 2009
We use the DBI(Database Independent Interface) module to connect to any database. use DBI; $dh = DBI->connect("dbi:mysql:database=DBname","username","password"); $sth = $dh-> prepare("select name, symbol from table"); $sth->execute(); while(... Read More
What is the purpose of -w,strict and -T?
Added on Thu, Nov 19, 2009
-w option enables warning - strict pragma is used when you should declare variables before their use -T is taint mode. TAint mode makes a program more secure by keeping track of arguments which are passed from external source. Read More
where do you go for perl help?
Added on Thu, Nov 19, 2009
perldoc command with -f option is the best. i also go to search.cpan.org for help Read More
what is the Tk module?
Added on Thu, Nov 19, 2009
it provides a GUI interface Read More
What is hash in perl?
Added on Thu, Nov 19, 2009
A hash is like an associative array, in that it is a collection of scalar data, with individual elements selected by some index value which essentially are scallars and called as keys. Each key corresponds to some value. Hashes are represented by %... Read More
what is stderr() in perl?
Added on Thu, Nov 19, 2009
special file handler to standard error in any package Read More
what is a regular expression?
Added on Thu, Nov 19, 2009
it defines a pattern for a search to match Read More
what is the difference between for and foreach?
Added on Thu, Nov 19, 2009
functionally, there is no difference between them. Read More
what is the difference between exec and system?
Added on Thu, Nov 19, 2009
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 Read More
What is CPAN?
Added on Thu, Nov 19, 2009
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. you can go to www.cpan.org for more details. Some linux distribution provide a till... Read More
what is a DataHash()
Added on Thu, Nov 19, 2009
in Win32::ODBC, DataHash() function is used to get the data fetched thorugh the sql statement in a hash format. Read More
what is the difference between C and Perl?
Added on Thu, Nov 19, 2009
make up Read More
what does the world ’&my variable’ mean?
Added on Thu, Nov 19, 2009
&myvariable is calling a sub-routine. & is used to indentify a subroutine Read More
what package you use to create a windows services?
Added on Thu, Nov 19, 2009
use Win32::OLE Read More
what is the difference between CPP and Perl?
Added on Thu, Nov 19, 2009
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 ... Read More
How to open and read data files with Perl?
Added on Thu, Nov 19, 2009
Data files are opened in Perl using the open() function. When you open a data file, all you have to do is specify (a) a file handle and (b) the name of the file you want to read from. As an example, suppose you need to read some data from a file... Read More
How do i do fill_in_the_blank for each file in a directory?
Added on Thu, Nov 19, 2009
#!/usr/bin/perl -w opendir(DIR, "."); @files = readdir(DIR); closedir(DIR); foreach $file (@files) { print "$file "; } Read More
how do i generate a list of all .html files in a directory
Added on Thu, Nov 19, 2009
here is a snippet of code that just prints a listing of every file in teh current directory. that ends with the entension #!/usr/bin/perl -w opendir(DIR, "."); @files = grep(/.html$/,readdir(DIR)); closedir(DIR); foreach $file (@files) { print "$file... Read More
What are scalar data and scalar variables?
Added on Thu, Nov 19, 2009
. 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... Read More
Assuming $_ contains HTML, which of the following substitutions will remove all tags in it?
Added on Thu, Nov 19, 2009
You can’t do that. If it weren’t for HTML comments, improperly formatted HTML, and tags with interesting data like < SCRIPT >, you could do this. Alas, you cannot. It takes a lot more smarts, and quite frankly, a real parser Read More
I want users send data by formmail but when they send nothing or call it from web site they will see error.
Added on Thu, Nov 19, 2009
Q.    I  want users send data by formmail but when they send nothing or call it from web site they will see error. codes in PHP like this: if (isset($HTTP_POST_VARS)){ .......... } else{ echo ("error lalalalal") } How it will look... Read More
What is the output of the following Perl program? 1 $p1 = "prog1.java"; 2 $p1 =~ s/(.*).java/$1.cpp/; 3 print "$p1n
Added on Thu, Nov 19, 2009
prog1.cpp Read More
Why aren’t Perl’s patterns regular expressions?
Added on Thu, Nov 19, 2009
Because Perl patterns have backreferences. A regular expression by definition must be able to determine the next state in the finite automaton without requiring any extra memory to keep around previous state. A pattern /([ab]+)c1/ requires the state... Read More
How do I do < fill-in-the-blank > for each element in a hash?
Added on Thu, Nov 19, 2009
Here’s a simple technique to process each element in a hash: #!/usr/bin/perl -w %days = ( ’Sun’ =>’Sunday’, ’Mon’ => ’Monday’, ’Tue’ => ’Tuesday’, ’Wed&rsquo... Read More
How do you print out the next line from a filehandle with all its bytes reversed?
Added on Thu, Nov 19, 2009
. print scalar reverse scalar Surprisingly enough, you have to put both the reverse and the into scalar context separately for this to work. Read More
How do I send e-mail from a Perl/CGI program on a Unix system?
Added on Thu, Nov 19, 2009
Sending e-mail from a Perl/CGI program on a Unix computer system is usually pretty simple. Most Perl programs directly invoke the Unix sendmail program. We’ll go through a quick example here.Assuming that you’ve already have e-mail... Read More
What does `$result = f() .. g()’ really return?
Added on Thu, Nov 19, 2009
False so long as f() returns false, after which it returns true until g() returns true, and then starts the cycle again. This is scalar not list context, so we have the bistable flip-flop range operator famous in parsing of mail messages, as in `... Read More
Why does Perl not have overloaded functions?
Added on Thu, Nov 19, 2009
. 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 wantarray(), and the types of the... Read More
how do find the length of an array?
Added on Thu, Nov 19, 2009
$@array Read More
What value is returned by a lone `return;’ statement?
Added on Thu, Nov 19, 2009
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. Read More
What’s the difference between /^Foo/s and /^Foo/?
Added on Thu, Nov 19, 2009
The second would match Foo other than at the start of the record if $* were set. The deprecated $* flag does double duty, filling the roles of both /s and /m. By using /s, you suppress any settings of that spooky variable, and force your carets and... Read More
Does Perl have reference type?
Added on Thu, Nov 19, 2009
Yes. Perl can make a scalar or hash type reference by using backslash operator. For example $str = "here we go"; # a scalar variable $strref = $str; # a reference to a scalar @array = (1..10); # an array $arrayref = @array; # a reference to an array... Read More
What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash?
Added on Thu, Nov 19, 2009
5 length() is a built-in prototyped as sub length($), and a scalar prototype silently changes aggregates into radically different forms. The scalar sense of a hash is false (0) if it’s empty, otherwise it’s a string representing the... Read More
If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}?
Added on Thu, Nov 19, 2009
The second is disallowed under `use strict "refs"’. Dereferencing a string with *{"STR"} is disallowed under the refs stricture, although *{STR} would not be. This is similar in spirit to the way ${"STR"} is always the symbol table variable,... Read More
How do I do < fill-in-the-blank > for each element in an array?
Added on Thu, Nov 19, 2009
#!/usr/bin/perl -w @homeRunHitters = (’McGwire’, ’Sosa’, ’Maris’, ’Ruth’); foreach (@homeRunHitters) { print "$_ hit a lot of home runs in one year "; } Read More
What is the easiest way to download the contents of a URL with Perl?
Added on Thu, Nov 19, 2009
Once you have the libwww-perl library, LWP.pm installed, the code is this: #!/usr/bin/perl use LWP::Simple; $url = get ’http://www.websitename.com/’; Read More
how to concatinate strings in Perl?
Added on Thu, Nov 19, 2009
through . operator Read More
How do I read command-line arguments with Perl?
Added on Thu, Nov 19, 2009
With Perl, command-line arguments are stored in the array named @ARGV. $ARGV[0] contains the first argument, $ARGV[1] contains the second argument, etc. $#ARGV is the subscript of the last element of the @ARGV array, so the number of arguments on the... Read More
What happens to objects lost in "unreachable" memory..... ?
Added on Thu, Nov 19, 2009
What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }’ ? Their destructors are called when that interpreter thread shuts down. When the interpreter exits,... Read More
Assume that $ref refers to a scalar, an array, a hash or to some nested data structure. Explain the following statements:
Added on Thu, Nov 19, 2009
$$ref; # returns a scalar $$ref[0]; # returns the first element of that array $ref- > [0]; # returns the first element of that array @$ref; # returns the contents of that array, or number of elements, in scalar context $&$ref; # returns the... Read More
How do I print the entire contents of an array with Perl?
Added on Thu, Nov 19, 2009
To Answer this question, we first need a sample array. Let’s assume that you have an array that contains the name of baseball teams, like this: @teams = (’cubs’, ’reds’, ’yankees’, ’dodgers’); If... Read More
Perl uses single or double quotes to surround a zero or more characters. Are the single(’ ’) or double quotes (" ") identical?
Added on Thu, Nov 19, 2009
They are not identical. There are several differences between using single quotes and double quotes for strings. 1. The double-quoted string will perform variable interpolation on its contents. That is, any variable references inside the quotes will... Read More
How do you give functions private variables that retain their values between calls?
Added on Thu, Nov 19, 2009
Create a scope surrounding that sub that contains lexicals. Only lexical variables are truly private, and they will persist even when their block exits if something still cares about them. Thus: { my $i = 0; sub next_i { $i++ } sub last_i { --$i } }... Read More
Explain the difference between the following in Perl: $array[3] vs. $array->[3]
Added on Thu, Nov 19, 2009
because Perl’s basic data structure is all flat, references are the only way to build complex structures, which meAns references can be used in very tricky ways. This question is easy, though. In $array[3], "array" is the (symbolic) name of an... Read More
how to remove duplicates from an array?
Added on Thu, Nov 19, 2009
There is one simple and elegant solution for removing duplicates from a list in PERL @array = (2,4,3,3,4,6,2); my %seen = (); my @unique = grep { ! $seen{ $_ }++ } @array; print "@unique"; Read More
What is perl?
Added on Thu, Nov 19, 2009
perl is a programming language based off of C, shell, Lisp and a few other things. It is mostly used for OS program, network operations and some website development (mostly cgi). Read More
Write a script for ’count the no.of digits using regular expressions in perl..
Added on Thu, Nov 19, 2009
#!/usr/bin/perl -w   use strict; my($test,$number) = ("",""); $test = "12344tyyyyy456"; $number = ($test =~ tr/[0-9]/[0-9]/); print "Number of digits in variable is :- $number "; exit; Read More
When would you use Perl for a project?
Added on Fri, Nov 20, 2009
When would you use Perl for a project?   1. When you are developing an application for a real time system in which processing speed is of utmost importance   When to use Perl 1. For large text... Read More
How would you replace a char in string and how do you store the number of replacements?
Added on Fri, Nov 20, 2009
$str=’Hello’; $cnt= ($str=~s/l/i/g); print $cnt; Read More
How do you open a file for writing?
Added on Fri, Nov 20, 2009
open FILEHANDLE, ">$FILENAME" Read More
What is the difference between for & foreach, exec & system?
Added on Fri, Nov 20, 2009
Technically, there’s no difference between for and foreach other than some style issues.   One is an alias of another. You can do things like this foreach (my $i = 0; $i < 3; ++$i) { # normally this is... Read More
What?s your favorite module and why?
Added on Fri, Nov 20, 2009
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 Read More
Explain the difference between my and local?
Added on Fri, Nov 20, 2009
The variables declared with "my" can live only within the block it was defined and there is no visibility to inherited functions which were called within that block, but one defined with "local" they can live within the block... Read More
How do you check the return code of a command in Perl
Added on Fri, Nov 20, 2009
system calls *traditionally* returns 0 when successful and 1 when it fails. system ( cmd ) && die "Error - could run cmdn"; Read More
How to substitute a particular string in a file containing millions of records?
Added on Fri, Nov 20, 2009
perl -p -i.bak -e ’s/search_str/replace_str/g’  filename... Read More
I have a variable named $objref which is defined in main package. I want to make it as a Object of Class XYZ. How could I do it??
Added on Fri, Nov 20, 2009
bless $objref,’XYZ’; Read More
What is eval in perl?
Added on Fri, Nov 20, 2009
 "eval" and "if ($@)" is the equivalent of a try/catch in the C programming world. My question is how to basically throw an error in one perl script that can be caught by another Consider the following example: ... Read More
What is Grep used for in Perl??
Added on Fri, Nov 20, 2009
You can able check the array contains a particular value is exist or not? For example see the below code. @array = (1,2,3,4,5,6,7,8,100,200,500); # array $result = grep(/600/, @array); # checking the value. print... Read More
why do you program in PERL
Added on Fri, Nov 20, 2009
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. Read More
How we can navigate the XML documents?
Added on Fri, Nov 20, 2009
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. Read More
How to remove a directory which has few files in it? I know about rmdir however it does not remove a dir which has files/dir in it!
Added on Fri, Nov 20, 2009
rmtree($dir) ;   Read More
What arguments do you frequently use for Perl Interpreter and what do they mean
Added on Fri, Nov 20, 2009
The various command line arguments are -e executes the prog given as an argument-d start perl debugger on the file name specified as an argument-c compile the file given as an argumentThanks -T for taint mode for security... Read More
what does this mean : ’$_’ ?
Added on Fri, Nov 20, 2009
It is a default variable which hold automatically the list of arguments passed to subroutines within parentheses. Read More
What is @_ ?
Added on Fri, Nov 20, 2009
It is an array that contains all the data that is passed to a function. Read More
what are the characteristics of project that is well suited to PERL?
Added on Fri, Nov 20, 2009
actually it is used in automation testing....as a tester i am using per script for automation testing like running the tools etc. Read More
How to Connect with SqlServer from perl and how to display database table info?
Added on Fri, Nov 20, 2009
In perl we have DBI module to connect to any database. step1: we need to intialise the DBI module use DBI; step2 : connect to database using DBI module which reutrns database handle $dh = DBI->connect("dbi... Read More
What is the difference between die and exit in perl?
Added on Sat, Nov 21, 2009
die: outputs stderr then exit and also it can trap errors by evalexit: just exits or exit with EXPR Read More
Help in perl?
Added on Sat, Nov 21, 2009
perldoc -f print Read More
what does ’qw(..)’ mean? What’s the use of it? when do we use it?
Added on Sat, Nov 21, 2009
the quoting opeator for lists is qw.advantage of qw is you need not quote the strings in additional way as qw already does quoting. Read More
What is the difference between a perl program and a shell script? Which out of these is easier to understand and execute? And How?
Added on Sat, Nov 21, 2009
Whatever you want to write in shell script is possible in perl..the only diff is its easy to maintain and write perl scripts then shell.. lots of module etc are available for perl... u not need to rit everything frm scratch...also since... Read More
what is the use of "STDERR()"?
Added on Sat, Nov 21, 2009
STDERRThe special filehandle for standard error in any package. Read More
What is CPAN ? What are the modules coming under this?
Added on Sat, Nov 21, 2009
CPAN ic Comprehencive Perl Archive Network. Its a repository contains thousands of Perl modules, source and documentation, and all under GNU/GPL or similar licence. you can go to www.cpan.org for more details. Some Linux distributions... Read More
what is a DataHash(). What does it mean? and for what purpose it is used??
Added on Sat, Nov 21, 2009
In Win32::ODBC, DataHash() function is used to get the data fetched through the sql statement in a hash format. Read More
what’s your experience of interfacing perl to database?
Added on Sat, Nov 21, 2009
advantages of C over perl?
Added on Sat, Nov 21, 2009
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. Read More
what is a subroutine?
Added on Sat, Nov 21, 2009
 A subroutine is like a function ... called upon to excecute a task. Read More
What is super?
Added on Sat, Nov 21, 2009
Super refers to current package ancestor. Read More
what are the Predefined Names in Perl ?
Added on Sat, Nov 21, 2009
The following names have special meaning to perl. I could have used alphabetic symbols for some of these, but I didn’t want to take the chance that someone would say reset "a-zA-Z" and wipe them all out. You’ll just have to... Read More
What is RPC? Why do I need it?
Added on Sat, Nov 21, 2009
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... Read More
What does ndd do?
Added on Sat, Nov 21, 2009
ndd command will hardcore the speed of the network interface card. Read More
What is OBP and how do you access it?
Added on Sat, Nov 21, 2009
OBP is called as Open Boot PROM. This OBP can be accessiable thru ok> prompt (Fourth monitor) Read More
How do you get system diagnostics information?
Added on Sat, Nov 21, 2009
You can get system diagonostics information thru prtdiag command. And you can execute this command by /usr/platform/’uname -m’/sbin/prtdiag -v|more Read More
How do you boot from CD-ROM?
Added on Sat, Nov 21, 2009
Booting form CD-ROM can be done by the command ok >boot cdrom Read More
What is /etc/system for?
Added on Sat, Nov 21, 2009
/etc/system is a kernal file of Solaris OS. Read More
What does fmthard do?
Added on Sat, Nov 21, 2009
fmthard will create partitions in a new disk as in a already created/designed disk. For example we can get output from prtvtoc command and give as a input to the new disk as follows. prtvtoc /dev/rmt/c0t0d0s0 > a | fmthard ... Read More
What is jumpstart?
Added on Sat, Nov 21, 2009
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... Read More
How to create a package?
Added on Sat, Nov 21, 2009
 pkgmk -o -r / -d /tmp -f Prototype Read More
Different Types of Joins-
Added on Sat, Nov 21, 2009
             Inner Join              Outer Join - Right Outer Join        ... Read More
What does ndd do??
Added on Sat, Nov 21, 2009
allows you to tune, tweak, set and reset various parameters related to the TCP/IP stack while the system is running Read More
How will you copy the structure of a table without copying the data?
Added on Sat, Nov 21, 2009
           create table xyz as ( select * from abc where 1=0) Read More
Diffrence between a “where” clause and a “having” clause
Added on Sat, Nov 21, 2009
Answers 1.”where” is used to filter records returned by “Select” 2.”where” appears before group by clause 3.In “where” we cannot use aggrigate functions like where count(*)>2 etc 4.”having” appears... Read More
How to create a database link?
Added on Sat, Nov 21, 2009
A database link is an object in the local database that allows you to access objects on a remote database or to mount a secondary database in read-only mode. CREATE [PUBLIC] DATABASE LINK dblink [CONNECT TO user IDENTIFIED BY... Read More
How do I set environment variables in Perl programs??
Added on Sat, Nov 21, 2009
you can just do something like this: $path = $ENV{’PATH’}; 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... Read More
Which of these is a difference between CPP and Perl?
Added on Sat, Nov 21, 2009
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... Read More
How to open and read data files with Perl
Added on Sat, Nov 21, 2009
Data files are opened in Perl using the open() function. When you open a data file, all you have to do is specify (a) a file handle and (b) the name of the file you want to read from. As an example, suppose you need to read some... Read More
How do I do fill_in_the_blank for each file in a directory??
Added on Sat, Nov 21, 2009
Here’s code that just prints a listing of every file in the current directory: #!/usr/bin/perl -w opendir(DIR, "."); @files = readdir(DIR); closedir(DIR); foreach $file (@files) { print "$file... Read More
How do I generate a list of all .html files in a directory?
Added on Sat, Nov 21, 2009
Here’s a snippet of code that just prints a listing of every file in the current directory that ends with the extension .html: #!/usr/bin/perl -w opendir(DIR, "."); @files = grep(/.html$/,readdir(DIR)); ... Read More
Assuming both a local($var) and a my($var) exist, what’s the difference between ${var} and ${"var"}?
Added on Sat, Nov 21, 2009
${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,... Read More
What happens when you return a reference to a private variable??
Added on Sat, Nov 21, 2009
Perl keeps track of your variables, whether dynamic or otherwise, and doesn’t free things before you’re done using them. Read More
How to turn on Perl warnings? Why is that important?
Added on Sat, Nov 21, 2009
Perl is very forgiving of strange and sometimes wrong code, which can mean hours spent searching for bugs and weird results. Turning on warnings helps uncover common mistakes and strange places and save a lot of debugging time in... Read More
Why should I use the -w argument with my Perl programs?
Added on Sat, Nov 21, 2009
Many Perl developers use the -w option of the interpreter, especially during the development stages of an application. This warning option turns on many warning messages that can help you understand and debug your applications. To... Read More
What are scalar data and scalar variables??
Added on Sat, Nov 21, 2009
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... Read More
Assuming $_ contains HTML, which of the following substitutions will remove all tags in it??
Added on Sat, Nov 21, 2009
Q: Assuming $_ contains HTML, which of the following substitutions will remove all tags in it?      1.s/<.*>//g;      2.s/<.*?>//gs;      3.s/... Read More
What is the output of the following Perl program?
Added on Sat, Nov 21, 2009
Q: What is the output of the following Perl program? 1 $p1 = "prog1.java"; 2 $p1 =~ s/(.*).java/$1.cpp/; 3 print "$p1 "; A: prog1.cpp Read More
Why aren’t Perl’s patterns regular expressions??
Added on Sat, Nov 21, 2009
Because Perl patterns have backreferences. A regular expression by definition must be able to determine the next state in the finite automaton without requiring any extra memory to keep around previous state. A pattern /([ab]+)c1/ requires the... Read More
How do I sort a hash by the hash key??
Added on Sat, Nov 21, 2009
Suppose we have a class of five students. Their names are kim, al, rocky, chrisy, and jane. Here’s a test program that prints the contents of the grades hash, sorted by student name: #!/usr/bin... Read More
How do you print out the next line from a filehandle with all its bytes reversed??
Added on Sat, Nov 21, 2009
print scalar reverse scalar <FH> Surprisingly enough, you have to put both the reverse and the <FH> into scalar context separately for this to work. Read More
Why is it hard to call this function: sub y { "because" } ?
Added on Sat, Nov 21, 2009
Because y is a kind of quoting operator. The y/// operator is the sed-savvy synonym for tr///. That means y(3) would be like tr(), which would be looking for a second string, as in tr/a-z/A-Z/, tr(a-z)(A-Z), or tr[a-z][A-Z]. Read More
What does `$result = f() .. g()’ really return??
Added on Sat, Nov 21, 2009
False so long as f() returns false, after which it returns true until g() returns true, and then starts the cycle again. This is scalar not list context, so we have the bistable flip-flop range operator famous in parsing of... Read More
Why does Perl not have overloaded functions??
Added on Sat, Nov 21, 2009
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 wantarray()... Read More
What does read() return at end of file??
Added on Sat, Nov 21, 2009
A defined (but false) 0 value is the proper indication of the end of file for read() and sysread(). Read More
How do I sort a hash by the hash value??
Added on Sat, Nov 21, 2009
Here’s a program that prints the contents of the grades hash, sorted numerically by the hash value: #!/usr/bin/perl -w # Help sort a hash by the hash ’value’, not the ’key’. ... Read More
How to read file into hash array ??
Added on Sat, Nov 21, 2009
open(IN, "<name_file") or die "Couldn’t open file for processing: $!"; while (<IN>) { chomp; $hash_table{$_} = 0; } close IN; print "$_ = $hash_table{$_} " foreach keys %hash_table; Read More
How do you find the length of an array?
Added on Sat, Nov 21, 2009
 $@array Read More
Does Perl have reference type??
Added on Sat, Nov 21, 2009
Yes. Perl can make a scalar or hash type reference by using backslash operator. For example $str = "here we go"; # a scalar variable $strref = $str; # a reference to a scalar @array = (1..10); # an array ... Read More
How to dereference a reference??
Added on Sat, Nov 21, 2009
There are a number of ways to dereference a reference. Using two dollar signs to dereference a scalar. $original = $$strref; Using @ sign to dereference an array. @list = @$arrayref; Similar for hashes. Read More
If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}??
Added on Sat, Nov 21, 2009
The second is disallowed under `use strict "refs"’. Dereferencing a string with *{"STR"} is disallowed under the refs stricture, although *{STR} would not be. This is similar in spirit to the way ${"STR"} is always the... Read More
How do I do < fill-in-the-blank > for each element in an array??
Added on Sat, Nov 21, 2009
#!/usr/bin/perl -w @homeRunHitters = (’McGwire’, ’Sosa’, ’Maris’, ’Ruth’); foreach (@homeRunHitters) { print "$_ hit a lot of home runs in one year "; } Read More
How to concatenate strings with Perl?
Added on Sat, Nov 21, 2009
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,... Read More
How do I read command-line arguments with Perl??
Added on Sat, Nov 21, 2009
With Perl, command-line arguments are stored in the array named @ARGV. $ARGV[0] contains the first argument, $ARGV[1] contains the second argument, etc. $#ARGV is the subscript of the last element of the @ARGV array, so... Read More
What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }’ ?
Added on Sat, Nov 21, 2009
Their destructors are called when that interpreter thread shuts down. When the interpreter exits, it first does an exhaustive search looking for anything that it allocated. This allows Perl to be used in embedded and multithreaded... Read More
Assume that $ref refers to a scalar, an array, a hash or to some nested data structure. Explain the following statements?
Added on Sat, Nov 21, 2009
$$ref; # returns a scalar $$ref[0]; # returns the first element of that array $ref- > [0]; # returns the first element of that array @$ref; # returns the contents of that array, or number of elements, in scalar context... Read More
How do you match one letter in the current locale??
Added on Sat, Nov 21, 2009
/[^W_d]/ We don’t have full POSIX regexps, so you can’t get at the isalpha() <ctype.h> macro save indirectly. You ask for one byte which is neither a non-alphanumunder, nor an under, nor a numeric. That... Read More
How do I print the entire contents of an array with Perl??
Added on Sat, Nov 21, 2009
To answer this question, we first need a sample array. Let’s assume that you have an array that contains the name of baseball teams, like this: @teams = (’cubs’, ’reds’, ’yankees’, ... Read More
Perl uses single or double quotes to surround a zero or more characters. Are the single(’ ’) or double quotes (" ") identical??
Added on Sat, Nov 21, 2009
They are not identical. There are several differences between using single quotes and double quotes for strings. 1. The double-quoted string will perform variable interpolation on its contents. That is, any variable references... Read More
What are scalar variables?
Added on Sat, Nov 21, 2009
Scalar variables are what many programming languages refer to as simple variables. They hold a single data item, a number, a string, or a perl reference. Scalars are called scalars to differentiate them from constructs that can hold... Read More
Explain about lists?
Added on Sat, Nov 21, 2009
A list is a construct that associates data elements together and you can specify a list by enclosing those elements in parenthesis and separating them with commas. They could themselves be arrays, hashes or even other lists. Lists do not... Read More
Explain about an ivalue?
Added on Sat, Nov 21, 2009
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... Read More
How does a “grep” function perform?
Added on Sat, Nov 21, 2009
Grep returns the number of lines the expression is true. Grep returns a sublist of a list for which a specific criterion is true. This function often involves pattern matching. It modifies the elements in the original list. Read More
What exactly is grooving and shortening of the array?
Added on Sat, Nov 21, 2009
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... Read More
What are the three ways to empty an array?
Added on Sat, Nov 21, 2009
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... Read More
How do you work with array slices
Added on Sat, Nov 21, 2009
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. Read More
What is meant by splicing arrays explain in context of list and scalar.
Added on Sat, Nov 21, 2009
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... Read More
What are the different types of perl operators?
Added on Sat, Nov 21, 2009
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... Read More
What are the different forms of goto in perl? Explain?
Added on Sat, Nov 21, 2009
The three forms of goto are as follows. They are (i) Goto label (ii) Goto name (iii) Goto expr The first form, goto LABEL, transfers execution to the statement labeled LABEL. The second form, goto EXPR, expects EXPR to evaluate... Read More
What are the different types of eval statements?
Added on Sat, Nov 21, 2009
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... Read More
Determine the difference between my and local?
Added on Sat, Nov 21, 2009
The fundamental difference between my and local is that my creates a new variable, whereas local saves a copy of an existing variable. Read More
Explain about returning values from subroutines (functions)?
Added on Sat, Nov 21, 2009
The return value of the subroutine is the value of the last expression evaluated or you can explicitly use a return statement to exit the subroutine specifying the return value. That return value is evaluated in the appropriate content... Read More
How do I determine the shoe size of a directory?
Added on Sat, Nov 21, 2009
Note that notions of shoe size vary from country to country. See the perllocale man page for complete discussion. -e only returns a boolean value that says whether or not the directory wears a wide shoe. Read More
How come exec() doesn’t return?
Added on Sat, Nov 21, 2009
Have you considered using a mouthwash Read More
How do I compute the intersection of two lists?
Added on Sat, Nov 21, 2009
Just apply De Morgan’s identity:     A intersection B = complement ((complement A) union (complement B)) Read More
How do I trap control characters / signals?
Added on Sat, Nov 21, 2009
Look into the Net::* modules, available from CPAN. Read More
Why does print reverse "dog" print dog, but print ucfirst reverse "dog" prints God?
Added on Sat, Nov 21, 2009
Because the name of the Deity must always be capitalized. Read More
How can I force Perl to treat a number as a string?
Added on Sat, Nov 21, 2009
Try using a whip. Read More
I tried getpeername and it gave me some weird error message.
Added on Sat, Nov 21, 2009
If you got `some weird error’ the problem is with your frobobnitz. Read More
What is the MODE argument to mkdir used for?
Added on Sat, Nov 21, 2009
Set it to a true value to create a directory with ice cream on top. Read More
How can I find the creation date of a file?
Added on Sat, Nov 21, 2009
Use this function:         sub creation_date {           use FileHandle;           my $filename = shift or die... Read More
How do I convert a string to a number?
Added on Sat, Nov 21, 2009
Use this atoi function:         sub atoi {           my $t;           foreach my $d (split(//, shift())) { ... Read More
How do I convert a number to a string?
Added on Sat, Nov 21, 2009
Use sprintf:                 $string = sprintf("%f", 123.45); Read More
How can I tell if a string is a number?
Added on Sat, Nov 21, 2009
The simplest method is:         if ($string == "$string") {           # It is a number         } Note the use of... Read More
How do I find the largest element in an array?
Added on Sat, Nov 21, 2009
Write a foreach loop to scan the elements one at a time, and stop when you get to the largest one. Read More
How do I sort a hash?
Added on Sat, Nov 21, 2009
        %sorted = sort %hash; Read More
How do I sort a hash by value?
Added on Sat, Nov 21, 2009
As usual in Perl, there’s More Than One Way to Do it. Use either of:       %sorted = sort values %hash;       %sorted = sort {$hash{$a} <=> $hash{$b}} %hash; The first one... Read More
How do I sort an array in reverse?
Added on Sat, Nov 21, 2009
        @sorted = sort reverse @array; Read More
Is Perl Year-2000 compliant?
Added on Sat, Nov 21, 2009
Even better! New with version 5.005, Perl is Year-2013 compliant. This represents a 13-year improvement over other software that is merely year-2000 compliant. Read More
What’s a regular expression to replace 09:23:53 08-OCT-98 with Thu Oct 8 09:23:53 1998?
Added on Sat, Nov 21, 2009
        s{.*}{Thu Oct  8 09:23:53 1998} Read More
What’s this s///ee thing I keep hearing about?
Added on Sat, Nov 21, 2009
You use /ee when you need to operate on a directory with an extra-wide shoe. Read More
How do I get tomorrow’s date?
Added on Sat, Nov 21, 2009
Use this function:         sub tomorrow_date {           sleep 86_400;           return localtime(); ... Read More
What’s the difference betwen fork() and split()?
Added on Sat, Nov 21, 2009
fork() only works on Unix systems, so you should use split() for maximum portability. Read More
Can I get a YACC grammar for the Perl language?
Added on Sat, Nov 21, 2009
Sorry, but as you must surely be aware by now, the only animals supported by Perl are ruminants such as camels and llamas. However, Yacc support may be forthcoming with version 5.007. Read More
Do I always have to quote my strings?
Added on Sat, Nov 21, 2009
Only when they are actual quotations. For example, in         $quote = "To be, or not to be?  That is the question."; the quotes are required, but in        ... Read More
Why do Perl operators have different precedence than C operators?
Added on Sat, Nov 21, 2009
Because Perl isn’t C. Duh. Read More
How can I find out whether a number is odd?
Added on Sat, Nov 21, 2009
        sub odd {             my $number = shift;             return !even ($number);  ... Read More
How can I find out whether a number is even?
Added on Sat, Nov 21, 2009
        sub even {             my $number = abs shift;             return 1 if $number == 0;... Read More
How can I round up a number?
Added on Sat, Nov 21, 2009
        $number->lasso(); Read More
How do I decrypt a string that I encrypted with crypt()?
Added on Sat, Nov 21, 2009
                 sub decrypt {           my $c = shift;           my @c = (0) x 8;  ... Read More
How do I get my perl program to run faster?
Added on Sat, Nov 21, 2009
In Perl, there’s always more than one way to do it. Try one of these techniques.         use more ’cpu’;         use less ’time’;  ... Read More
How do I get my perl program to use less memory?
Added on Sat, Nov 21, 2009
Variables take up memory, so if you don’t declare any variables, you should be safe. Another possibility is to use         pack(chop(chomp($0))); Read More
Perldoc isn’t running properly. Where can I find the documentation?
Added on Sat, Nov 21, 2009
        perldoc perldoc Read More
I have a lot of Bourne shell scripts I’d like to convert to Perl... What’s the easiest way to do it?
Added on Sat, Nov 21, 2009
Make sure that the first line of your script is #!/bin/sh. That magic comment tells the Perl interpreter to understand Bourne shell syntax. Read More
what is the difference between ’use’ and ’require’ function??
Added on Sat, Nov 21, 2009
Use: 1. the method is used only for modules (only to include .pm type file) 2. the included object are verified at the time of compilation. 3. No Need to give file extentsion. Require: 1. The method is used for both libraries (... Read More
What is ’->’ in Perl??
Added on Sat, Nov 21, 2009
it is a symbolic link to link one file name to a new name. so lets say we do it like file1-> file2, if we read file1, we end up reading file2. Read More
<hash>create directory if not there?
Added on Sat, Nov 21, 2009
Q: #create directory if not there if (! -s "$temp/engl_2/wf"){ System "mkdir -p $temp/engl_2/wf"; } if (! -s "$temp/backup_basedir"){ system "mkdir -p $temp/backup_basedir"; } ${pack_2} = -M "${temp}/engl_2/wf/${wf_package_name}... Read More
How to substitute a particular string in a file containing million of record??
Added on Sat, Nov 21, 2009
perl -p -ibak -e ’s/search_str/replace_str/g’ filename Read More
I have a variable named $objref which is defined in main package. I want to make it as a Object of class XYZ. how could I do it???
Added on Sat, Nov 21, 2009
use XYZ my $objref =XYZ -> new() OR, bless $objref, ’XYZ’ Read More
Explain the difference between ’my’ and ’local’ variable scope declarations??
Added on Sat, Nov 21, 2009
Both of them are used to declare local variables. The variables declared with ’my’ can live only within the block and cannot gets its visibility inherited fucntions called within that block, but one defined as &rsquo... Read More
How do you navigate thorugh an XML documents??
Added on Sat, Nov 21, 2009
You can use the XML::DOM navigation methods to navigate thorugh an XML::DOM node tree and use the getnodevalue to recover the data. DOM Parser is used when it is neede to do node operation. Instead we may use SAX parser if you... Read More
What is Perl one-liner???
Added on Sat, Nov 21, 2009
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 ... Read More
Assuming both a local($var) and a my($var) exist, what’s the difference between ${var} and ${"var"}??
Added on Sat, Nov 21, 2009
${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,... Read More
Name all the prefix dereferencer in perl??
Added on Sat, Nov 21, 2009
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) &... Read More
Explain about an ivalue??
Added on Sat, Nov 21, 2009
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... Read More
How do you work with array slices?
Added on Sat, Nov 21, 2009
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. Read More
What are the different types of perl operators??
Added on Sat, Nov 21, 2009
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 ... Read More
Which has the highest precedence, List or Terms? Explain??
Added on Sat, Nov 21, 2009
Terms have the highest precedence in perl. Terms include variables, quotes, expressions in parenthesis etc. List operators have the same level of precedence as terms. Specifically, these operators have very strong left word precedence... Read More
What is a short circuit operator??
Added on Sat, Nov 21, 2009
The C-Style operator, ll, performs a logical (or) operation and you can use it to tie logical clauses together, returning an overall value of true if either clause is true. This operator is called a short-circuit operator because if... Read More
What are the different forms of goto in perl? Explain??
Added on Sat, Nov 21, 2009
The three forms of goto are as follows. They are (i) Goto label (ii) Goto name (iii) Goto expr The first form, goto LABEL, transfers execution to the statement labeled LABEL. The second form, goto... Read More
Is there any way to add two arrays together??
Added on Sat, Nov 21, 2009
Of course you can add two arrays together by using push function. The push function adds a value or values to the end of an array. The push function pushes the values of list onto the end of the array. Length of an array can be... Read More
Is there any way to add two arrays together???
Added on Sat, Nov 21, 2009
Of course you can add two arrays together by using push function. The push function adds a value or values to the end of an array. The push function pushes the values of list onto the end of the array. Length of an array can be... Read More
How to use the command shift??
Added on Sat, Nov 21, 2009
Shift array function shifts off the first value of the array and returns it, thereby shortening the array by one element and moving everything from one place to the left. If you don’t specify an array to shift, shift uses @ ARGV... Read More
What are the different types of eval statements??
Added on Sat, Nov 21, 2009
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... Read More
Determine the difference between my and local??
Added on Sat, Nov 21, 2009
The fundamental difference between my and local is that my creates a new variable, whereas local saves a copy of an existing variable. Read More
Explain about returning values from subroutines (functions)??
Added on Sat, Nov 21, 2009
The return value of the subroutine is the value of the last expression evaluated or you can explicitly use a return statement to exit the subroutine specifying the return value. That return value is evaluated in the appropriate... Read More
How do I set environment variables in Perl programs???
Added on Sat, Nov 21, 2009
you can just do something like this: $path = $ENV{’PATH’}; As you may remember, "%ENV" is a special hash in Perl that contains the value of all your environment variables. ... Read More
Which of these is a difference between CPP and Perl??
Added on Sat, Nov 21, 2009
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... Read More
What are the two different types of data Perl handles??
Added on Sat, Nov 21, 2009
Perl handles two types of data they are (i) Scalar Variables and (ii) Lists Scalar variables hold a single data item whereas lists hold multiple data items. Read More
1.How many ways can we express string in Perl?
Added on Sat, Nov 21, 2009
Many. For example ’this is a string’ can be expressed in: "this is a string" qq/this is a string like double-quoted string/ qq^this is a string like double-quoted string^ q/this is a... Read More
1.What are scalar variables?
Added on Sat, Nov 21, 2009
Scalar variables are what many programming languages refer to as simple variables. They hold a single data item, a number, a string, or a perl reference. Scalars are called scalars to differentiate them from constructs that can hold... Read More
How to open and read data files with Perl ?
Added on Sat, Nov 21, 2009
Data files are opened in Perl using the open() function. When you open a data file, all you have to do is specify (a) a file handle and (b) the name of the file you want to read from. As an example, suppose you need to read some... Read More
1.How do I do fill_in_the_blank for each file in a directory?
Added on Sat, Nov 21, 2009
Here’s code that just prints a listing of every file in the current directory: #!/usr/bin/perl -w opendir(DIR, "."); @files = readdir(DIR); closedir(DIR); foreach $file (@files) ... Read More
1.How do you print out the next line from a filehandle with all its bytes reversed?
Added on Sat, Nov 21, 2009
print scalar reverse scalar Surprisingly enough, you have to put both the reverse and the into scalar context separately for this to work. Read More
1.How do I generate a list of all .html files in a directory?
Added on Sat, Nov 21, 2009
Here’s a snippet of code that just prints a listing of every file in the current directory that ends with the extension .html: #!/usr/bin/perl -w opendir(DIR, "."); @files = grep(/.html$/,readdir... Read More
1.How does a “grep” function perform?
Added on Sat, Nov 21, 2009
Grep returns the number of lines the expression is true. Grep returns a sublist of a list for which a specific criterion is true. This function often involves pattern matching. It modifies the elements in the original list. Read More
1.Explain about Typeglobs?
Added on Sat, Nov 21, 2009
Type globs are another integral type in perl. A typeglob`s prefix derefrencer is *, which is also the wild card character because you can use typeglobs to create an alias for all types associated with a particular name. All kinds of... Read More
1.Does Perl have reference type?
Added on Sat, Nov 21, 2009
Yes. Perl can make a scalar or hash type reference by using backslash operator. For example $str = "here we go"; # a scalar variable $strref = $str; # a reference to a scalar @array = (1..10); #... Read More
1.How to dereference a reference?
Added on Sat, Nov 21, 2009
There are a number of ways to dereference a reference. Using two dollar signs to dereference a scalar. $original = $$strref; Using @ sign to dereference an array. @list = @$arrayref; ... Read More
1.How to turn on Perl warnings? Why is that important?
Added on Sat, Nov 21, 2009
Perl is very forgiving of strange and sometimes wrong code, which can mean hours spent searching for bugs and weird results. Turning on warnings helps uncover common mistakes and strange places and save a lot of debugging time in the... Read More
How do you know the reference of a variable whether it is a reference,scaller, hash or array?
Added on Thu, Nov 19, 2009
there is a ’ref’ function that lets you know Read More
How to delete an entire directory containing few files in the directory?
Added on Thu, Nov 19, 2009
. rmtree($dir); OR, you can use CPAN module File::Remove Though it sounds like deleting file but it can be used also for deleting directories. &File::Removes::remove (1,$feed-dir,$item_dir); Read More
What are the arguements we normally use for Perl Interpreter
Added on Thu, Nov 19, 2009
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) Read More
what is the difference between Perl and shell script?
Added on Thu, Nov 19, 2009
whatever you can do in shell script can be done in Perl.however 1. Perl gives you an extended advantages of having enormous library. 2. you do not need to write everything from scartch Read More
Perl regular exp are greedy. what is it mean by that?
Added on Thu, Nov 19, 2009
it tries to match the longest string possible. Read More
How do I set environment variables in Perl programs?
Added on Thu, Nov 19, 2009
. you can just do something like this: $ENV{’PATH’} = ’...’; 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... Read More
what is Perl one-liner?
Added on Thu, Nov 19, 2009
There are two ways a Perl script can be run: --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... Read More
What happens when you return a reference to a private variable?
Added on Thu, Nov 19, 2009
Perl keeps track of your variables, whether dynamic or otherwise, and doesn’t free things before you’re done using them Read More
What does Perl do if you try to exploit the execve(2) race involving setuid scripts?
Added on Thu, Nov 19, 2009
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. Read More
How do I sort a hash by the hash key?
Added on Thu, Nov 19, 2009
Suppose we have a class of five students.Their names are kim, al, rocky, chrisy, and jane. Here’s a test program that prints the contents of the grades hash, sorted by student name: #!/usr/bin/perl -w %grades = ( kim => 96, al => 63,... Read More
What does `new $cur->{LINK}’ do? (Assume the current package has no new() function of its own.)
Added on Thu, Nov 19, 2009
$cur->new()->{LINK} The indirect object syntax only has a single token lookahead. That meAns if new() is a method, it only grabs the very next token, not the entire following expression. This is why `new $obj[23] arg’ does’t work,... Read More
How do I sort a hash by the hash value?
Added on Thu, Nov 19, 2009
Here’s a program that prints the contents of the grades hash, sorted numerically by the hash value: #!/usr/bin/perl -w # Help sort a hash by the hash ’value’, not the ’key’. to highest). sub hashValueAscendingNum { ... Read More
How do I replace every character in a file with a comma?
Added on Thu, Nov 19, 2009
perl -pi.bak -e ’s/ /,/g’ myfile. Read More
How do you match one letter in the current locale?
Added on Thu, Nov 19, 2009
/[^W_d]/ We don’t have full POSIX regexps, so you can’t get at the isalpha() macro save indirectly. You ask for one byte which is neither a non-alphanumunder, nor an under, nor a numeric. That leaves just the alphas, which is what you... Read More
How many ways can we express string in Perl?
Added on Thu, Nov 19, 2009
Many. For example ’this is a string’ can be expressed in: "this is a string" qq/this is a string like double-quoted string/ qq^this is a string like double-quoted string^ q/this is a string/ q&this is a string& q(this is a string)... Read More
What is the difference between chop & chomp functions in perl?
Added on Thu, Nov 19, 2009
chop is used remove last character,chomp function removes only line endings. Read More
What is Hash?
Added on Thu, Nov 19, 2009
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") Read More
Name an instance where you used a CPAN module?
Added on Fri, Nov 20, 2009
we will get a no.of  modules from CPAN , there so many module for database interface, database drivers. to do the mathematical operations ,text processing . each module is to handle a small tasks .   There are... Read More
What purpose does each of the following serve: -w, strict, - T ?
Added on Fri, Nov 20, 2009
-w enables the  warnings mode in perl   -T is enables the  Taint mode it performs some checks how your program is using the data passed to it Turn on strict mode to make Perl check for common mistakes. ... Read More
What is -> Symbol in perl
Added on Fri, Nov 20, 2009
reference the method of a module. Read More
what is meant by a ’pack’ in perl??
Added on Fri, Nov 20, 2009
Pack Converts a list into a binary representation Takes an array or list of values and packs it into a binary structure, returning the string containing the structure Takes a LIST of values and converts it into a... Read More
How to implement stack in Perl??
Added on Fri, Nov 20, 2009
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. Read More
what does this mean ’$^0’? tell briefly plse..
Added on Sat, Nov 21, 2009
Holds the name of the default heading format for the default file handle. Normally, it is equal to the file handle’s name with _TOP appended to it. Read More
perl regular expressions are greedy" what does this mean?
Added on Sat, Nov 21, 2009
Perl regular expressions normally match the longest string possible. that is what is called as "greedy match" Read More
What does init 5 and init 0 do?
Added on Sat, Nov 21, 2009
init 5 will shutdown and Power-off the server. init 0 will bring the server to the ok> prompt (Fourth monitor) Read More
How do you boot from a Network with jumpstart?
Added on Sat, Nov 21, 2009
boot net - install Read More
How do you boot from CD-ROM??
Added on Sat, Nov 21, 2009
boot cdrom Read More
What does fmthard do??
Added on Sat, Nov 21, 2009
The fmthard command updates the VTOC (Volume Table of Contents) on hard disks and, on systems, adds boot information,to the Solaris fdisk partition. One or more of the options,-s datafile, -d data, or -n volume_name must be used to... Read More
What is VTS?
Added on Sat, Nov 21, 2009
Sun Validation Test Suite -> tests and validates Sun hardware by verifying the configuration and functionality of hardware controllers, devices Read More
What is the difference among “dropping a table”, “truncating a table” and “deleting all records” from a table.
Added on Sat, Nov 21, 2009
Drop Table - will remove the existance of the table from the database along with its data and structure and all the constraints. The table will be no longer available. Truncate Table - will remove all the rows (only the rows) from... Read More
What is Perl one-liner??
Added on Sat, Nov 21, 2009
There are two ways a Perl script can be run: --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... Read More
What does Perl do if you try to exploit the execve(2) race involving setuid scripts??
Added on Sat, Nov 21, 2009
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... Read More
How do I send e-mail from a Perl/CGI program on a Unix system??
Added on Sat, Nov 21, 2009
Sending e-mail from a Perl/CGI program on a Unix computer system is usually pretty simple. Most Perl programs directly invoke the Unix sendmail program. We’ll go through a quick example here. Assuming that you’ve... Read More
How to read from a pipeline with Perl
Added on Sat, Nov 21, 2009
Example 1: To run the date command from a Perl program, and read the output of the command, all you need are a few lines of code like this: open(DATE, "date|"); $theDate = <DATE>; close(DATE); The open(... Read More
What does `new $cur->{LINK}’ do? (Assume the current package has no new() function of its own.)?
Added on Sat, Nov 21, 2009
$cur->new()->{LINK} The indirect object syntax only has a single token lookahead. That means if new() is a method, it only grabs the very next token, not the entire following expression. This is why `new $obj[23] arg... Read More
What value is returned by a lone `return;’ statement??
Added on Sat, Nov 21, 2009
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. Read More
What’s the difference between /^Foo/s and /^Foo/??
Added on Sat, Nov 21, 2009
The second would match Foo other than at the start of the record if $* were set. The deprecated $* flag does double duty, filling the roles of both /s and /m. By using /s, you suppress any settings of that spooky variable, and... Read More
When would `local $_’ in a function ruin your day??
Added on Sat, Nov 21, 2009
When your caller was in the middle for a while(m//g) loop The /g state on a global variable is not protected by running local on it. That’ll teach you to stop using locals. Too bad $_ can’t be the target of a my()... Read More
How do you match one letter in the current locale???
Added on Sat, Nov 21, 2009
/[^W_d]/ We don’t have full POSIX regexps, so you can’t get at the isalpha() <ctype.h> macro save indirectly. You ask for one byte which is neither a non-alphanumunder, nor an under, nor a numeric.... Read More
How do you give functions private variables that retain their values between calls??
Added on Sat, Nov 21, 2009
Create a scope surrounding that sub that contains lexicals. Only lexical variables are truly private, and they will persist even when their block exits if something still cares about them. Thus: { my $i = 0; sub next_i { ... Read More
What are the two different types of data perl handles?
Added on Sat, Nov 21, 2009
Perl handles two types of data they are (i) Scalar Variables and (ii) Lists Scalar variables hold a single data item whereas lists hold multiple data items. Read More
Is there any way to add two arrays together?
Added on Sat, Nov 21, 2009
Of course you can add two arrays together by using push function. The push function adds a value or values to the end of an array. The push function pushes the values of list onto the end of the array. Length of an array can be increased... Read More
How to use the command shift?
Added on Sat, Nov 21, 2009
Shift array function shifts off the first value of the array and returns it, thereby shortening the array by one element and moving everything from one place to the left. If you don’t specify an array to shift, shift uses @ ARGV,... Read More
What is a short circuit operator?
Added on Sat, Nov 21, 2009
The C-Style operator, ll, performs a logical (or) operation and you can use it to tie logical clauses together, returning an overall value of true if either clause is true. This operator is called a short-circuit operator because if the... Read More
How can I get just the first half of a long string?
Added on Sat, Nov 21, 2009
Use         $string x .5; Read More
Someone told me that tr/x//d would be faster than s/x//g. Is this true? Why?
Added on Sat, Nov 21, 2009
tr/// is faster on multiprocessor machines because it can be vectorized, so that each x is removed by a different processor. s///, however, must always be performed sequentially. Read More
How do I get the length of a variable?
Added on Sat, Nov 21, 2009
Use         length(’$variable’); to find out how long a variable is. Read More
How do I differentiate my Object Oriented Perl scripts from other perl scripts?
Added on Sat, Nov 21, 2009
Just as C programmers use .cpp as an extension for their object oriented C programs, many perl programmers use .ppp for their object oriented Perl programs. Read More
How do I get my program to pause for five seconds?
Added on Sat, Nov 21, 2009
Use the sleep function, like this:   use POSIX ":sys_wait_h";   { local($SIG{CHLD}=sub{wait};     my $start = time;     if (fork) { sleep } else { 1 while (time - $start < 5); exit }   } Read More
What are all those $@%* signs for?
Added on Sat, Nov 21, 2009
Watch your $@*$!% mouth, buddy! Read More
How do I block warnings?
Added on Sat, Nov 21, 2009
The simplest way is to do         close STDERR; Read More
I’ve got a C program I want to translate to Perl... How do I do that?
Added on Sat, Nov 21, 2009
If you’re using gcc, version 2.7 or better, you can use the translate-to-perl mode.         gcc -P -E foo.c > foo.pl (gcc is smart enough to figure out that you want to convert to &rsquo... Read More
What’s the difference between single quoted strings and double quoted strings?
Added on Sat, Nov 21, 2009
Single quoted strings act like q(); double quoted strings act like qq().   Read More
How do you know the reference of a variable whether it is a reference,scaller, hash or array??
Added on Sat, Nov 21, 2009
Ans: there is a ’ref’ function that lets you know Read More
What is the use of ’chomp’ ? what is the difference between ’chomp’ and ’chop’??
Added on Sat, Nov 21, 2009
’chop’ functiononly removes the last character completely ’from the scaler, where as ’chomp’ function only removes the last character if it is a newline. by default, chomp only removes what is currently... Read More
Print this array @arr in reversed case-insensitive order?
Added on Sat, Nov 21, 2009
> @solution = sort {lc $a comp lc$b } @arr. Read More
how do you check the return code of system call??
Added on Sat, Nov 21, 2009
System calls "traditionally" returns 9 when successful and 1 when it fails. system (cmd) or die "Error in command"; Read More
how to implement stack in Perl???
Added on Sat, Nov 21, 2009
through push() and shift() function. push adds the element at the last of array and shift() removes from the beginning of an array. Read More
What is meant by splicing arrays explain in context of list and scalar.?
Added on Sat, Nov 21, 2009
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... Read More
1.Explain about lists?
Added on Sat, Nov 21, 2009
A list is a construct that associates data elements together and you can specify a list by enclosing those elements in parenthesis and separating them with commas. They could themselves be arrays, hashes or even other lists. Lists do... Read More
1.What are scalar data and scalar variables?
Added on Sat, Nov 21, 2009
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... Read More





   copy right ® all rights reserved by www.fullinterview.com