Do you know where your variables are? | |
PerlMonks |
Excluding non ascii charactersby millsperl (Novice) |
on Apr 06, 2009 at 18:58 UTC ( [id://755816]=perlquestion: print w/replies, xml ) | Need Help?? |
millsperl has asked for the wisdom of the Perl Monks concerning the following question:
Need to exclude non ascii characters, i.e. greater than 7F(hex). Currently the perl script excludes a couple of characters, such as null.
This is done by declaring the character to be excluded, i.e.
$remove_char = chr(hex("00"));
Then each line in the file is read and the null replaced by space, i.e.
$myline =~ s/$remove_char/ /g;
How should I code the declaration and statement that does the substitution?
Back to
Seekers of Perl Wisdom
|
|