"Regarding your closing remark about character entities for the non-ASCII characters, I think one rule will suffice: use HTML::Entities. ..."

Use of HTML::Entities was my first thought too; however, the one line that didn't follow the general pattern seemed so different, that I decided to suggest special rules or manual editing.

For all lines (except the que_esta_pasando.png one), the "my @name = ..." line seemed to embody the general pattern to the extent possible from the code provided by the OP: trapped.png becomes Trapped, the_look.png becomes The Look, and so on.

For the que_esta_pasando.png line, the general pattern is not applied beyond splitting on underscores. I think your "Update" alludes to this but I thought I'd point out the differences, as I see them, in this specific case.

All of this could be coded and, for some massive international image library with ongoing maintenance requirements, may well be the way to go. However, the OP states "I'm working in a basic html page, actually it is just a list of links to some pictures.": in this instance, rules (such as a lookup table which you've suggested) or manual editing seems more sensible and a lot less work.

-- Ken


In reply to Re^3: write html code with perl by kcott
in thread write html code with perl by lenieto3

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.