Hello, I have a perl script that reads data from a file. Some of the data has &'s in it. I need it treated as regular text. The fact that it's in strings doesn't seem to be a problem, but passing that string into part of a system(); command is causing me a problem. The & might be anywhere in the string. What's the proper way to handle this in perl? Thanks! -Raymond
Eh, escaping it in the original data file seems to do the trick instead of trying to fix it while inside the perl script. -Raymond
The important starting point is to ensure you are "encoding" the correct level of information. - HTML entities (such as quot, apos) - URLs (with ampersand as parameter separator) - Escaped chars (more at coding level such as quotes, pipe chars etc). Then you need to "encode it" it appropriately for the destination (is it in a string, MYSQL data record, printed on a web page). Sometimes, a string may be encoded several times before it is decoded - keeping track is important as well.