Archive for the ‘Perl Script’ Category:

Remove Control ^M from files

tpatil created the topic: Remove Control ^M from files Single file method perl -pi -e “s/\r//” filename.txt Multiple File Method find . -type f -exec perl -pi -e “s/\r//” {} \; rajeshkumar replied the topic: Re:Remove Control ^M from files I used to do in shell using following command > 1,$s/^M//g Correct me if I

(Read More…)

Tags:

I need to a perl script

rajeshkumar created the topic: i need to a perl script Hi , There is a file called test.txt what are all the different ways BEGIN: test 1 test 2 %%%%%%%%%% TEST TEST TEST test 3 END: need to grab all contents in between BEGIN and END: Regards, Rajesh Kumar Twitt me @ twitter.com/RajeshKumarIn rajeshkumar replied

(Read More…)

Tags:

The difference between my and local

rajeshkumar created the topic: The difference between my and local There is a subtle difference. In the example below, $::a refers to $a in the ‘global’ namespace. ‘local’ temporarily changes the value of the variable, but only within the scope it exists in. $a = 3.14159; { local $a = 3; print “In block, \$a

(Read More…)

Tags:

What is the meaning of rigging?

scmuser created the topic: What is the meaning of rigging? Hi, Could you please tell me meaning of rigging in perl?

Tags:

Parenthesis After Module Name And Without Parenths

scmuser created the topic: parenthesis after module name and without parenths What is the difference between having a parenthesis after module name and without parenthsis after module name?? i.e Package::Module(); Package::Module;

Tags:

Question Regarding to Eval Function

scmuser created the topic: question regarding to eval function I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line. eval \’exec perl -S $0 ${1+\”$@\”}\’ if 0; $0 for script name $@ set if error occur

Tags:

Find a particular word in a paragraph

scmuser created the topic: Find a particular word in a paragraph Write a Perl script to find a particular word in a paragraph???

Create a flat file database using perl

scmuser created the topic: Create a flat file database using perl How to create a flat file database as shown below s.no name age city phone 0 hema 22 Calcutta 4312542 1 hema 21 Bangalore 2344345 2 ganesh 25 delhi 2445454 3 kartik 45 pune 4312121 4 santosh 25 Hyderabad 2254231 5 kumar 25 mysore

(Read More…)

Tags:

Find whether a given line of text is starting and

scmuser created the topic: Find whether a given line of text is starting and Write a perl script to find whether a given line of text is starting and ending with same word or not ???

Tags:

Use Vs require in perl

scmuser created the topic: use Vs require in perl Hi, Whats difference between “use” and “require” in perl? rajeshkumar replied the topic: Re: use Vs require in perl use is done at ‘compile-time’ and require is done at ‘run-time’ (ie can conditionally load modules) Regards, Rajesh Kumar Twitt me @ twitter.com/RajeshKumarIn rajeshkumar replied the topic:

(Read More…)

Tags:
© Tutorials
CyberChimps