[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: URI Comparisons (something practical)



#!/usr/bin/perl
use warnings;
use strict;
use URI;

foreach my $result (URI::eq('http://example.org', 'http://example.org/' ),
URI::eq('http://example.org', 'HTTP://example.org' ),
URI::eq('http://example.org', 'http://example.org:' ),
URI::eq('http://example.org', 'http://example.org:80' ),
URI::eq('http://example.org', 'http://Example.org' ),
URI::eq('http://example.org/~smith', 'http://example.org/%7Esmith'),
URI::eq('http://example.org/~smith', 'http://example.org/%7esmith'),
URI::eq('http://example.org/%7Esmith', 'http://example.org/%7esmith'),
URI::eq('http://example.org/%C3%87', 'http://example.org/C%CC%A7' ), )
{
print $result ? "true\n" : "false\n";
}


__OUTPUT__
true
true
true
true
true
true
true
true
false


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature