Possible Duplicate:
What does =~ do in Perl?
In a Perl program I am examining (namly plutil.pl), I see a lot of =~
on the XML parser portion. For example, here is UnfixXMLString
(lines 159
to 167
on 1.7):
sub UnfixXMLString {
my ($s) = @_;
$s =~ s/</</g;
$s =~ s/>/>/g;
$s =~ s/&/&/g;
return $s;
}
From what I can tell, it's taking a string, modifying it with the =~
operator, then returning that modified string, but what exactly is it doing?