@MacLurker - you could do it all in the Perl script by assigning the generated string to a variable before printing it, say $pretty_url, then sending that to the clipboard from within Perl with a line something like the following:

`/bin/echo '$pretty_url' | /usr/bin/pbcopy`;