in reply to
Regular Expression from Hell
What's the target of that operation? Just add leading 0's with 5 digits?
pelagic
Comment on
Re: Regular Expression from Hell
Replies are listed 'Best First'.
Re: Re: Regular Expression from Hell
by
Anonymous Monk
on Apr 15, 2004 at 15:34 UTC
Is to say if a ZIP number is coming in with 4 digits only add a "0" at the begging. Else if it already has 5 digits leave it alone.
[reply]
Re: Re: Re: Regular Expression from Hell
by
pelagic
(Priest)
on Apr 15, 2004 at 15:37 UTC
printf '%05d', $test;
pelagic
[reply]
[d/l]
In Section
Seekers of Perl Wisdom