Edited on 8/20, 2017

The Solution:

for (@loot) {s/\xD7//g};

The Problem:

I really am a novice at this. I learned some basic CGI programming using Perl 5 from a book. I needs have always been pretty simple and so I have not signed up for any in depth training. Sorry for only supplying one line of code in my original post. I will supply more code in this post. Before doing so I would like to explain a little more about what I am doing in hopes that the additional information will help.

First of all I am creating a fansite for a game that I play. I am copying information from a wiki site and putting it into my makeCREATURE.cgi that saves pre-formatted data to a file that will be used by my creatureDETAIL.cgi script when visitors want to view details of a creature from the game. I use Firefox to view wiki information and perform my copy. I then paste it into Chrome (because that is where my bookmarks are for my stuff). I came up with the necessary substitution statements to take care of everything that needed to be eliminated or html tags added, etc. I just could not come up with the substitution for the multiplication sign. Viewing source of wiki page shows that × is being used for the multiplication sign. I created a small program (lootALTERATION.cgi) to handle all the substitutions I could figure out how to do. I then remove the multiplication signs manually and copy/paste into my makeCREATURE.cgi script.
An example of the information I am copying/pasting is: 0-100× Gold Coin

I will supply the entire code from lootALTERATION.cgi:

#!/usr/bin/perl use CGI qw/:standard/; push(@INC, "/cgi-bin"); require("cgi-lib.pl"); &ReadParse(*input); @loot = $input{'loot'}; print "Content-type: text/html\n\n"; print qq{ <HTML> <HEAD> <TITLE>Loot Alteration</TITLE> </HEAD> <BODY> <form method=post action="../cgi-bin/lootALTERATION.cgi"> <table border=2 width=100%> }; print "<tr>\n"; print "<td>Loot</td>\n"; print "<td>Copy / Paste Paragraph.<br><textarea name=loot cols=70 rows +=10>"; for (@loot) {s/ //g}; for (@loot) {s/×//g}; for (@loot) {s/ \(semi-rare\)//g}; for (@loot) {s/ \(rare\)//g}; for (@loot) {s/ \(very rare\)//g}; for (@loot) {s/ \(extremely rare\)//g}; for (@loot) {s/\R/<br>/g}; print "@loot"; print "</textarea></td>\n"; print "</tr>\n"; print qq{ <tr> <td><input type=submit></td> <td><input type=reset></td> </tr> </table> </form> </BODY> </HTML> };
I'm sure there are better and more efficient ways of doing things. Not against learning new ways, but this way works and it is what I know. Please be kind. :)
adding <code>for (@loot) {s/\N{MULTIPLICATION SIGN}//g}; only causes error 500


In reply to replace multiplication symbol (&times;) by michael.kitchen

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.