Possible duplicate:
What does ~ ~ do in Perl?
In the Perl program I'm learning (namly plutil.pl ), I see a lot of =~ in the XML parser part. For example, here is the UnfixXMLString function (lines 159 to 167 in 1.7 ( $VERSION erroneously declared as "1.5")):
sub UnfixXMLString { my ($s) = @_; $s =~ s/</</g; $s =~ s/>/>/g; $s =~ s/&/&/g; return $s; }
From what I can say, his C prototype will be (C-like) string UnfixXMLString(string s) , and he uses the =~ operator for parameter ( s ) and then returns the modified string, but what does he do?
operators perl
Cole johnson
source share