How to make all files in one directory to an array

2008-03-20 Thread sivasakthi
Hi all, How to form array by using the files available in particular directory ? for example, /tmp contains the following files.. #ls /tmp example.txt file1.txt file2.txt file3.txt sample.txt www.txt zzz.txt i want to take all the above files in to one array? how to do that? Thanks, Siva

create multiple hash

2008-03-21 Thread sivasakthi
Hi all, I want to create multiple hash and retrieve the values for print like below , %values= ( '172.16.1.45' => {'google.com' => 34, 'linux.com' => 45}, '172.15.2.34' => {'hp.com' => 345, 'oracle.com' => 4567}, ); how to do that? Thanks,

how do check th argument is passing to running file

2008-03-24 Thread sivasakthi
Hi all, How we can check the argument is passing to the running file or not? #sample.pl 2008 03 i want to check the two arguments of 2008 & 03 is passed to sample.pl or not.. Thanks,

Geting the Host from URL in cgi script

2008-03-28 Thread sivasakthi
Hi all, I have passed the one URL to cgi script , and i have retrieve the values by using the param method.. the example url is following , http://172.16.2.30:2004/block/blocked.cgi?url=google.com&target=gambling now i wanted to retrieve the host of http://172.16.2.30:2004/block/blocked.cgi ..

Can't locate object method "gif" via package "GD::Image"

2008-04-02 Thread sivasakthi
Hi all, I have installed Perl-GD , and tried to use the GD::Image it throws the following error message , Can't locate object method "gif" via package "GD::Image" how can i eliminate the above error? Thanks,

Re: Can't locate object method "gif" via package "GD::Image"

2008-04-02 Thread sivasakthi
> > You don't say what platform or version levels you are using, > but the best bet is to upgrade to the latest gd c library from > boutell.com then install the latest Perl GD module. > http://www.boutell.com/gd/ > > Read the README that comes with the GD module... from the > Frequently Asked Q

Re: Can't locate object method "gif" via package "GD::Image"

2008-04-02 Thread sivasakthi
> > You don't say what platform or version levels you are using, > but the best bet is to upgrade to the latest gd c library from > boutell.com then install the latest Perl GD module. > http://www.boutell.com/gd/ > > Read the README that comes with the GD module... from the > Frequently Asked

Perl-GD module installation

2008-04-23 Thread sivasakthi
Hi all, I have tried to install the Perl-GD module from source code, it throws following error when i gave make, GD.xs:7:16: gd.h: No such file or directory GD.xs:8:21: gdfontg.h: No such file or directory GD.xs:9:21: gdfontl.h: No such file or directory GD.xs:10:22: gdfontmb.h: No such file or

Re: removing duplicates

2008-04-29 Thread sivasakthi
On Tue, 2008-02-05 at 14:40 -0500, obdulio santana wrote: > May be this helps > > perl -lne "print if ++$D{$_} == 1" address.txt > > regards > > > I have tried the above command , but it shows the following error, Can't modify single ref constructor in preincrement (++) at -e line 1, near

Re: Perl-GD module installation

2008-05-07 Thread sivasakthi
usr/local/lib GD.o -o blib/arch/auto/GD/GD.so -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/lib -lgd -lfreetype -ljpeg -lpng -lz -lm -lX11 -lXpm /usr/bin/ld: cannot find -lfreetype collect2: ld returned 1 exit status make: *** [blib/arch/auto/GD/GD.so] Error 1 what is the problem ? On Wed, 2008-04-23

Re: Perl-GD module installation

