in reply to WWW::Mechanize - offline debugging

file:///some_file.html is a valid URI:
use strict; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get('file:///test.html'); print $mech->content;

Update:

The file URI file:///some_file.html is a shortcut representation of file://localhost/some_file.html, and refers to the file some_file.html in the root directory.

The file URI for /home/espressoguy/mechtest/site_a.html would be file:///home/espressoguy/mechtest/site_a.html.

If you have spaces in the directory names, encode them as %20:
file:///Documents%20and%20Settings/EspressoGuy/My%20Documents/Mech%20Test/site_a.html

Replies are listed 'Best First'.
Re^2: WWW::Mechanize - offline debugging
by Anonymous Monk on Nov 07, 2009 at 23:18 UTC
    $ echo >1.html $ perl -MURI::file -le"print URI::file->new(shift)->abs(URI::file->cwd +)" 1.html file:///D:/temp/1.html $ lwp-request file:1.html ECHO is on. $ lwp-request file:///D:/temp/1.html ECHO is on. $