Re: Regex to remove zeros after . in file name

2007-11-12 Thread Ashok Varma
s/\.0+(\d+)/\.\1/; The above substitution works. Ashok On 11/13/07, danlamb <[EMAIL PROTECTED]> wrote: > > Hey guys, > > I need a regex to remove zeros after the . in a file name if they are > followed by another digit. > > Example: XX.001 becomes XX.1 > > Any ideas? I've been banging

RE: errror while installing DBD::MYSQL.

2007-11-12 Thread Siva Prasad
I am still stuck up with the below problem. Please help me in intalling DBD::mysql on WinXP Thanks PP -Original Message- From: Siva Prasad [mailto:[EMAIL PROTECTED] Sent: Thursday, November 01, 2007 11:09 AM To: 'Tom Phoenix' Cc: 'beginners@perl.org' Subject: RE: errror while installing

RE: learning WWW::Mechanize

2007-11-12 Thread Dan Fish
Assuming what you are really looking for from this is the page returned by the search, then you need to move the line: print $mechObject -> content; to the end. -Dan --- #!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; my $queryString = 'HelloWor

Re: Regex to remove zeros after . in file name

2007-11-12 Thread Gunnar Hjalmarsson
danlamb wrote: I need a regex to remove zeros after the . in a file name if they are followed by another digit. Example: XX.001 becomes XX.1 s/\.0+(?=[1-9])/./; -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Regex to remove zeros after . in file name

2007-11-12 Thread danlamb
Hey guys, I need a regex to remove zeros after the . in a file name if they are followed by another digit. Example: XX.001 becomes XX.1 Any ideas? I've been banging my head on my desk for an hour over this. Thanks, Dan Lamb -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

Re: learning WWW::Mechanize

2007-11-12 Thread Rob Dixon
newBee wrote: Hi after going over the FAQ and the examples I decided to write a small script to understand the WWW::Mechanize module. Since Google has one field and two buttons I thought this would be a straight forward one. So I wrote the fallowing script. At the end of the script I thought the

Re: Regex Help

2007-11-12 Thread Jenda Krynicky
From: "Dr.Ruud" <[EMAIL PROTECTED]> > Rob Dixon schreef: > > Dr.Ruud: > >> John W . Krahn: > > >>>/Powerball:/ and my @numbers = /\d+/g; > >> > >> I wouldn't use such a conditional "my". > > > > There is no conditional 'my': it is a de[c]laration. > > I call it a conditional "my". A "my"

Re: Hash slice

2007-11-12 Thread Jenda Krynicky
From: "Beginner" <[EMAIL PROTECTED]> > On 9 Nov 2007 at 20:04, Jenda Krynicky wrote: > > @[EMAIL PROTECTED] = map [$valone[$_], $valtwo[$_]] (0..$#valone); > > > > > > The map produces a list of arrayrefs, each referenced array contains > > one item from @valone and one from @va

learning WWW::Mechanize

2007-11-12 Thread newBee
Hi after going over the FAQ and the examples I decided to write a small script to understand the WWW::Mechanize module. Since Google has one field and two buttons I thought this would be a straight forward one. So I wrote the fallowing script. At the end of the script I thought the script will fill

Re: Reading the file using tell and seek method

2007-11-12 Thread Tom Phoenix
On 11/11/07, sivasakthi <[EMAIL PROTECTED]> wrote: > Can't use string ("1193892901.686") as a SCALAR ref while "strict refs" in > use at telseek.pl_ line The line number that you omitted points to a place in your source code where you dereference a reference to a scalar, but the reference in que

Re: subtracting parsed GMT(zulu) time from perl GMT time

2007-11-12 Thread Tom Phoenix
On 11/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The problem is that when I parse the valid time, I just have a number > like 0030, so if Perl's valid time is 2330, it would be an absolute > difference of 2300 according to the math but only an hour difference > in time. Is there a func

Re: Date addition-reg

2007-11-12 Thread jeevs
On Oct 23, 12:15 pm, [EMAIL PROTECTED] (Jeevs) wrote: > On Oct 23, 2:19 pm, [EMAIL PROTECTED] wrote: > > > > > Hi > > > Thaks for ur valuable info.. > > > my code is > > > my $total_nights="3"; > > $total_nights = "0".$total_nights if ((!($total_nights =~ > > /^0/)) && ($total_nights < 10))

subtracting parsed GMT(zulu) time from perl GMT time

2007-11-12 Thread shadkeene
Hi, I'm extracting some advisories(number of advisory, type of advisory, and time of advisory) from the internet and am going to store them in a database. But the site stores more than just current advisories on the page, so I need to go through them and ensure they are current. The advisory is va

Re: Regexes matching ^ and $

2007-11-12 Thread Gunnar Hjalmarsson
Nigel Peck wrote: Just a quick question about ^ and $ in regexes when using /m. Will they match next to any embedded newline characters? i.e. \015\012, \015 and \012 or will they only match next to the same newline that \n will match? i.e. platform specific What happened when you tried it?

Regexes matching ^ and $

2007-11-12 Thread Nigel Peck
Hi, Just a quick question about ^ and $ in regexes when using /m. Will they match next to any embedded newline characters? i.e. \015\012, \015 and \012 or will they only match next to the same newline that \n will match? i.e. platform specific Thanks Nigel -- To unsubscribe, e-mail: [EMAI

Re: Hash slice

2007-11-12 Thread Beginner
On 9 Nov 2007 at 20:04, Jenda Krynicky wrote: > From: "Beginner" <[EMAIL PROTECTED]> > > On 9 Nov 2007 at 16:35, Jenda Krynicky wrote: > > > > > From: "Beginner" <[EMAIL PROTECTED]> > > > > #!/bin/perl > > > > > > > > use strict; > > > > use warnings; > > > > use Data::Dumper; > > > > > > > > m

Re: Reading the next line in a file from the current position

2007-11-12 Thread Praveena Vittal
Thanks for all your comments. Jeff Pang wrote, On 11/12/2007 12:26 PM: On Nov 12, 2007 2:48 PM, Praveena Vittal <[EMAIL PROTECTED]> wrote: Hi, Thanks for your comments.. I like to know what does the below represents.. $' from `perldoc perlvar': $' The string followin

Re: Reading the next line in a file from the current position

2007-11-12 Thread Gunnar Hjalmarsson
Praveena Vittal wrote: I like to know what does the below represents.. $' Then why don't you look it up in the docs instead of asking hundreds of people to read the docs for you? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTE

Re: About FASTA file

2007-11-12 Thread Pau Marc Munoz Torres
Hi Fasta file is just a text file, so you can read it as any other text file using perl. The name usually is somthing.fasta, but you can keep the old name (output.txt) The format is: > sequence description sequence (60 letters) sequence (60 letters) For more info, reed this link http://en.wi