|
|
Question : stripslashes in perl
|
|
In Perl, how can I perform the same action that stripslashes does in php?
|
Answer : stripslashes in perl
|
|
Shouldn't be too hard. According to the php docs you just remove backslashes from \", \', and \\.
sub stripslashes() {
$_ = shift(); s/\\'/'/; s/\\"/"/; s/\\\\/\\/;
return $_;
}
|
|
|
|
|