in reply to URI plus File::Spec::Unix -- good idea or bad?
#!/usr/bin/perl -- use strict; use warnings; use URI; my $base = 'http://foobert.org/dir/odir'; my $file = 'foo.html'; my $uri = URI->new($base); local $\=$/; print $uri->path_segments( $uri->path_segments, $file ); print $uri; print $uri->host('I-RTFM.org'); print $uri; __END__ dirodir http://foobert.org/dir/odir/foo.html foobert.org http://I-RTFM.org/dir/odir/foo.html
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: URI plus File::Spec::Unix -- good idea or bad?
by mreece (Friar) on Aug 25, 2006 at 16:35 UTC | |
by mreece (Friar) on Aug 25, 2006 at 16:55 UTC |