I have something like the following code
my @array = ["hello","hi","fish"];
sub this_sub {
my $first = $_[0];
my $second = $_[1];
my $third = $_[2];
}
this_sub(@array);
How can I make the array expand into an argument list so that first, second and third will get the value from the strings in the array. like below.
- first = "hello"
- second = "hi"
- third = "fish"