problems with "for" loop in perl

Light Poster
22Aug2011,21:10   #1
newbie_10's Avatar
if ($string =~ /(.*?)u(.*)/s)
{

my $pre = $1;
my $post = $2;

for my $index(0..4)
{
print "$pre$index$post\n";
push(@register_list, "$pre$index$post");
}

}

is there a way to make it print like 0,1,2,3,4 and not just 1,2,3,4??
John Hoder
23Aug2011,01:26   #2
Scripting's Avatar
Try to change 0 with -1. But Im not 100% suree.
Team Leader
30Aug2011,13:42   #3
pradeep's Avatar
Code:
[pradeep@dev tmp]# perl -e ' for my $i(0..4) { print "$i\n"; }'
0
1
2
3
4