2008-05-07 Thread sivasakthi
On Wed, 2008-05-07 at 09:31 +0200, Rob Coops wrote: > I would say this is the problem: > /usr/bin/ld: cannot find -lfreetype > > At least that is what the compiler says the problem is and I guess it > knows better then I do. So time to install the freetype libs. > (http://www.freetype.org/) >

Re: Perl-GD module installation

2008-05-07 Thread sivasakthi
> GD can be installed with the help of CPAN. > > http://www.libgd.org/releases/ > > then, unpack and install > > tar xvf gd-2.0.35.tar > cd gd-2.0.35 > ./configure > make > make install > > then reinstall the latest GD perl module using cpan: > perl -MCPAN -e shell > CPAN>install GD > > --

Multiline comment in Perl

2008-05-16 Thread sivasakthi
Hi all, How to comment Multiple lines in Perl? Thanks, Siva

Re: what is ^M at the end of a line?

2008-05-21 Thread sivasakthi
The 'script' utility output normally has ^M and other control characters embedded in the output. To have all these control characters removed, try: $ col -b < script.txt > newfile.txt Regards, Siva On Wed, 2008-05-21 at 16:45 +0800, Remy Guo wrote: > hi all, > i have a text processing scri

Include PHP file inside the Perl script

2008-05-25 Thread sivasakthi
Hi all, Is it possible to include php file inside the perl script?? I need the defined php variable (from php files) inside perl script.. how can i achieve that?? Thanks, Siva

How perl program execution happened ?

2008-05-30 Thread sivasakthi
Hi all, It is a very basic question. But i want clear idea about how the perl program execution was happened. I know Perl is a Interpreter language.I need more information about whats going there internally . could you explain or direct me right document? Thanks, Siva

ByteLodaer Module for perl 5.10

2008-06-10 Thread sivasakthi
Hi All, I have installed perl 5.10 in to my Linux(FC9) box. I can't able to detect ByteLoader Module Searching from google i have got the info of ByteLoader is not in build in perl 5.10.. I need rpm or source of ByteLoder module.. Also searched in CPAN ..no use.. could you help me? Thanks, S

How to remove white space from middle of string?

2008-06-13 Thread sivasakthi
Hi all, How to remove white space from middle of the string? for example, $string="hello world welcome"; I want to print helloworldwelcome Thanks, Siva

How can pass hash to subroutine ?

2008-06-13 Thread sivasakthi
Hi all, how can we pass hash to subroutine? and retrieving the hash in subroutine to print values of hash. Thanks, Siva

Re: How can pass hash to subroutine ?

2008-06-16 Thread sivasakthi
On Fri, 2008-06-13 at 20:08 +0800, Jeff Peng wrote: > On Fri, Jun 13, 2008 at 7:50 PM, sivasakthi <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > how can we pass hash to subroutine? and retrieving the hash in > > subroutine to print values of hash. > > >

Compare Excel file

2008-07-15 Thread Sivasakthi
Hi all, Is it possible to compare two excel file by using Perl? Thanks, Siva -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Compare Excel file

2008-07-15 Thread Sivasakthi
Gunnar Hjalmarsson wrote: Sivasakthi wrote: Is it possible to compare two excel file by using Perl? Yes. Let me know how to do that.. or direct me to right document. Thanks.. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: Compare Excel file

2008-07-15 Thread Sivasakthi
Gunnar Hjalmarsson wrote: Sivasakthi wrote: Is it possible to compare two excel file by using Perl? Yes. How can we do that? .. or direct me to right document. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: Compare Excel file

2008-07-16 Thread Sivasakthi
Dr.Ruud wrote: Sivasakthi schreef: Is it possible to compare two excel file by using Perl? Yes, see for example `perldoc -f -s`. Maybe you are interested in the diff of the two binaries? Or do you want to check whether the data in the two files are presented in exactly the same

How can we Install Perl in Windows

2008-07-17 Thread Sivasakthi
Hi all, How can we install perl in windows system? Let me know the steps or direct me right document.. before that is it necessary to installing the IIS? Thanks, Siva -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How can we Install Perl in Windows

2008-07-17 Thread Sivasakthi
sanket vaidya wrote: Download Latest version of ActivePerl for windows from http://www.activestate.com. Unzip the file. Click on installer.bat & Follow the instructions. You require Apache or IIS only for CGI scripting. You can run other programs without that. is that not a free downlo

Re: How can we Install Perl in Windows

2008-07-17 Thread Sivasakthi
sanket vaidya wrote: Yes it is a free download I have downloaded the Active Perl from http://downloads.activestate.com/ActivePerl/Windows/5.10/ActivePerl-5.10.0.1003-MSWin32-x86-285500.msi and tried to install, it says ''This installation page could not be opened.Contact the Application

Re: How can we Install Perl in Windows

2008-07-17 Thread Sivasakthi
sanket vaidya wrote: Open this link: http://www.activestate.com/Products/activeperl/index.mhtml Click on "Get ActivePerl". Follow the procedure for download. Try Downloading "MSI" if u have downloaded "AS package" or vice-versa I can able to installed now..Its working.. Thanks.. -- To un

how to convert data available from excel to hash?

2008-07-20 Thread Sivasakthi
Hi all, How to convert data available from excel sheet to hash table? Thanks, Siva -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Difference between Perl,PHP and Python?

2008-11-13 Thread sivasakthi
No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1786 - Release Date: 11/13/2008 6:01 PM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

How to eliminate the bareword error

2007-05-03 Thread sivasakthi
Hi Users, I have used following code, #!/usr/bin/perl use strict; use warnings; my $x=param("hhh"); my $y=param(sss); my $z=param(ttt); It shows the following error: Bareword "sss" not allowed while "strict subs" in use at aaa.cgi line 16. Bareword "ttt" not allowed while "strict subs" in use a

Re: How to eliminate the bareword error

2007-05-03 Thread sivasakthi
my $x=param("hhh"); > my $y=param("sss"); > my $z=param("ttt"); > > Yaron Kahanovitch > - Original Message - > From: "sivasakthi" <[EMAIL PROTECTED]> > To: beginners@perl.org > Sent: Thursday, May 3, 2007 12:30:03 PM (G

Re: How to eliminate the bareword error

2007-05-03 Thread sivasakthi
tring") { some statements } Thanks, Siva. On Thu, 2007-05-03 at 17:47 +0800, Jeff Pang wrote: > 2007/5/3, sivasakthi <[EMAIL PROTECTED]>: > > I need to use the Post method for "x" variable and Get method for &

Delete a particular line from file

2007-05-14 Thread sivasakthi
Hi, I have used the file in perl, file contains like that, 1176369096.111468 172.16.2.80 TCP_MISS/200 9629 1176378643.614458 172.16.2.80 TCP_MISS/200 9626 1176378681.984662 172.16.2.75 TCP_MISS/200 9626 1176436396.304 1142 172.16.2.80 TCP_MISS/200 13281 1176436397.228916 172

Re: Delete a particular line from file

2007-05-16 Thread sivasakthi
Suppose i have checked the group of I/P addresses for deleting opting then what should i do?? Is there any inbuilt function there for that requirement?? On Tue, 2007-05-15 at 12:25 +0800, Jeff Pang wrote: > sivasakthi 写道: > > Hi, > > > > I have used the file in perl, fi

Re: Delete a particular line from file

2007-05-16 Thread sivasakthi
On Wed, 2007-05-16 at 08:01 -0400, Chas Owens wrote: > > Assuming that you have a list of IP addresses you want to skip in @ip, > you could say > > #!/usr/bin/perl > > use strict; > use warnings; > > OUTER: > while() { >my ($time, $lport, $ip, $stats, $rport) = split; >for my $skip_ip

Re: Delete a particular line from file

2007-05-17 Thread sivasakthi
On Thu, 2007-05-17 at 07:50 -0400, Chas Owens wrote: > Did you type > > OUTER: > while() { > > or just > > while () { I have used as, OUTER: while () { Thanks, Siva -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Read data in to Hash

2007-05-17 Thread sivasakthi
Hi, Is it a correct way to read datas in to hash? use strict; use warnings; $userpath = "/tmp/sample.txt"; open FF, "cat $userpath |" || die "can't access log file\n"; while () { %arrskip{$_}=1; } close (FF); Thanks, Siva

Re: Delete a particular line from file

2007-05-17 Thread sivasakthi
On Tue, 2007-05-15 at 12:25 +0800, Jeff Pang wrote: > sivasakthi 写道: > > Hi, > > > > I have used the file in perl, file contains like that, > > > > 1176369096.111468 172.16.2.80 TCP_MISS/200 9629 > > 1176378643.614458 172.16.2.80 TCP_MISS/200 9626

Re: Delete a particular line from file

2007-05-17 Thread sivasakthi
Yes i got it.. it works fine well. Thanks a lots.. Siva > Hello, > > Here you may try to do, > while() { > chomp; > $arrskip{$_} = 1; > } > > chomp would remove newline symbol (on Unix it's "\n") reading from the > original file. > -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Comparing the Perl encrypted files

2007-06-15 Thread sivasakthi
Hi Guys, is it possible to comparing the encrypted Perl files?? Thanks, Siva

Re: Comparing the Perl encrypted files

2007-06-15 Thread sivasakthi
I have mentioned the binary Perl files by encrypted Perl files.. is it not right one? On Fri, 2007-06-15 at 13:56 +0200, Jenda Krynicky wrote: > From: sivasakthi <[EMAIL PROTECTED]> > > Hi Guys, > > > > is it possible to comparing the encrypted Perl files?? > &g

Re: Comparing the Perl encrypted files

2007-06-15 Thread sivasakthi
> text mode: Line endings are translated to/from Perl's end-of-line > character "\n" to the host operating system's end-of-line character > (CRLF for DOS based machines, LF for UNIX based machines, etc.) > > binary mode (aka raw): No translations are made. Characters/bytes are > written directly

What is order of retrieving the values from Hash??

2007-06-25 Thread sivasakthi
Hi Guys... I have checked the following file.. #!/usr/bin/perl use strict; use warnings; my ($a,$b); my %array = ("jan",1,"Feb",2,"Mar",3); while (($a,$b)= each(%array)) {print $a.$b. "\n";} the output is like that, jan1 Mar3 Feb2 What is order of retrieving the values from Hash?? Thanks

Executing more commands in remote m/c using Net::SSH::perl Modules

2007-07-25 Thread sivasakthi
Hi All, I have checked the Net::SSH::perl modules, Just i have logged in to the remote machine and executing the command. The code is following, #! /usr/bin/perl use strict; use warnings; use Net::SSH::Perl; my $hostname="xx.xx.xx.xx"; my $user=; my $pass=xxx; my $ssh = Net::SSH::Perl->n

what is the relation bn Perl version , Perl byteloader & OS version

2007-07-25 Thread sivasakthi
Hi all, what is the relation between Perl version , Perl byteloader & OS version?? could u direct me the correct links??? Thanks.

How to read a very large file??

2007-08-08 Thread sivasakthi
Hi Guys, I have a very large file. It may be contain 1lac lines.. also it length is increased in dynamically.. Each time ( per 5 min) i need to read the contents from file & do some work .. Suppose i have read the lines for first 5 min then after some time it reads the same line also , so it

Re: How to read a very large file??

2007-08-09 Thread sivasakthi
On Wed, 2007-08-08 at 08:12 -0400, Chas Owens wrote: > On 8/8/07, sivasakthi <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > > > I have a very large file. It may be contain 1lac lines.. also it > > length is increased in dynamically.. > > Each time ( per 5 min

Re: How to read a very large file??

2007-08-13 Thread sivasakthi
On Wed, 2007-08-08 at 05:58 -0700, Paul Lalli wrote: > On Aug 8, 8:09 am, [EMAIL PROTECTED] (Sivasakthi) wrote: > > I have a very large file. It may be contain 1lac lines > > Just FYI, that doesn't mean anything outside of India. You might want > to use more conventiona

Problem in opening the file using Tail Module

2007-08-29 Thread sivasakthi
Hi Guys, I have used the following code to print the log files. but nothing is printed even it doesn't show the warning message, no prompt is returned. what is the mistake in code , could u help me to find the pbm??? #!/usr/bin/perl use strict; use warnings; use File::Tail; my $file=File::Tai

Re: AW: Problem in opening the file using Tail Module

2007-08-29 Thread sivasakthi
>File::Tail is waiting at least 10 second before starting to work. if it is taking at least 10 second to start then how it is faster than using open to access the file??? On Wed, 2007-08-29 at 11:49 +0200, Angerstein wrote: > File::Tail is waiting at least 10 second before starting to work. > If

Re: Problem in opening the file using Tail Module

2007-08-29 Thread sivasakthi
i didn't get your point , please explain little bit more... Thanks, Siva On Wed, 2007-08-29 at 17:55 +0800, Jeff Pang wrote: > I tested the codes,which run well for me. > Give a try to add '$|++' to disable IO buffer. > > 2007/8/29, sivasakthi <[EMAIL PROTECTED]

Re: Problem in opening the file using Tail Module

2007-08-29 Thread sivasakthi
> > File::Tail will read only lines that are added to the file after it has been > opened. Your program will simply sleep until something new is added. > > Rob when my log file is updated then it works correctly thanks to all for reply

Spliting the log files

2007-08-29 Thread sivasakthi
Hi All, I have used the following code to calculate from log files, #!/usr/bin/perl use strict; use warnings; use File::Tail; my $file=File::Tail->new("/log/path"); my $line= undef; while (defined($line=$file->read)) { my ($time,$lport,$ip,$stats,$rport) = split; print "$ip/n"; } The log fil

Passing variables to subroutine

2007-09-03 Thread sivasakthi
Hi All, I have tested the following script for reading the log files and write in to the file, #!/usr/bin/perl use strict; use warnings; use File::Tail; my $file=File::Tail->new("/log/path"); while (defined(my $line=$file->read)) { my ($time,$lport,$ip,$stats,$rport)=split" ",$line; &writedata;

Reading a log file from backwards

2007-09-03 Thread sivasakthi
Hi Guys, I have read a log file from backwards, the code is following, #!/usr/bin/perl use strict; use warnings; use File::ReadBackwards; my $bw = File::ReadBackwards->new("/log/path") or die $!; my $line; while (defined($line = $bw->readline)) { print $line; } $bw->close(); In the abo

Re: Reading a log file from backwards

2007-09-04 Thread sivasakthi
> snip > > Unless you really need to read it backwards, I would suggest saving > the point you stopped processing by calling tell() on the filehandle > and saving the number given to you to a config file and then, on the > next run of program, reading the number and calling seek() on the > fileh

Re: Reading a log file from backwards

2007-09-05 Thread sivasakthi
On Wed, 2007-09-05 at 07:06 -0400, Chas Owens wrote: > On 9/4/07, sivasakthi <[EMAIL PROTECTED]> wrote: > snip > > Thanks for your suggestions.. but i need to read a file from backwards... > > First time reading from backwards & set the last line position to one >

is it possible to building the perl pgms by using make/gmake??

2007-09-13 Thread sivasakthi
Hi guys, is it possible to building the perl programmes by using the make/gmake utility..?? Thanks, Siva

Pbm in Sorting the hash

2007-09-21 Thread sivasakthi
Hi all, I have file like that following, site_name access_time www.google.com14:13:04|14:13:04| 172.16.5.49 14:12:10|14:12:56| 172.16.65.53 14:12:41|14:12:58| 172.16.671.35 14:12:29| from the above file i need to print the sit

Re: Pbm in Sorting the hash

2007-09-23 Thread sivasakthi
On Fri, 2007-09-21 at 12:47 -0400, Chas. Owens wrote: > On 9/21/07, sivasakthi <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I have file like that following, > > > > site_name access_time > > www.google.com14:13:04|14:13:

undefined symbol: Perl_sv_2iv_flags

2007-10-23 Thread sivasakthi
Hi All, I have executed the cgi files , It throws the following error in error log, symbol lookup error: /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/GD/GD.so: undefined symbol: Perl_sv_2iv_flags,referer: http://... Perl version is: v5.8.8 perl-Gd rpm is : perl-GD-2.35-1.fc5

How to check the file is modified or not?

2007-10-29 Thread sivasakthi
Hi All, How to check the file is modified or not? Thanks, Siva

Re: Hash Variables

2007-10-29 Thread sivasakthi
On Mon, 2007-10-29 at 17:06 +0530, Kaushal Shriyan wrote: > > > #!/usr/bin/perl -w > > %states = ( "California","Sacramento", "Wisconsin","Madison", "New York", > "Albany"); > > print "Capital of California is " . $states{"California"} .

Troubling in seek the file position up to # no of files

2007-11-02 Thread sivasakthi
Hi all, In my script doing the following requirement, I need to check one temporary file , that file contains the position of the file handle if the temporary file is not present then open "abc" file and read the datas for some calculation after that update the last line position to the tempora

Re: Troubling in seek the file position up to # no of files

2007-11-02 Thread sivasakthi
> > > > suppose the temporary is present then need to seek the already stored > > file position from "abc" file , if the that position is not catched > > in "abc" file then will continue the seeking process from "abc.0", if > > also not catched then seeking from "abc.1" this is up to > > "

Get the byte position of previous line from last line in file

2007-11-05 Thread sivasakthi
Hi All, I have the text file as following, this first line this is the second line this the third line this is the fourth line this is the sixth line this is the seventh line while opening and reading that text file, is it possible to get the byte position of "this is the sixth line" ?? Tha

How to get teh line before a last from file

2007-11-06 Thread sivasakthi
Hi All, How to get the line before a last line from file?? Thanks, Siva

Reading the file using tell and seek method

2007-11-06 Thread sivasakthi
Hi All, I have one requirement, the file content is following, it is a dynamic file, 1194240905.451105 127.0.4.56 TCP_MISS/200 2853 GET cache_object://localhost/info - NONE/- text/plain 1194240905.452 0 127.0.0.1 TCP_MISS/200 2853 GET cache_object://localhost/info - NONE/- text/plain 11

Re: Reading the file using tell and seek method

2007-11-06 Thread sivasakthi
stamp1,$Lelapsed,$Lhost,$Ltype,$Lsize,$Lmethod,$Lurl,$Luser, $Lhierarchy,$Lconttype)=split(" ",$tmpp); $pos=tell(FH) if/^$$Ltimestamp1/; close FH; open(FH,">tmp.txt") || die "can't open the file\n"; print FH "$pos $$Ltimestamp1"; close FH; On Wed, 200

How to convert month in name in to digit number

2007-11-07 Thread sivasakthi
Hi All, How to convert month in name in to digit number, for example the month is Apr then converted in to 04.. how to do that?? Thanks, Siva

Re: Reading the file using tell and seek method

2007-11-11 Thread sivasakthi
> > It sounds as if you really want to know whether the log file has been > updated between one invocation of your program and the next. Is that > it? (It's helpful to tell us what you want to accomplish, not just how > you hope to accomplish it. Storing a byte position into a temporary > file i

Check the Number is floating point number or not

2007-11-16 Thread sivasakthi
Hi All, How to check the number is floating point number or not??? I have tried the code following, #! /usr/bin/perl use strict; use warnings; my $val=124718247874.543; if ($val =~ m#^(\d+)\.(\d\d\d)#; { print "it is a float\n"; } Thanks, Siva

Checking the two variable

2007-11-16 Thread sivasakthi
Hi all, I have the two variables, like below, $val1=[15/Apr/2005:11:46:35 +0300]; $val2=[12/Nov/2007:14:59:00 +0530]; I want to check these two variables are equal or not.. I know the method of splitting the each column and compare it.. but it too large.. is it possible to check with easily??

Re: Checking the two variable

2007-11-18 Thread sivasakthi
> > What you've written isn't valid Perl, so I shall have to guess at what > you might mean. If you have two strings like this > >$val1 = '15/Apr/2005:11:46:35 +0300'; >$val2 = '12/Nov/2007:14:59:00 +0530'; > > then you can compare them with eq, like this > >print "equal" if $val1

Check the entered value is single digit or not

2007-12-02 Thread sivasakthi
Hi all, I have tried to find the entered number is single digit or not.. the code is following, #! /usrbin/perl use strict; use warnings; my $tmp=; if($tmp =~ m/(\d)/) { print"NO IS SINGLE DIGIT\n"; } else { print"NO IS NOT SINGLE DIGIT\n"; } but it always passed the condition even if we ent

Re: Check the entered value is single digit or not

2007-12-02 Thread sivasakthi
> > Try this improvment code: > > #! /usrbin/perl > use strict; > use warnings; > > my $tmp=; > chomp $tmp; # though it's not needed chomp it here, but you'd better > to do this. > if($tmp =~ /^\d{1}$/) > { > print"IT IS SINGLE DIGIT\n"; > } else{ > print"IT IS NOT SINGLE DIGIT\n"; >

Assigning javascript variable to perl variable

2007-12-03 Thread sivasakthi
Hi all, How to assign the javascript variable to perl variable?? Thanks Siva

Perl script running

2007-12-10 Thread sivasakthi
Hi all, I have running the perl script. In that script i have opened the very large file (2.5GB) and made some calculations.. It running up to 49 minutes after that it stopped the execution.. # time ./test.pl Terminated real49m1.364s user23m23.992s sys 3m46.519s What is the reason

Re: Perl script running

2007-12-10 Thread sivasakthi
On Mon, 2007-12-10 at 10:11 +0100, patmarbidon wrote: > patmarion has written > > perhaps you have sme quotas or restriction about CPU usage for a script. > Can you have a look in your /var/log/messages just after the perl script > stop > > > > yes it is stopped due to out of memory ,and th