in reply to RE: Control Flow Puzzle
in thread Control Flow Puzzle
This way you put all input into one string, and just pick out the menus one by one. No tricky loops anymore. I don't know how much you rely on the markers to start at the beginning of the line, but you could remove the newlines in the regex, of course.undef $/; $_=<>; s/(\n\037.*?\n\* Menu.*?\n\037)//; $mymenu=$1;
I pray I didn't say something very stupid here. Please excuse me if this is the case..... And credits to little, who only yesterday showed me the undef $/ trick.
Cheers,
Jeroen
Post Posting: Mr. Schwartz, `Learning perl' was my first contact with perl, and I really loved it, and enjoyed reading it very much! So, thanks a lot...
I was dreaming of guitarnotes that would irritate an executive kind of guy (FZ)
|
|---|