<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><DIV><FONT face="times new roman, new york, times, serif" size=3>Sorry, I&nbsp; did not make the question clear. To make the question clearer, I simplifye it as below.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>#for a list of list</DIV>
<DIV>@lol = (["a"], ["b", 1], ["c", 1,2], ['d', 1, 2, 3]);</DIV>
<DIV>#I expet the output to be displaied like:</DIV>
<DIV>#a</DIV>
<DIV>#b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</DIV>
<DIV>#c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</DIV>
<DIV>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;2</DIV>
<DIV>#d&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</DIV>
<DIV>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</DIV>
<DIV>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;3</DIV>
<DIV>foreach (@lol) {</DIV>
<DIV>&nbsp; @ll = @$_;</DIV>
<DIV>&nbsp; write FMFILE;</DIV>
<DIV>}</DIV>
<DIV><FONT face="arial, helvetica, sans-serif">#format used:</FONT></DIV>
<DIV>format FMFIEL = </DIV>
<DIV>@&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @&gt;&gt;</DIV>
<DIV>shift(@ll),&nbsp;shift(@ll) if @ll,</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @&gt;&gt; ~~</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shift(@ll) if @ll,</DIV>
<DIV>.<BR></DIV>
<DIV><FONT face="times new roman, new york, times, serif" size=3>The question is when there is only one element in the sub-list, it will complain for the first and second line&nbsp;of the format has not enough argument. I cheat it with:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>push @ll, '' if @==1;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="times new roman, new york, times, serif" size=3>There is no complain for the first line noe, but it cannot make the second line quiet if there is only two elements, while&nbsp;empty line&nbsp;is not wanted in &nbsp;the output.</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif" size=3></FONT>&nbsp;</DIV>
<DIV><FONT face="times new roman, new york, times, serif" size=3>As the @lol is very long, it makes a lot of noise; I do not like to turn off the warning, as it may cover other real issue.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif"><BR>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><FONT face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> "Andy_Bach@wiwb.uscourts.gov" &lt;Andy_Bach@wiwb.uscourts.gov&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Chicago.pm chatter &lt;chicago-talk@pm.org&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Mon, May 10, 2010 11:34:14 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [Chicago-talk] Not enough format arguments<BR></FONT><BR>Not sure what exactly would be best (splice and numbers seems odd) but:<BR><BR><BR>splice(@{$printArray[$ii]}, 0, 4) if @{$printArray[$ii]}<BR><BR><BR>You could use the "pitchfork" ? : operator<BR><BR><BR>@{$printArray[$ii]} ? splice(@{$printArray[$ii]}, 0, 4) : 0<BR><BR><BR><BR><BR><BR>That is, a default of zero if the array is empty.<BR><BR><BR><BR><BR><BR>a<BR><BR>----------------------<BR>Andy Bach<BR>Systems Mangler<BR>Internet: <A href="mailto:andy_bach@wiwb.uscourts.gov"
 ymailto="mailto:andy_bach@wiwb.uscourts.gov">andy_bach@wiwb.uscourts.gov</A><BR>Voice: (608) 261-5738;<BR>Cell: (608) 658-1890<BR><BR>Ducharme's Axiom:<BR>If you view your problem closely enough you<BR>will recognize yourself as part of the problem.<BR><BR>_______________________________________________<BR>Chicago-talk mailing list<BR><A href="mailto:Chicago-talk@pm.org" ymailto="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</A><BR>http://mail.pm.org/mailman/listinfo/chicago-talk<BR></DIV></DIV></div></body></html>