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
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
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
-
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
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]
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
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
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
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
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
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
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
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] ;
>
-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
14 matches
Mail list logo