Perl

Copying and Substituting Simultaneously

When the purpose is to search and replace a copy of the string and the intention is to accomplish this in one step then instead of doing this: $dst = [...]

WebAPP

WebAPP is a popular, open source Content Management System (cms) written in the Perl programming language. The name WebAPP is an abbreviation of Web Automated [...]

difference between soft link and hard link

Hard Links :1. All Links have same inode number.2.ls -l command shows all the links with the link column(Second) shows No. of links.3. Links have actual file [...]

Changing your default UNIX file permissions

To change the default permissions assigned to your UNIX files and directories, use the umask command. umask is a little confusing at first. Its format is umask [...]

Printing Environment Variables Using Perl One Liner

Solution1 C:Documents and Settingssivkumar>perl use Data::Dumper; print Dumper %ENV; Solution2 - PerlOne Liner perl -MData::Dumper -e "print Dumper [...]

Tilde-Tilde Operator

A bit obscure is the tilde-tilde "operator" which forces scalar context. print ~~ localtime; is the same as print scalar localtime; and different [...]

Spaceship Operator.

Easy with theSpaceship Operator. $a =2<=>5;# $a is set to -1 $a =5<=>2;# $a is set to 1 $a =2<=>2;# $a is set to [...]

Non-Obvious features in perl.

For example, did you know that there can be a space after a sigil? $ perl -wle 'my $x = 3; print $ x' 3  Or that there you can give subs numeric names if you [...]

Error : Can’t do inplace edit without backup

I am writing a command line perl program to replacetextcontentina file .I know that the following instruction executes successfully on one of the unix machine. [...]

Special Variables – @ARGV

@ARGV Short Name   :         @ARGV Scope           :          always global This variable is an array of the arguments passed [...]