Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5845941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:30:24+00:00 2026-05-22T12:30:24+00:00

Unmatched [ in regex; marked by <– HERE in m/ <– HERE / at

  • 0

Unmatched [ in regex; marked by <– HERE in m/ <– HERE / at ./pdf_parse.pl line 37.

Actually I’m parsing .pdf file word by word [in order to make a dictionary out of it]
line 37:-

if(grep(!/$word/,@line_rd)){
}

Well actual word where parser script stops working is in different font [in side the pdf which I’m parsing], is that the culprit here ?
Whether CAM::PDF recognizes words in different fonts ? What care should i do, in order to stop this !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:30:25+00:00Added an answer on May 22, 2026 at 12:30 pm

    You need to quote $word in the regular expression if it can contain special chars (like [ or even .). Try with:

    if (grep(!/\Q$word\E/, @line_rd)) {
      ...
    }
    

    If you want to make a dictionary of all the words, use a hash:

    my %allwords;
    ...
      # each time you have a new word incoming from the parser:
      $allwords{$word}++;
    

    At the end, the %allwords hash will contain the distinct words as keys, and the word count as values. You could e.g. print it using:

    map {
     print "Word $_: count: ", $allwords{$_}, "\n";
    } (sort keys %allwords);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've asked a related question here: Show unmatched html tags in Notepad++ Having only
I need to compare two dictionaries and to update another dictionary with unmatched items
I have been stuck here for a good while and seem to nail the
Compiling (or executing) a perl program with unmatched array braces ([ ]) or scope
If I have a file containing some escaped parens, how can I replace all
I have a perl file that takes in txt files and compares them to
i have this little class to make a multiple replace on a string: import
Is there a way to highlight unmatched HTML tags in Notepad++? For instance, if
I'm writing a ksh script and apparently have an unmatched double quote ( )
I need to read a HTML file and search for some tags in it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.