in reply to Re^2: write html code with perl
in thread write html code with perl
"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
|
|---|