- or download this
my @images = ( [], [] );
{
...
@{ $images[1] } = $imgstr[1] =~ m/(\w+\.jpg)/gi;
}
- or download this
my @images;
{
my @imgstr = split /\|/, $str, 2;
push @images, [ $_ =~ m/(\w+\.jpg)/gi ] for @imgstr;
}
- or download this
my @images = map { [ $_ =~ m/(\w+\.jpg)/gi ] } split /\|/, $str;