#! perl -slw use strict; sub incOdo { my @odo = @_; my $wheel = $#odo; # until( $wheel < 0 || $odo[ $wheel ] < 9 ) { until( $odo[ $wheel ] < 9 || $wheel < 0 ) { $odo[ $wheel ] = 0; $wheel--; } if( $wheel < 0 ) { return; } else { $odo[ $wheel ]++; return @odo; } } my @odo = (0) x 2; for( 1 .. 102 ) { print join '', @odo = incOdo( @odo ); } #### 1 2 3 ... 97 98 99 #### 1 2 3 ... 98 99 Use of uninitialized value within @odo in numeric lt (<) at C:\test\junk31.pl line 9. Use of uninitialized value within @odo in numeric lt (<) at C:\test\junk31.pl line 9.