my @a = qw/v0 v1 v2 v3 v4 v5/; while ( $#a >= 0 ) { print "Directive: " . join ( " ", splice ( @a, 0, 4 ) ) . "\n"; }