sambartle
15-02-2004, 08:14
I know this is probably really easy...
Is there a way to attach a number onto the end of a scalar name inside another scalar variable..
for i = 1 to 3 (i know this isnt perl's for - its just for easiness)
$currentpart = '$part' + i;
print "$currentpart";
next i
id like it to print out...
$part1
$part2
$part3
(ie add the i value to the $part bit (not the contents of $part))
i tried to use . as well for string joining ('$part' . i) but am happy to report i don't know perl and at this rate never will.
Is there a way to attach a number onto the end of a scalar name inside another scalar variable..
for i = 1 to 3 (i know this isnt perl's for - its just for easiness)
$currentpart = '$part' + i;
print "$currentpart";
next i
id like it to print out...
$part1
$part2
$part3
(ie add the i value to the $part bit (not the contents of $part))
i tried to use . as well for string joining ('$part' . i) but am happy to report i don't know perl and at this rate never will.