Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Extract lines between two patterns

by philipbailey (Deacon)
on Jan 22, 2012 at 08:39 UTC ( #949235=note: print w/replies, xml ) Need Help??


in reply to Re^2: Extract lines between two patterns
in thread Extract lines between two patterns

There is nothing much wrong with the code you have posted (with the provisos mentioned below) but the problem appears to be in the pattern(s) in your if statement. The error message indicates that you are using some undefined variable in one or other of the pattern matches in that statement. However, you don't have any variables within the patterns shown--perhaps you should post the actual code?

A couple of other comments: please put your code in <code> tags--this would make it much more readable. You would probably be better to use lexical (my) rather than package (our) variables in your use case. Finally, you are missing a terminating "/" in the first pattern match, presumably because you have retyped a shortened version of your code. There is nothing wrong with showing PerlMonks a shortened version of your code--in fact it is encouraged--but it needs to be runnable, and demonstrate the bug.

  • Comment on Re^3: Extract lines between two patterns

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2022-01-17 10:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (51 votes). Check out past polls.

    Notices?