デコードするときの質問なんですが

$value =~ s/</</g; <と>はタグ拒否だとおもうんですが
$value =~ s/>/>/g;  "と&を置き換えるのはなんでですか? 
$value =~ s/"/"/g;
$value =~ s/&/&/g;