in reply to Breaking output lines into N-element chunks
The groovy part about this is that if the array's empty, nothing prints.my @a = qw/v0 v1 v2 v3 v4 v5/; while ( $#a >= 0 ) { print "Directive: " . join ( " ", splice ( @a, 0, 4 ) ) . "\n"; }
--t. alex
"Here's the chocolates, and here's the flowers. Now how 'bout it, widder hen, will ya marry me?" --Foghorn Leghorn
Update Well, mdillon remembered the map munge() part and I didn't. ++ to him.
|
---|