> #define DS_FILEVERSION 7,0,0,0462
>
> What I want to do is have the ability to increment the first
> two zero's
> after the 7 on demand. I may accasionaly want to increment
> the first zero,
> making the number 7,1,0,0462, or a I may want to just
> increment the second
> zero, making the number 7,0,1,0462
>
> Here is how I have been trying to go about this. The code
> below bumps the
> first zero just fine, resulting in the number being
> 7,1,0,0462. The problem
> is that I can't figure out how to make it bump the second
> zero, resulting in
> 7,0,1,0462
Does this help?
while(<>)
{
#define DS_FILEVERSION 7,0,0,0462
unless ( s/(\d),(\d),(\d),(\d{4})/join ',', $1, $2 + 1, $3, $4/e
)
{
print STDERR "error\n";
}
unless ( s/(\d),(\d),(\d),(\d{4})/join ',', $1, $2, $3 + 1, $4/e
)
{
print STDERR "error\n";
}
print;
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]