Re: RE efficiency question.

2002-10-17 Thread Simon Wistow
On Thu, Oct 17, 2002 at 01:56:22PM +0100, Kevin Gurney said: P.S If anyone feels so inclined, a better way of matching the numbers would be most appreciated as I'm simply picking everything in a 12 char range each time. Why not split on whitespace? $line =~ s/\*\* TOTALS\s+//; my vals = split

Re: RE efficiency question.

2002-10-17 Thread Simon Wilcox
On Thu, 17 Oct 2002, Kevin Gurney wrote: ** TOTALS 5533.860.000.000.00 5533.86 0.00 5533.860.00 5533.86 5533.86 P.S If anyone feels so inclined, a better way of matching the numbers would be most appreciated as I'm simply picking

Re: RE efficiency question.

2002-10-17 Thread Belden Lyman
Kevin Gurney wrote: P.S If anyone feels so inclined, a better way of matching the numbers would be most appreciated as I'm simply picking everything in a 12 char range each time. In the interest of more than one way, here's something else: pos($_) = 9; # skip first 9 chars push ext,

Re: RE efficiency question.

2002-10-17 Thread Shevek
On Thu, 17 Oct 2002, Belden Lyman wrote: Kevin Gurney wrote: P.S If anyone feels so inclined, a better way of matching the numbers would be most appreciated as I'm simply picking everything in a 12 char range each time. In the interest of more than one way, here's something else:

Re: RE efficiency question.

2002-10-17 Thread Graham Barr
On Thu, Oct 17, 2002 at 09:37:11PM +0100, Shevek wrote: On Thu, 17 Oct 2002, Belden Lyman wrote: pos($_) = 9; # skip first 9 chars push ext, $1 while /(.{12})/g; No need for the while. pos($_) = 9; # skip first 9 chars push ext, /.{12}/g; Graham.

Re: RE efficiency question.

2002-10-17 Thread Belden Lyman
Shevek wrote: On Thu, 17 Oct 2002, Belden Lyman wrote: Kevin Gurney wrote: P.S If anyone feels so inclined, a better way of matching the numbers would be most appreciated as I'm simply picking everything in a 12 char range each time. In the interest of more than one way, here's

Re: RE efficiency question.

2002-10-17 Thread Shevek
On Thu, 17 Oct 2002, Belden Lyman wrote: the numbers would be most appreciated as I'm simply picking everything in a 12 char range each time. In the interest of more than one way, here's something else: pos($_) = 9; # skip first 9 chars push ext, $1 while /(.{12})/g; Wouldn't it be