Help for this page

Select Code to Download


  1. or download this
    my $num_ent_chars = "()";  # add other characters as needed, but ^ - [
    + ] are special
    $data =~ s/([$num_ent_chars])/sprintf("&#x%4x;",ord($1))/ge;
    
  2. or download this
    perl -le '$_="me [ and ] you ^ and - him";  $c="][^-";  s/[$c]/xxx/g; 
    + print'