in reply to Split at specific spaces

doesn't seem that difficult.
$ perl -le 'use strict;use warnings;my($s,@r,@t) = "1 AC2 34 TRP A 6 A +LA A 7 ILE A 14 GLY A 15";@t=split/\s+/,$s;while((@r=splice @t,0,3)== +3){print join(" ",@r);}warn"leftovers: @r\n"if @r;' 1 AC2 34 TRP A 6 ALA A 7 ILE A 14 GLY A 15
what's the catch?