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

Posted on 2007-10-02
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?
Question by:texasreddog
    LVL 24

    Expert Comment

    yes. That should work fine
    LVL 24

    Accepted Solution

    To search for unicode, you can match \x{3FB} or whatever.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
    There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now