Gossamer Forum
Home : General : Perl Programming :

Removing Pipes from a string.

Quote Reply
Removing Pipes from a string.
For some strange reason, I am not able to remove pipes from a string. The cgi script gives me an error with the following line:

$results =~ s/|//sg;

What should it be?

------------------
http://www.techdevelopers.com
ASP, HTML, CGI, Flash, and more!

HPCalc.com - English
Official HP Calculator Site
http://www.hpcalc.com/english

Quote Reply
Re: Removing Pipes from a string. In reply to
You have to escape the pipe:

$results =~ s/\|//sg;

--Mark