Re: Leading zeros kept or not kept while increment or decrement

2007-06-12 Thread Adriano Ferreira
On 6/12/07, Angerstein <[EMAIL PROTECTED]> wrote: Perl does $x="0001"; $x++; print $x; Output: 0002 BUT $x="0002"; $x--; print $x; Output: 1 Why and how can I avoid that. (yes, i know about printf) So use it ;-) Read the section "Auto-increment and Auto-decrement" in " perldoc perlop " w

Leading zeros kept or not kept while increment or decrement

2007-06-12 Thread Angerstein
Perl does $x="0001"; $x++; print $x; Output: 0002 BUT $x="0002"; $x--; print $x; Output: 1 Why and how can I avoid that. (yes, i know about printf) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/