Re: Regular expression help

2009-08-25 Thread Chas. Owens
On Wed, Aug 26, 2009 at 02:23, Dave Tang wrote: > Dear list, > > I am trying to import entries in a csv file into a relational database, > however there are entries such as: > > a,b,c,d,e,"f1,f2","g1,g2" which spoil my split(/,/). snip Sounds like a job for [Text::CSV][1]. Of course, you an alway

Re: Regular expression help

2009-08-25 Thread Uri Guttman
> "DT" == Dave Tang writes: DT> a,b,c,d,e,"f1,f2","g1,g2" which spoil my split(/,/). DT> Could someone provide some guidance? use a CSV module. parsing csv files is a pain with regexes (even if doable). there are very stable and fast csv modules on cpan so get one and use it. uri --

Regular expression help

2009-08-25 Thread Dave Tang
Dear list, I am trying to import entries in a csv file into a relational database, however there are entries such as: a,b,c,d,e,"f1,f2","g1,g2" which spoil my split(/,/). The quotes group f1 and f2 as a single entry. I know each each database entry should be atomic, but I'll deal with that

RE: Perl module Net::Oping Error

2009-08-25 Thread Ajay Kumar
You you put below word in "" Quote it treat as a string and if it kept in single quote it treat as character so for the DNS(domain name space) it should treat as charaterwies not as string so that it can read data from the link -Original Message- From: Dr.Ruud [mailto:rvtol+use...@is

Re: Perl module Net::Oping Error

2009-08-25 Thread Dr.Ruud
fzz wrote: print "Latency to `one' is " . $ret->{'www.example.org'} . "\n"; Why is there a backquote in that string? -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
> -Original Message- > From: Shawn H. Corey [mailto:shawnhco...@gmail.com] > Sent: Monday, August 24, 2009 11:57 > To: Wagner, David --- Senior Programmer Analyst --- CFS > Cc: Tony Esposito; Beginners Perl > Subject: Re: one liner in Windows to replace string > > Wagner, David --- Senior

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
> -Original Message- > From: Shawn H. Corey [mailto:shawnhco...@gmail.com] > Sent: Monday, August 24, 2009 11:00 > To: Tony Esposito > Cc: Beginners Perl > Subject: Re: one liner in Windows to replace string > > Tony Esposito wrote: > > perl -p -i.bak -e 's/CONSTANT/VARIABLE/' C:\test.txt

Re: Trying to remove text in inverted commas.

2009-08-25 Thread Dr.Ruud
Gregory Machin wrote: I'm writing a script to import logs into a Mysql .. My Perl is rusty and I'm battling with a convention on the one column. I need to remove the text in inverted commas "Prashil" 106 so that just the number 106 remains.. I have been trying the following regex s/(\"([^"]+)\

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
From: Tony Esposito [mailto:tony1234567...@yahoo.co.uk] Sent: Monday, August 24, 2009 14:09 To: Shawn H. Corey Cc: Wagner, David --- Senior Programmer Analyst --- CFS; Beginners Perl Subject: Re: one liner in Windows to repl

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
From: Tony Esposito [mailto:tony1234567...@yahoo.co.uk] Sent: Monday, August 24, 2009 13:20 To: Shawn H. Corey; Wagner, David --- Senior Programmer Analyst --- CFS Cc: Beginners Perl Subject: Re: one liner in Windows to repl

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
> -Original Message- > From: Tony Esposito [mailto:tony1234567...@yahoo.co.uk] > Sent: Monday, August 24, 2009 10:46 > To: Beginners Perl > Cc: tony1234567...@yahoo.co.uk > Subject: one liner in Windows to replace string > > perl -p -i.bak -e 's/CONSTANT/VARIABLE/' C:\test.txt >