The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


URL::Grab - Perl extension for blah blah blah


  use URL::Grab;
  my $cnt_hsh;

  # IMPORTANT note (see also #32434):
  # Please note, that URL::Grab doesn't return you the content itself as a
  # scalar, but instead, returns a hash-reference. The keys of the
  # hash are the URLs.

  $cnt_hsh = $urlgrabber->grab('');

  # The content then is available in $cnt_hsh->{''}->{''}.
  # Sorry, this is a design issue, that cannot be changed any more :-)
  # If you are fetching only one URL, you would better use grab_single!

  $cnt_hsh = $urlgrabber->grab(qw(;
  $cnt_hsh = $urlgrabber->grab([ qw( ]);
  $cnt_hsh = $urlgrabber->grab([ qw( ], '');

  $cnt_hsh = $urlgrabber->grab_mirrorlist(

  # Please note, the following example will return only *one* hash-reference - it will use the
  # first that works!!!
  $cnt_hsh = $urlgrabber->grab_mirrorlist([qw(

  $cnt_hsh = $urlgrabber->grab_mirrorlist([qw(

  $cnt_hsh = $urlgrabber->grab_mirrorlist(

  $cnt_hsh = $urlgrabber->grab_mirrorlist([qw(


URL::Grab is a perl module that drastically simplifies the fetching of files from within a local source (eg. local filesystem) and/or remote sources (eg. http, ftp). It is designed to be used in programs that need common (but not necessarily simple) url-fetching features. It is extremely simple to drop into an existing program and provides a clean interface to protocol-independant file-access. Best of all, URL::Grab takes care of all those pesky file-fetching details, and lets you focus on whatever it is that your program is written to do!


None by default.



Project mailinglist:

Project website:


Oliver Falk, <>


Gary Krueger <> for pointing out some issues - #32434 - #32433


Copyright (C) 2006-2008 by Oliver Falk <>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.