Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Same pattern match different lines

by brassmon_k (Sexton)
on Aug 20, 2001 at 22:36 UTC ( #106297=note: print w/replies, xml ) Need Help??

in reply to Same pattern match different lines

Never mind I'm dumb I figured it out.

$para is the input variable for what text file I tell the script to read as input. I was telling it to read $lines whatever number from @lines limited by a match on a paragraph heading. Of course it's going to give me errors if it's matching the paragraph heading from each paragraph and the ($msisdn) isn't where it expected it to be. It needs to read from the whole file. With $para I just tell it to look in each paragraph for the ($msisdn) $/ already did all the work. I was telling it to be to exact. I was telling the script look on this line when I should've been saying look in each paragraph if you match this and this then print. Instead I was telling the script look for a match on these lines (I didn't even tell it to look through paragraphs I was just telling the script to look for matches on lines. God I feel dumb...I am dumb for making that mistake. I just had to sit back and realize that it was a simple answer. Aren't those the hardest ones though...The thing that gets overlooked. Sorry to bother everyone.

The Brassmon_k
PS. I think it's kind of BS. to get minus points for readability edits but hey I guess you do what you gotta do.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://106297]
[ambrus]: "could evacuate to open schoolyard and then call or go back to school" => wait what? like power cycling the school building by removing all the kids and then reentering them? how would that fix the problems?
[ambrus]: https://www.xkcd. com/723/ is relevant about earthquakes and phones
[ambrus]: must be this earthquake
[ambrus]: (It's convenient that I live in a place with no earthquakes or hurricanes. One less bad thing to look out for.)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2017-01-18 12:40 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (161 votes). Check out past polls.