in reply to Can't locate object method "file" via package "URI::http"

First, listen to ikegami. Second, try this as a last resort:

#!/usr/bin/perl use URI::file; my $file = URI::file->new( 'http://foo.com/bar/file.foo' )->file; print $file, "\n";

Replies are listed 'Best First'.
Re^2: Can't locate object method "file" via package "URI::http"
by Anonymous Monk on Oct 20, 2009 at 11:38 UTC
    sub URI::file { return (shift->path_segments)[-1] }
Re^2: Can't locate object method "file" via package "URI::http"
by Anonymous Monk on Jul 03, 2009 at 17:38 UTC
    doesn't work