in reply to Re: Remove $
in thread Remove $

That looks fabulous but I have no idea what it's actually doing. Can you explain it? Please type slowly. ;-)

Replies are listed 'Best First'.
Re^3: Remove $
by SFLEX (Chaplain) on Aug 27, 2007 at 19:22 UTC
    #!/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