C
Cosmic Cruizer
I would like to create something similar to the following:
my $sm1 = "apple";
my $sm2 = "orange";
my $sm3 = "lemon";
my @sm_list = qw($sm1 $sm2 $sm3);
foreach (@sm_list) {
print $_;
}
I would like the output to be: apple orange lemon
I understand why this does not work, but is there some way I can change the
print statement to print get my desired output?
my $sm1 = "apple";
my $sm2 = "orange";
my $sm3 = "lemon";
my @sm_list = qw($sm1 $sm2 $sm3);
foreach (@sm_list) {
print $_;
}
I would like the output to be: apple orange lemon
I understand why this does not work, but is there some way I can change the
print statement to print get my desired output?