Instead of the number increasing (TEST1, TEST2, TEST3) it's appending the number (TEST1 TEST11 TEST111)i.e. #!/usr/bin/perl use strict; my @array = qw(TEST); my $num = 1; foreach (@array) { $_ .= ($num +=1); }
In reply to A simple question regarding join by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |