in reply to Safer (and cleaner) way to print user-supplied text.
#assuming input is in $string $string=join('',map( m![<>\\/]! ? "#".char($_).";" : $_, split(//, $st +ring))); # ^^^^^^^ These are trouble characters [download]