aNewBeginning
Programmer
- Aug 23, 2008
- 1
Suppose I wish to print 1234567890 x 3, and I wish to implement it in a reasonable way as follows:
my @count_to_ten = 0..9;
my $number_ruler = @count_to_ten x 3;
#number_ruler is "101010"
or
my $number_ruler = "@count_to_ten" x3;
#number_ruler is 0 1 2 3 4 5 6 7 8 90 1 .....
Is it possible to store a string of the variables from an array (without spaces) into a scalar?
my @count_to_ten = 0..9;
my $number_ruler = @count_to_ten x 3;
#number_ruler is "101010"
or
my $number_ruler = "@count_to_ten" x3;
#number_ruler is 0 1 2 3 4 5 6 7 8 90 1 .....
Is it possible to store a string of the variables from an array (without spaces) into a scalar?