Hi,
You shouldn't need to escape it if its in the substitution:
use strict;
my $test = "zzzzz";
$test =~ s/zzzzz/&/g;
print "FOO: $test \n";
FOO: &
Doing it like this:
...will still work (exactly the same output), but its not necessary :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
You shouldn't need to escape it if its in the substitution:
Code:
#!perl use strict;
my $test = "zzzzz";
$test =~ s/zzzzz/&/g;
print "FOO: $test \n";
Quote:
C:\Users\Andy>perl test.pl FOO: &
Doing it like this:
Code:
$test =~ s/zzzzz/\&/g;...will still work (exactly the same output), but its not necessary :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!