Re: Padded 3 digit numeric series

2006-03-11 Thread Shawn Corey
Harry Putnam wrote: Taking the chicken way out... but I can't think of the right tricky search strings to uncover a tried and true way to output a 3 digit padded numeric series. In this case its for file names. And needs to roll over to 4 digit in the event there are enough files. There is no

Re: Padded 3 digit numeric series

2006-03-11 Thread Chas Owens
On 3/11/06, Chris Devers <[EMAIL PROTECTED]> wrote: > On Sat, 11 Mar 2006, Harry Putnam wrote: > > > Its just the numeric part I need a jump start on. > > Have you looked at sprintf yet? `perldoc -f sprintf` > > That's probably the easiest way. > > Alternatively, you could do some kind of silly sub

Re: Padded 3 digit numeric series

2006-03-11 Thread John W. Krahn
Harry Putnam wrote: > Taking the chicken way out... but I can't think of the right tricky > search strings to uncover a tried and true way to output a 3 digit > padded numeric series. In this case its for file names. And needs to > roll over to 4 digit in the event there are enough files. > > Th

Re: Padded 3 digit numeric series

2006-03-11 Thread Chris Devers
On Sat, 11 Mar 2006, Harry Putnam wrote: > Its just the numeric part I need a jump start on. Have you looked at sprintf yet? `perldoc -f sprintf` That's probably the easiest way. Alternatively, you could do some kind of silly subroutine that padded two zeroes if $n > 10, one zero if $n > 100,

Padded 3 digit numeric series

2006-03-11 Thread Harry Putnam
Taking the chicken way out... but I can't think of the right tricky search strings to uncover a tried and true way to output a 3 digit padded numeric series. In this case its for file names. And needs to roll over to 4 digit in the event there are enough files. There is no problem of clobbering

Re: Grep frustration

2006-03-11 Thread Jay Savage
On 3/10/06, John W. Krahn <[EMAIL PROTECTED]> wrote: > Jay Savage wrote: > > > > I've actually found it depends partly on architecture, too; the regex > > engine seems better optimized on some platforms than others. I was > > quite surprised once when benchmarking a script on a fairly modern OS > >