in reply to Problem with input strings that have "[]" brackets

Also realized that not the [] are the problem, it is the matching string. The unprotected "()" parenthesis gave a problem! This too would been fine too:
my $pattern = 'Category\("notestrecord"\)';
I am tired need to go home. :-) But yes I should use quotemeta, specially because I am reading it from parameters. :-) Thank you!
  • Comment on Re: Problem with input strings that have "[]" brackets

Replies are listed 'Best First'.
Re^2: Problem with input strings that have "[]" brackets
by Laurent_R (Canon) on May 08, 2015 at 18:03 UTC
    my $pattern = 'Category\("notestrecord"\)';
    Yes, sure this works, and that's essentially what quotemeta is doing to your string..

    Je suis Charlie.