use strict; use warnings; my $page = join '', ; my( @raw_groups ) = split /src\s*=\s*['"]/, $page; my( @images, @texts ); foreach my $raw ( @raw_groups ) { my( $image, $text ); next unless ( $image, $text ) = $raw =~ m/^ (http:.+?) # Capture the file URL ['"].+?> # Anchors (.+?) # Capture the text <\/td # Final anchor /isx; print "$image => $text\n"; push @images, $image; push @texts, $text; } __DATA__

Image001 Description of image here
Image002 Description of image here