my @r; # Results, array refs for each row record $text = fetch_that_blob(); $text =~ s/ (.+?) (?:\s*\n)+ (?: (\d+ (?:\sPSI)?) (?:\s*\n)+ ){4} /push @r, [ $1, $2, $3, $4, $5 ]/esgx; #### Station 1 50 PSI 59 PSI 69 PSI 74 PSI B Block 49 63 70 80 96