for (@image_extensions) { if ($url =~ /\.${_}$/) {