in reply to new to perl
or you need to promote it to become a more persistent item, usually with a name to access to it, such as an array:print "$_ \n" foreach (17, $var, "a string");
my @array = (17, $var, "a string"); # now you can access the element of the original list by using the arr +ay, e.g.: my $first_num = $array[0];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: new to perl
by AnomalousMonk (Archbishop) on May 01, 2014 at 10:38 UTC | |
by Laurent_R (Canon) on May 01, 2014 at 14:01 UTC |