good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^4: Unable to get the paragraph in the list of hashes. Getting single lines instead.by pritesh_ugrankar (Monk) |
on Sep 21, 2020 at 19:49 UTC ( [id://11122029]=note: print w/replies, xml ) | Need Help?? |
Hi, Sorry for the late reply. Just logged in after work. This is awesome!!. Truly a genius solution!!. There's a lot I've learnt from your code. Just so that I get it right, when you say next if !/^(\d+):(.*)/s; it means, just move next if you find a line that starts with one or more digits, followed by a colon, and then some stuff. I am not sure what the /s does though, does it mean "spill" this regex over even if there is a new line? Further down, the next if !/^\s*?([^=]+)\s*=\s*(.*)/ I guess means
Please let me know if my understanding is right. The lines my ($id, $tail) = ($1, $2) and the entire code in the second while loop is simply amazing and an eye opener!! I have no words to express my gratitude for showing this amazing stuff!!
In Section
Seekers of Perl Wisdom
|
|