Your problem code is doing something that this sample code is not, because this sample code behaves as you expect.
#!/usr/bin/perl -w use strict; my @array = qw(TEST TEST TEST); my $num = 1; foreach (@array) { $_ .= ($num +=1); } print join(" ",@array)."\n"; # produces: TEST2 TEST3 TEST4
In reply to Re: A simple question regarding join
by jasonk
in thread A simple question regarding join
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |