in reply to Re^4: Alignment and matrix generation
in thread Alignment and matrix generation

That's because your "actual data" from the previous reply was different to the data in the last one. To accommodate, just change the regex to match the empty lines. The exact form is left as an exercise to the reader.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^6: Alignment and matrix generation
by newtoperlprog (Sexton) on Apr 01, 2015 at 14:12 UTC

    Dear Choroba,

    Thank you for your suggestions.

    The only thing I changed in the code is the line:

    - if (/^ +$/) { + if (/^\s+$/) {

    It seems its working now, let me know if you find something else.

    Regards