Re: parse data from a report file

2011-01-26 Thread John W. Krahn
loan tran wrote: Hi All, Hello, I'm trying to parse data from a report file and I'm having trouble producing desired results. Here is a data example from the report: PONumber Line InvoicedQty UnitCost Amount Curr Extended Amount FrDate Company Department Account ItemNu

Re: Out of memory, HTML::TableExtract

2011-01-26 Thread Jins Thomas
Hi DeRykus Sorry for replying late. I was able to test DB_File with your example, thanks. But i'm facing a problem. I'm not able to access multi dimensional array with this DB_File. Address is being stored just a string. Do we have some options where we can access multi dimensional arrays (like

parse data from a report file

2011-01-26 Thread loan tran
Hi All, I'm trying to parse data from a report file and I'm having trouble producing desired results. Here is a data example from the report: PONumber Line InvoicedQty UnitCost Amount Curr Extended Amount FrDate Company Department Account ItemNum ItemDescription -

Re: Regex

2011-01-26 Thread Ramesh Kumar
From: Rob Dixon To: beginners@perl.org Cc: Greg J Sent: Thu, January 27, 2011 11:38:07 AM Subject: Re: Regex On 27/01/2011 02:15, Greg J wrote: > I am trying to extract numeric values from a data file and I'm having > trouble writing a regular expression that would do this. > > My data looks

Re: Regex

2011-01-26 Thread Rob Dixon
On 27/01/2011 02:15, Greg J wrote: I am trying to extract numeric values from a data file and I'm having trouble writing a regular expression that would do this. My data looks like this:<{5, 26}{20, 42, 64}{23, 48}> I am trying to turn this into a list of lists [ [5, 26], [20, 42, 64], [23,48]

Re: Regex

2011-01-26 Thread Jim Gibson
At 8:15 PM -0600 1/26/11, Greg J wrote: I am trying to extract numeric values from a data file and I'm having trouble writing a regular expression that would do this. My data looks like this: <{5, 26}{20, 42, 64}{23, 48}> I am trying to turn this into a list of lists [ [5, 26], [20, 42, 64], [2

Re: Regex

2011-01-26 Thread Ramesh Kumar
Is this what you're trying to do Greg? Try running the script below: #!/usr/bin/perl use warnings; use strict; use Data::Dumper; my $data = "<{5,26} {20,42,64} {23,48}>"; # assuming it's read in from a file $data =~ s/(?<=})\s*(?={)/,/g; # replace spaces between number sets with commas

Regex

2011-01-26 Thread Greg J
I am trying to extract numeric values from a data file and I'm having trouble writing a regular expression that would do this. My data looks like this: <{5, 26}{20, 42, 64}{23, 48}> I am trying to turn this into a list of lists [ [5, 26], [20, 42, 64], [23,48] ] Any pointers would be greatly app

Re: string index fucntion

2011-01-26 Thread Shawn H Corey
On 11-01-26 01:06 PM, Sunita Rani Pradhan wrote: I think , this is like : index( $string, 'at', index( $string, 'at' ) + 1); Please let me know , if I am wrong. I think you are correct. #!/usr/bin/perl use strict; use warnings; my $string = "The cat is sat on the mat"; for my $i ( 0 .. leng

RE: string index fucntion

2011-01-26 Thread Sunita Rani Pradhan
I think , this is like : index( $string, 'at', index( $string, 'at' ) + 1); Please let me know , if I am wrong. Thanks Sunita -Original Message- From: Shawn H Corey [mailto:shawnhco...@gmail.com] Sent: Wednesday, January 26, 2011 10:44 PM To: beginners@perl.org Subject: Re: string index

Re: string index fucntion

2011-01-26 Thread Shawn H Corey
On 11-01-26 11:53 AM, Sunita Rani Pradhan wrote: There is a sting as : "The cat is sat on the mat" . I want to get index of second occurrence of"at" using index function . Can it be possible? Yes. my $second_at = index( $string, 'at', index( $string, 'at' )); -- Just my

string index fucntion

2011-01-26 Thread Sunita Rani Pradhan
Hi All There is a sting as : "The cat is sat on the mat" . I want to get index of second occurrence of"at" using index function . Can it be possible? Thanks Sunita

Re: array like split of string

2011-01-26 Thread Peter K. Michie
On Jan 23, 2:55 am, jwkr...@shaw.ca ("John W. Krahn") wrote: > Peter K. Michie wrote: > > I have this regex expression in a script that appears to do an array > > like split of a string but I cannot figure out how it does so. Any > > help appreciated > > > $fname = ($0 =~ m[(.*/)?([^/]+)$])[1] ; >

Re: [linux] unable to check in code to svn when files contain spaces or characters

2011-01-26 Thread ed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Jan 24, 2011 at 08:21:33PM +, ed wrote: ... > @arg = [ "svn", "add", "File with spaces" ]; My bad... as pointed out by Shlomi Fish, this is incorrect and should instead be: @arg = ( "svn", "add", "File with spaces" ); - -- Best rega