You already are using the CGI module, or something whose API is strikingly similar to the API of CGI.pm. Maybe you could just try out the example given to you to see whether it works for you or not. The following self-contained program works for me. Maybe it works for you too?

use strict; use CGI qw(a); my $url = 'http://perlmonks.net/'; print a({-href => $url, -rel => 'nofollow'}, $url);

If that still doesn't work for you, maybe you can show us the exact differences. If you need character-exact layout instead of what CGI.pm (or the module you're using whose API is similar to that of CGI.pm) provides you, then maybe one of the templating systems will do for you?


In reply to Re^5: rel="nofollow" tag syntax? by Corion
in thread rel="nofollow" tag syntax? by bobafifi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.