Hello,
I've had the same problem of copying code and pasting it directly into my Perl editor. However, I found that if I copy the code directly from the "browser" view (not source view) and then paste it into WordPad using Paste Special > Unformatted Text, it works just fine... it looks just like the "browser" view. From there, you can copy the script from the WordPad document and paste it normally into just about any editor (I'm using PerlBuilder). Hope this helps.
Mike S.