in reply to Remove $

my $text2 = 'db1$/SQL/GEMINI/StoredProcs/pboValidateClientRefNo_Client +ID.sql'; my $hmm = chr(36); $text2 =~ s{\Q$hmm}{}gso;

That should do it...

Good Luck ^^

Replies are listed 'Best First'.
Re^2: Remove $
by rawsr71 (Novice) on Aug 27, 2007 at 17:19 UTC
    That looks fabulous but I have no idea what it's actually doing. Can you explain it? Please type slowly. ;-)
      #!/usr/bin/perl my $text2 = 'db1$/SQL/GEMINI/StoredProcs/pboValidateClientRefNo_Client +ID.sql'; # chr(36) = $ # http://perldoc.perl.org/functions/chr.html # It's another way to represent $ # my $hmm = chr(36); my $hmm = '$'; # \Q Disable pattern metacharacters until \E # http://perldoc.perl.org/perlreref.html#ESCAPE-SEQUENCES # \Q makes it work =D $text2 =~ s{\Q$hmm}{}g; print "Content-type: text/html\n\n"; print "<html><h1>$text2</h1></html>\n";
      same thing as
      #!/usr/bin/perl my $text2 = 'db1$/SQL/GEMINI/StoredProcs/pboValidateClientRefNo_Client +ID.sql'; $text2 =~ s{\Q$}{}g; print "Content-type: text/html\n\n"; print "<html><h1>$text2</h1></html>\n";
      Is that good enough?

      *Edited