jlongino has asked for the wisdom of the Perl Monks concerning the following question:

Sorry if this turns out to be something really stupid, but I've either fried my brain (which isn't that unusual) or the preferences signature box is doing something wierd. I'm trying to make the following code block my signature:
@a=split??,'just lose the ego and get involved!'; for(split??,'afqtw{|~'){print $a[ord($_)-97]}
Now the above is correct, but when I try to paste the same block (tags and all) into the signature preferences box and submit it, the following is substituted:
@a=split??,'just lose the ego and get involved!'; for(split??,'afqtw{|~'){print $a<A HREF="/index.pl?node=ord%28%24_%29- +97&lastnode_id=479">ord($_)-97</A>}
It has screwed up the square brackets [ and ] and I've tried many different entity substitutions (thanks ChemBoy and chipmunk for several suggestions) with no luck.

I'd appreciate someone maybe trying to set their own signature to this code block and let me know if it works. I know that's asking alot, but I would certainly appreciate it.

Replies are listed 'Best First'.
Re: Signature box interpolation problem
by blakem (Monsignor) on Aug 29, 2001 at 10:08 UTC
    Hmm... unless I escaped this incorrectly, you should be able to cut and paste this into your sig file and have it work... do not surround this by code tags:

    <pre><TT><FONT size=-1>@a=split??,'just lose the ego and get involved!';
    for(split??,'afqtw{|~'){print $a&#91;ord($_)-97&#93;}</FONT></TT></pre>

    -Blake

      Just taking my own advice for a test drive.....

      Yep, it appears to work... a bit of a pain though.

      @a=split??,'just lose the ego and get involved!';
      for(split??,'afqtw{|~'){print $a[ord($_)-97]}

      -Blake

Re: Signature box interpolation problem
by chipmunk (Parson) on Aug 29, 2001 at 15:50 UTC
    I just played with the "Your signature" textarea in my User Settings, and experienced the behavior you describe. I wrote in some text using square brackets and code tags, and after submitting the contents of the textarea had been munged. This looks like a bug.

    This workaround won't help if you really want the effect of code tags, but you can replace the square brackets with &#91; and &#93;. That seems to work:

    [chipmunk]

Re: Signature box interpolation problem
by Beatnik (Parson) on Aug 29, 2001 at 09:06 UTC
    Tried code tags? <CODE> and </CODE> to make sure the square brackets arent interpolated.

    Greetz
    Beatnik
    ... Quidquid perl dictum sit, altum viditur.
      yes, I thought that I had made that clear in my post. I've also tried code tags within code tags and entity substitutions within code tags.