in reply to Compare URIs
UPDATE: Ack, updated after ikegami's comments.use URI; my $u1 = URI->new('http://host/bob?jack=2&joe=1'); my $u2 = URI->new('http://host/bob?joe=1&jack=2'); if ( sort_query($u1->query()) ne sort_query($u2->query())) { print "They're different all right\n"; } sub sort_query { join('&', sort split /&/, $_[0]) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Compare URIs
by ikegami (Patriarch) on Oct 18, 2005 at 16:21 UTC |