I guess it's not merging that you want so much as slicing You were closeish, but the interpolation was not helping at all. Try this:
use strict; use warnings; my $pics_to_find = 3; my @found_images = (1, 2, 3, 4, 5); my @saved_images = @found_images[0 .. $pics_to_find - 1]; print "@saved_images";
Prints:
1 2 3
In reply to Re: merging arrays
by GrandFather
in thread merging arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |