Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A simple question regarding join
by jasonk (Parson) on Feb 19, 2003 at 21:37 UTC | |
|
Re: A simple question regarding join
by Limbic~Region (Chancellor) on Feb 19, 2003 at 21:50 UTC | |
|
Re: A simple question regarding join
by bart (Canon) on Feb 20, 2003 at 02:06 UTC | |
|
Re: A simple question regarding join
by physi (Friar) on Feb 19, 2003 at 23:28 UTC | |
by Limbic~Region (Chancellor) on Feb 20, 2003 at 00:03 UTC | |
by physi (Friar) on Feb 20, 2003 at 00:09 UTC | |
|
Re: A simple question regarding join
by steves (Curate) on Feb 19, 2003 at 21:39 UTC |