[EMAIL PROTECTED] wrote:
I am trying to figure out how to print 8 scalers/elements then \n,
then 5 more lines of 8 or less for a max total of 40 Here is my
code:
print FILEOUT "eject 0,0,0 ";
my $count = `wc -l <$ejectapes`;
One idea:
my @elem = split ' ', $count;
@elem = splice @elem, 0, 40;
while (@elem) {
local $, = ' ';
print FILEOUT ( (splice @elem, 0, 8), "\n" );
}
Check out
perldoc -f splice
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>