We help IT Professionals succeed at work.

Perl: search for 8bit characters in lines from a text file

texasreddog
texasreddog asked
on
209 Views
Last Modified: 2008-01-09
I'm trying to figure out the best way to search for 8bit characters in a line of data in a text file, but I'm not sure if I'm doing it right or not.  The one test I'm doing is this:

if($line =~ /\x8E/) {

I don't have access to the Encode::Unicode perl module, so I can't put that in my script.  Is the above the correct way to search for 8bit characters in a line?
Comment
Watch Question

CERTIFIED EXPERT

Commented:
yes. That should work fine
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.