#!/usr/bin/perl use URI; my @test = ( ["http://example.com/", "http://example.com"], ["HTTP://example.com/", "http://example.com/"], ["http://example.com/", "http://example.com:/"], ["http://example.com/", "http://example.com:80/"], ["http://example.com/", "http://Example.com/"], ["http://example.com/~smith/", "http://example.com/%7Esmith/"], ["http://example.com/~smith/", "http://example.com/%7esmith/"], ["http://example.com/%7Esmith/", "http://example.com/%7esmith/"], ["http://example.com/%C3%87", "http://example.com/C%CC%A7"], ); foreach my $i (@test) { printf "%-29s%-29s%d\n", $$i[0], $$i[1], URI::eq($$i[0], $$i[1]); }