Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Strange grep and matching behaviour...

by buckaduck (Chaplain)
on May 22, 2002 at 21:26 UTC ( [id://168592]=note: print w/replies, xml ) Need Help??


in reply to Strange grep and matching behaviour...

This may or may not be your issue, but it has certainly happened to me many times... But maybe Perl is right and you are wrong. Perhaps the file does not really contain lines with "fubar". Even if it looks like "fubar" is there, are you sure that there aren't control characters hidden in the file? e.g. ("fu^Abar")? It might be worthwhile to check.

And since I'm assuming that you aren't really looking for the literal text "fubar", there are other possible issues. Are you matching whitespace characters correctly? Is this a multi-line pattern? Maybe you should give us an exact example.

Update: 200th post!

buckaduck

  • Comment on Re: Strange grep and matching behaviour...

Replies are listed 'Best First'.
Re: Re: Strange grep and matching behaviour...
by graff (Chancellor) on May 22, 2002 at 22:20 UTC
    I'll second buckaduck's speculations -- I tried Clownburner's code myself, copied directly from his post but using a file name and search pattern of my own, and the result was exactly as expected; i.e. the same as running unix grep with the given pattern on the given file.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://168592]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (None)
    As of 2024-04-25 00:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found