Help for this page

Select Code to Download


  1. or download this
    use strict;
    
    ...
    $line =~ s/([^\s\w])/'&#'.ord($1).';'/ge;
    
    print "$line\n";
    
  2. or download this
    s/([^ a-zA-Z0-9])/'&#'.ord($1).';'/ge   # a single, literal space