in reply to Regex Question
Use URI.
use strict; use warnings; use URI qw( ); for ( 'http://www.example.com/cgi.pl?x=y#anchor', 'http://www.example.com/cgi.pl?x=y', 'http://www.example.com/', 'http://www.example.com', ) { my $uri = URI->new_abs('/', $_); print("$uri\n"); }
http://www.example.com/ http://www.example.com/ http://www.example.com/ http://www.example.com/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex Question
by Anonymous Monk on Jan 04, 2009 at 06:33 UTC | |
by Corion (Patriarch) on Jan 04, 2009 at 09:33 UTC | |
by ikegami (Patriarch) on Jan 04, 2009 at 06:35 UTC | |
by Anonymous Monk on Jan 04, 2009 at 06:42 UTC | |
by ikegami (Patriarch) on Jan 04, 2009 at 06:44 UTC | |
by Anonymous Monk on Jan 04, 2009 at 06:43 UTC | |
by ikegami (Patriarch) on Jan 04, 2009 at 06:49 UTC | |
|