Advertisement
joachip

remove unwanted chars in perl

Jul 31st, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #/bin/perl
  2. # Example perl script that shows how to remove unwanted characters
  3.  
  4. my $txtbody = chr(8).chr(10).chr(31).chr(32).chr(33).chr(65).chr(230).chr(255);
  5. $txtbody =~ s/[^\040-\377]//g; # keep only characters 32 to 255
  6. print $txtbody;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement