2010年5月10日星期一

[PerlChina] Not enough format arguments

Hello,

 

I try to format the output as below with last couple of colmns being able to extend from 0 to any number of lines. If there is no data after 5th element, 'Not enough format arguments' warning message will be triggered. Is ther any simple way to make the format do not complain?

 

Record1 12:30 98.40% 12 67.54% a(6) 77 80

                               b(1) 56 54

 

format MFILE =

@<<<<<<<<<<<<<@>>>>> @>>>>> @>>>>> @>>>>> @>>@>>>@>>>>>@>>>>>

splice(@{$printArray[$ii]}, 0, 5),        splice(@{$printArray[$ii]}, 0, 4) if @{$printArray[$ii]},

                                          @>>@>>>@>>>>>@>>>>> ~~

                                          splice(@{$printArray[$ii]}, 0, 4) if @{$printArray[$ii]}

.

没有评论: