use strict; use warnings; use Test::More; my @cases = ( { in => 'http://etc...', out => 'http://etc...' }, { in => 'foo//bar', out => 'foo' }, ); plan tests => scalar @cases; for my $t (@cases) { my $have = $t->{in}; $have =~ s#(?{out}, "$t->{in} correctly processed"; }