Help for this page

Select Code to Download


  1. or download this
        # Set up a callback that collect image links
        my @imgs = ();
    ...
            return if $tag ne 'a';  # we only look closer at <img ...>
            push(@imgs, values %attr);
        };
    
  2. or download this
        return if $tag ne 'img';
        push(@imgs, $attr{'src'});
    
  3. or download this
        return if $tag ne 'a';
        push(@imgs, $attr{'href'});
    
  4. or download this
        @imgs = map { $_ = url($_, $base)->abs; } @imgs;
    
  5. or download this
        @imgs = map { $_ = url($_, $base)->abs->as_string; } @imgs;