The "s" means to substitute. The next section is where you put the thing you want replaced. The next section is where you put what you want to replace it with -- in this case nothing. The "g" means to do it globally -- every time it appears. Without the "g" it would just replace one of them.
------------------ JPD
[This message has been edited by JPDeni (edited February 26, 1999).]
Thanks for the info! One thing. How do I incorporate this into DBMan?
The string in question is an item number in my database. It is $rec{'Itemno'}. I am trying to cut down on database fields so I want to use the item number also as a javascript function. You can't have funky characters as javascript functions, so I need the dashes taken out before it prints.
I need to know, how can I put this in my SUB_HTML_RECORD in my HTML.PL file.
This is how I tried it: |; if ($rec{'Itemno'}) { print qq| $rec{'Itemno'} =~ =~ s/-//g;|; } print qq|