File Coverage

blib/lib/Data/ShowTable.pm
Criterion Covered Total %
statement 457 546 83.7
branch 203 310 65.4
condition 80 122 65.5
subroutine 23 30 76.6
pod 0 22 0.0
total 763 1030 74.0


line stmt bran cond sub pod time code
1             # perl -w
2             # ShowTable.pm
3             #
4             # Copyright (C) 1996-2013 Alan K. Stebbens
5             #
6             # This program is free software; you can redistribute it and/or modify
7             # it under the terms of the GNU General Public License as published by
8             # the Free Software Foundation; either version 2 of the License, or
9             # (at your option) any later version.
10             #
11             # This program is distributed in the hope that it will be useful,
12             # but WITHOUT ANY WARRANTY; without even the implied warranty of
13             # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14             # GNU General Public License for more details.
15             #
16             # You should have received a copy of the GNU General Public License
17             # along with this program; if not, write to the Free Software
18             # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19             #
20              
21             package Data::ShowTable;
22              
23             $VERSION = '4.6';
24              
25             =head1 NAME
26              
27             B - routines to display tabular data in several formats.
28              
29             =head1 USAGE
30              
31             C
32              
33             B { I => I, ... };
34              
35             B I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> [, I<\&fmt_sub> ];
36              
37              
38             B I<\@dbnames>;
39              
40             B { I => I, ... };
41              
42              
43             B I<\@tblnames>;
44              
45             B { I => I, ... };
46              
47              
48             B I<\@columns>, I<\@col_types>, I<\@col_lengths>, I<\@col_attrs>;
49              
50             B { I => I, ... };
51              
52              
53             B I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> [, I<\&fmt_sub> ];
54              
55             B { I => I, ... };
56              
57              
58             B I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> [, I<\&fmt_sub>];
59              
60             B { I => I, ... };
61              
62              
63             B I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> [, I<\&fmt_sub>];
64              
65             B { I => I, ... };
66              
67              
68             B I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> [, I<\&fmt_sub>];
69              
70             B { I => I, ... };
71              
72             C;
73              
74             B<$Show_Mode> = 'I';
75              
76             B<$Max_Table_Width> = I;
77              
78             B<$Max_List_Width> = I;
79              
80             B<$No_Escape> = I;
81              
82             B<%URL_Keys> = { "I<$colname>" => "I<$col_URL>", ... };
83              
84             B<@Title_Formats> = ( I, , ... );
85              
86             B<@Data_Formats> = ( I, , ... );
87              
88             B I<$rewindflag>, I<\$index>, I<$col_array_1> [, I<$col_array_2>, ...;]
89              
90             I<$fmt> = B I<$value>, I<$type>, I<$max_width>, I<$width>, I<$precision>, I<$showmode>;
91              
92             [I<$plaintext> = ] B [I<$htmltext>]; </td> </tr> <tr> <td class="h" > <a name="93">93</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="94">94</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 DESCRIPTION </td> </tr> <tr> <td class="h" > <a name="95">95</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="96">96</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The B<ShowTable> module provides subroutines to display tabular data, </td> </tr> <tr> <td class="h" > <a name="97">97</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> typially from a database, in nicely formatted columns, in several formats. </td> </tr> <tr> <td class="h" > <a name="98">98</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Its arguments can either be given in a fixed order, or, as </td> </tr> <tr> <td class="h" > <a name="99">99</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> a single, anonymous hash-array. </td> </tr> <tr> <td class="h" > <a name="100">100</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="101">101</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The output format for any one invocation can be one of four possible styles: </td> </tr> <tr> <td class="h" > <a name="102">102</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="103">103</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="104">104</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="105">105</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item Box </td> </tr> <tr> <td class="h" > <a name="106">106</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="107">107</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A tabular format, with the column titles and the entire table surrounded by a </td> </tr> <tr> <td class="h" > <a name="108">108</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> "box" of "C<+>", "C<->", and "C<|>" characters. See L<"ShowBoxTable"> for details. </td> </tr> <tr> <td class="h" > <a name="109">109</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="110">110</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item Table </td> </tr> <tr> <td class="h" > <a name="111">111</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="112">112</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A simple tabular format, with columns automatically aligned, with column titles. </td> </tr> <tr> <td class="h" > <a name="113">113</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> See L<"ShowSimpleTable">. </td> </tr> <tr> <td class="h" > <a name="114">114</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="115">115</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item List </td> </tr> <tr> <td class="h" > <a name="116">116</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="117">117</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A I<list> style, where columns of data are listed as a I<name>:I<value> pair, one </td> </tr> <tr> <td class="h" > <a name="118">118</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> pair per line, with rows being one or more column values, separated by an empty line. </td> </tr> <tr> <td class="h" > <a name="119">119</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> See L<"ShowListTable">. </td> </tr> <tr> <td class="h" > <a name="120">120</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="121">121</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item HTML </td> </tr> <tr> <td class="h" > <a name="122">122</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="123">123</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The data is output as an HTML I<TABLE>, suitable for display through a I<Web>-client. </td> </tr> <tr> <td class="h" > <a name="124">124</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> See L<"ShowHTMLTable">. Input can either be plain ASCII text, or text </td> </tr> <tr> <td class="h" > <a name="125">125</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> with embedded HTML elements, depending upon an argument or global parameter. </td> </tr> <tr> <td class="h" > <a name="126">126</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="127">127</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="128">128</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="129">129</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The subroutines which perform these displays are listed below. </td> </tr> <tr> <td class="h" > <a name="130">130</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="131">131</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 EXPORTED NAMES </td> </tr> <tr> <td class="h" > <a name="132">132</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="133">133</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> This module exports the following subroutines: </td> </tr> <tr> <td class="h" > <a name="134">134</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="135">135</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowDatabases - show list of databases </td> </tr> <tr> <td class="h" > <a name="136">136</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowTables - show list of tables </td> </tr> <tr> <td class="h" > <a name="137">137</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowColumns - show table of column info </td> </tr> <tr> <td class="h" > <a name="138">138</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowTable - show a table of data </td> </tr> <tr> <td class="h" > <a name="139">139</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowRow - show a row from one or more columns </td> </tr> <tr> <td class="h" > <a name="140">140</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowTableValue - show a single column's value </td> </tr> <tr> <td class="h" > <a name="141">141</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowBoxTable - show a table of data in a box </td> </tr> <tr> <td class="h" > <a name="142">142</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowListTable - show a table of data in a list </td> </tr> <tr> <td class="h" > <a name="143">143</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowSimpleTable - show a table of data in a simple table </td> </tr> <tr> <td class="h" > <a name="144">144</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowHTMLTable - show a table of data using HTML </td> </tr> <tr> <td class="h" > <a name="145">145</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> PlainText - convert HTML text into plain text </td> </tr> <tr> <td class="h" > <a name="146">146</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="147">147</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> All of these subroutines, and others, are described in detail in the </td> </tr> <tr> <td class="h" > <a name="148">148</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> following sections. </td> </tr> <tr> <td class="h" > <a name="149">149</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="150">150</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="151">151</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="152">152</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#152-1"> 22 </a> </td> <td > &nbsp; </td> <td > 37626 </td> <td class="s"> use Exporter; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 51 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4170 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="153">153</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="154">154</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> @ISA = qw( Exporter ); </td> </tr> <tr> <td class="h" > <a name="155">155</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> @EXPORT = qw( ShowDatabases </td> </tr> <tr> <td class="h" > <a name="156">156</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowTables </td> </tr> <tr> <td class="h" > <a name="157">157</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowColumns </td> </tr> <tr> <td class="h" > <a name="158">158</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowTable </td> </tr> <tr> <td class="h" > <a name="159">159</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowRow </td> </tr> <tr> <td class="h" > <a name="160">160</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowBoxTable </td> </tr> <tr> <td class="h" > <a name="161">161</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowHTMLTable </td> </tr> <tr> <td class="h" > <a name="162">162</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowListTable </td> </tr> <tr> <td class="h" > <a name="163">163</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowSimpleTable </td> </tr> <tr> <td class="h" > <a name="164">164</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowTableValue </td> </tr> <tr> <td class="h" > <a name="165">165</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Show_Mode </td> </tr> <tr> <td class="h" > <a name="166">166</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> PlainText </td> </tr> <tr> <td class="h" > <a name="167">167</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> URL_Keys </td> </tr> <tr> <td class="h" > <a name="168">168</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="169">169</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="170">170</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> @EXPORT_OK = qw( Show_Mode </td> </tr> <tr> <td class="h" > <a name="171">171</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> URL_Keys </td> </tr> <tr> <td class="h" > <a name="172">172</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Title_Formats </td> </tr> <tr> <td class="h" > <a name="173">173</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Data_Formats </td> </tr> <tr> <td class="h" > <a name="174">174</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="175">175</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="176">176</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Some control variables -- the user may set these </td> </tr> <tr> <td class="h" > <a name="177">177</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="178">178</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $Show_Mode = 'Box'; # one of: List, Table, Box, or HTML </td> </tr> <tr> <td class="h" > <a name="179">179</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $List_Wrap_Margin = 10; # break words up to this long </td> </tr> <tr> <td class="h" > <a name="180">180</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $Max_Table_Width = ''; # if defined, scale tables </td> </tr> <tr> <td class="h" > <a name="181">181</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $Max_List_Width = $ENV{'COLUMNS'} || 80; </td> </tr> <tr> <td class="h" > <a name="182">182</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $No_Escape = ''; # escape by default </td> </tr> <tr> <td class="h" > <a name="183">183</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="184">184</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> %URL_Keys = (); </td> </tr> <tr> <td class="h" > <a name="185">185</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> @Title_Formats = (); # formats for HTML formatting </td> </tr> <tr> <td class="h" > <a name="186">186</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> @Data_Formats = (); </td> </tr> <tr> <td class="h" > <a name="187">187</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="188">188</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#188-1"> 22 </a> </td> <td > &nbsp; </td> <td > 278 </td> <td class="s"> use Carp; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 42 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 39722 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="189">189</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="190">190</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> unshift(@INC, '.'); </td> </tr> <tr> <td class="h" > <a name="191">191</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="192">192</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowDatabases; </td> </tr> <tr> <td class="h" > <a name="193">193</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowTables; </td> </tr> <tr> <td class="h" > <a name="194">194</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowColumns; </td> </tr> <tr> <td class="h" > <a name="195">195</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowTable; </td> </tr> <tr> <td class="h" > <a name="196">196</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowRow; </td> </tr> <tr> <td class="h" > <a name="197">197</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub PlainText; </td> </tr> <tr> <td class="h" > <a name="198">198</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub htmltext; </td> </tr> <tr> <td class="h" > <a name="199">199</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="200">200</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub get_params; </td> </tr> <tr> <td class="h" > <a name="201">201</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub html_formats; </td> </tr> <tr> <td class="h" > <a name="202">202</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub center; </td> </tr> <tr> <td class="h" > <a name="203">203</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub max_length; </td> </tr> <tr> <td class="h" > <a name="204">204</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub max; </td> </tr> <tr> <td class="h" > <a name="205">205</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub out; </td> </tr> <tr> <td class="h" > <a name="206">206</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub put; </td> </tr> <tr> <td class="h" > <a name="207">207</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="208">208</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 MODULES </td> </tr> <tr> <td class="h" > <a name="209">209</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="210">210</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowTable </td> </tr> <tr> <td class="h" > <a name="211">211</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="212">212</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Format and display the contents of one or more rows of data. </td> </tr> <tr> <td class="h" > <a name="213">213</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="214">214</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowTable> { I<parameter> => I<value>, ... }; </td> </tr> <tr> <td class="h" > <a name="215">215</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="216">216</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowTable> I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> </td> </tr> <tr> <td class="h" > <a name="217">217</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [, I<\&fmt_sub> [, I<$max_width> ] [, I<$show_mode> ] ]; </td> </tr> <tr> <td class="h" > <a name="218">218</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="219">219</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The B<ShowTable> subroutine displays tabular data aligned in columns, </td> </tr> <tr> <td class="h" > <a name="220">220</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> with headers. B<ShowTable> supports four I<modes> of display: B<Box>, B<Table>, </td> </tr> <tr> <td class="h" > <a name="221">221</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> B<List>, and B<HTML>. Each mode is described separately below. </td> </tr> <tr> <td class="h" > <a name="222">222</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="223">223</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The arguments to B<ShowTable> may be given in one of two ways: as a </td> </tr> <tr> <td class="h" > <a name="224">224</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> hashed-array, or by a combination of fixed order arguments, and some </td> </tr> <tr> <td class="h" > <a name="225">225</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> package-global variable settings. The hash-array parameters correspond </td> </tr> <tr> <td class="h" > <a name="226">226</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> to the fixed arguments and the global-parameter settings. </td> </tr> <tr> <td class="h" > <a name="227">227</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="228">228</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> In the list below, both the hash-array parameter name and the </td> </tr> <tr> <td class="h" > <a name="229">229</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> fixed-order argument name is given as the value. In the case where </td> </tr> <tr> <td class="h" > <a name="230">230</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> there is no fixed-order argument for a given parameter-value pair, then </td> </tr> <tr> <td class="h" > <a name="231">231</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the corresponding global variable name is given. </td> </tr> <tr> <td class="h" > <a name="232">232</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="233">233</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="234">234</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="235">235</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<titles> => I<\@titles> </td> </tr> <tr> <td class="h" > <a name="236">236</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="237">237</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A reference to an array of column names, or titles. If a particular column name </td> </tr> <tr> <td class="h" > <a name="238">238</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is null, then the string C<Field_I<num>> is used by default. To have a column </td> </tr> <tr> <td class="h" > <a name="239">239</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> have no title, use the empty string. </td> </tr> <tr> <td class="h" > <a name="240">240</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="241">241</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<types> => I<\@types> </td> </tr> <tr> <td class="h" > <a name="242">242</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="243">243</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A reference to an array of types, one for each column. These types are </td> </tr> <tr> <td class="h" > <a name="244">244</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> passed to the I<fmt_sub> for appropriate formatting. Also, if a column </td> </tr> <tr> <td class="h" > <a name="245">245</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> type matches the regexp "C</text|char|string/i>", then the column </td> </tr> <tr> <td class="h" > <a name="246">246</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> alignment will be left-justified, otherwise it will be right-justified. </td> </tr> <tr> <td class="h" > <a name="247">247</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="248">248</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<widths> => I<\@widths> </td> </tr> <tr> <td class="h" > <a name="249">249</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="250">250</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A reference to an array of column widths, which may be given as an integer, or </td> </tr> <tr> <td class="h" > <a name="251">251</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> as a string of the form: "I<width>.I<precision>". </td> </tr> <tr> <td class="h" > <a name="252">252</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="253">253</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<row_sub> => I<\&row_sub> </td> </tr> <tr> <td class="h" > <a name="254">254</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="255">255</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A reference to a subroutine which successively returns rows of values in an array. </td> </tr> <tr> <td class="h" > <a name="256">256</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> It is called for two purposes, each described separately: </td> </tr> <tr> <td class="h" > <a name="257">257</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="258">258</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> * To fetch successive rows of data: </td> </tr> <tr> <td class="h" > <a name="259">259</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="260">260</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> @row = &$row_sub(0); </td> </tr> <tr> <td class="h" > <a name="261">261</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="262">262</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> When given a null, zero, or empty argument, the next row is returned. </td> </tr> <tr> <td class="h" > <a name="263">263</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="264">264</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> * To initialize or rewind the data traversal. </td> </tr> <tr> <td class="h" > <a name="265">265</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="266">266</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $rewindable = &$row_sub(1); </td> </tr> <tr> <td class="h" > <a name="267">267</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="268">268</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> When invoked with a non-null argument, the subroutine should rewind its </td> </tr> <tr> <td class="h" > <a name="269">269</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> row pointer to start at the first row of data. If the data which </td> </tr> <tr> <td class="h" > <a name="270">270</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> I<row_sub> is traversing is not rewindable, it must return zero or null. </td> </tr> <tr> <td class="h" > <a name="271">271</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If the data is rewindable, a non-null, non-zero value should be returned. </td> </tr> <tr> <td class="h" > <a name="272">272</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="273">273</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The I<row_sub> must expect to be invoked once with a non-null argument, </td> </tr> <tr> <td class="h" > <a name="274">274</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> in order to discover whether or not the data is rewindable. If the data </td> </tr> <tr> <td class="h" > <a name="275">275</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> cannot be rewound, I<row_sub> will thereafter only be called with a zero </td> </tr> <tr> <td class="h" > <a name="276">276</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> argument. </td> </tr> <tr> <td class="h" > <a name="277">277</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="278">278</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Specifically, I<row_sub> subroutine is used in this manner: </td> </tr> <tr> <td class="h" > <a name="279">279</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="280">280</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $rewindable = &$row_sub(1); </td> </tr> <tr> <td class="h" > <a name="281">281</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> if ($rewindable) { </td> </tr> <tr> <td class="h" > <a name="282">282</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> while ((@row = &$row_sub(0)), $#row >= 0) { </td> </tr> <tr> <td class="h" > <a name="283">283</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # examine lengths for optimal formatting </td> </tr> <tr> <td class="h" > <a name="284">284</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="285">285</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &$row_sub(1); # rewind </td> </tr> <tr> <td class="h" > <a name="286">286</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="287">287</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> while ((@row = &$row_sub(0)), $#row >= 0) { </td> </tr> <tr> <td class="h" > <a name="288">288</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # format the data </td> </tr> <tr> <td class="h" > <a name="289">289</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="290">290</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="291">291</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The consequence of data that is not rewindable, a reasonably nice table </td> </tr> <tr> <td class="h" > <a name="292">292</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> will still be formatted, but it may contain fairly large amounts of </td> </tr> <tr> <td class="h" > <a name="293">293</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> whitespace for wide columns. </td> </tr> <tr> <td class="h" > <a name="294">294</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="295">295</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<fmtsub> => I<\&fmt_sub> </td> </tr> <tr> <td class="h" > <a name="296">296</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="297">297</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A reference to a subroutine which formats a value, according to its </td> </tr> <tr> <td class="h" > <a name="298">298</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> type, width, precision, and the current column width. It is invoked </td> </tr> <tr> <td class="h" > <a name="299">299</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> either with a fixed list of arguments, or with a hash-array of parameter </td> </tr> <tr> <td class="h" > <a name="300">300</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> and value pairs. </td> </tr> <tr> <td class="h" > <a name="301">301</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="302">302</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $string = &fmt_sub { I<parameter> => I<value>, ... }; </td> </tr> <tr> <td class="h" > <a name="303">303</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="304">304</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $string = &fmt_sub($value, $type, $max_width, $width, $precision) </td> </tr> <tr> <td class="h" > <a name="305">305</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="306">306</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If I<\&fmt_sub> is omitted, then a default subroutine, B<ShowTableValue>, </td> </tr> <tr> <td class="h" > <a name="307">307</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> will be used, which will use Perl's standard string formatting rules. </td> </tr> <tr> <td class="h" > <a name="308">308</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="309">309</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The arguments to I<\&fmt_sub>, either as values passed in a fixed </td> </tr> <tr> <td class="h" > <a name="310">310</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> order, or as part of the parameter value pair, are described in the </td> </tr> <tr> <td class="h" > <a name="311">311</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> section on L<"ShowTableValue> below. </td> </tr> <tr> <td class="h" > <a name="312">312</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="313">313</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<max_width> => I<number>, </td> </tr> <tr> <td class="h" > <a name="314">314</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="315">315</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The maximum table width, including the table formatting characters. If </td> </tr> <tr> <td class="h" > <a name="316">316</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> not given, defaults to the global variable B<$Max_Table_Width>; </td> </tr> <tr> <td class="h" > <a name="317">317</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="318">318</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<show_mode> => 'I<mode>', </td> </tr> <tr> <td class="h" > <a name="319">319</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="320">320</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The display mode of the output. One of five strings: C<'Box'>, </td> </tr> <tr> <td class="h" > <a name="321">321</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> C<'Table'>, C<'Simple'>, C<'List'>, and C<'HTML'>. </td> </tr> <tr> <td class="h" > <a name="322">322</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="323">323</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="324">324</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="325">325</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="326">326</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="327">327</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowTable { </td> </tr> <tr> <td class="h" > <a name="328">328</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#328-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#328-1"> 0 </a> </td> <td > 0 </td> <td class="s"> my @argv = @_; </td> </tr> <tr> <td class="h" > <a name="329">329</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> local ($_,$titles,$types,$widths,$row_sub,$fmt_sub, </td> </tr> <tr> <td class="h" > <a name="330">330</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $max_width, $show_mode, $wrap_margin, $url_keys, </td> </tr> <tr> <td class="h" > <a name="331">331</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $no_escape, $title_formats, $data_formats); </td> </tr> <tr> <td class="h" > <a name="332">332</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my $args = </td> </tr> <tr> <td class="h" > <a name="333">333</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> get_params \@argv, </td> </tr> <tr> <td class="h" > <a name="334">334</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> { titles => \$titles, </td> </tr> <tr> <td class="h" > <a name="335">335</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> types => \$types, </td> </tr> <tr> <td class="h" > <a name="336">336</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> widths => \$widths, </td> </tr> <tr> <td class="h" > <a name="337">337</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> row_sub => \$row_sub, </td> </tr> <tr> <td class="h" > <a name="338">338</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> fmt_sub => \$fmt_sub, </td> </tr> <tr> <td class="h" > <a name="339">339</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> max_width => \$max_width, </td> </tr> <tr> <td class="h" > <a name="340">340</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> show_mode => \$show_mode, </td> </tr> <tr> <td class="h" > <a name="341">341</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> }, </td> </tr> <tr> <td class="h" > <a name="342">342</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [qw(titles types widths row_sub fmt_sub max_width show_mode)]; </td> </tr> <tr> <td class="h" > <a name="343">343</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="344">344</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Default mode is from $Show_Mode global </td> </tr> <tr> <td class="h" > <a name="345">345</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#345-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $show_mode = $args->{'show_mode'} = $Show_Mode unless $show_mode ne ''; </td> </tr> <tr> <td class="h" > <a name="346">346</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $_ = $show_mode; </td> </tr> <tr> <td class="h" > <a name="347">347</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#347-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> if (/List/i) { &ShowListTable($args); } </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#-2"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#-3"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="348">348</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> elsif (/HTML/i) { &ShowHTMLTable($args); } </td> </tr> <tr> <td class="h" > <a name="349">349</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> elsif (/Table/i) { &ShowSimpleTable($args); } </td> </tr> <tr> <td class="h" > <a name="350">350</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> else { &ShowBoxTable($args); } </td> </tr> <tr> <td class="h" > <a name="351">351</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="352">352</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="353">353</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowDatabases </td> </tr> <tr> <td class="h" > <a name="354">354</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="355">355</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Show a list of database names. </td> </tr> <tr> <td class="h" > <a name="356">356</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="357">357</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowDatabases> I<\@dbnames>; </td> </tr> <tr> <td class="h" > <a name="358">358</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="359">359</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowDatabases> { 'data' => I<\@dbnames>, I<parameter> => </td> </tr> <tr> <td class="h" > <a name="360">360</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> I<value>, ...}; </td> </tr> <tr> <td class="h" > <a name="361">361</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="362">362</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> B<ShowDatabases> is intended to be used to display a list of database </td> </tr> <tr> <td class="h" > <a name="363">363</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> names, under the column heading of "Databases". It is a special case </td> </tr> <tr> <td class="h" > <a name="364">364</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> usage of B<ShowTable> (and can thus be passed any parameter suitable </td> </tr> <tr> <td class="h" > <a name="365">365</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> for B<ShowTable>. </td> </tr> <tr> <td class="h" > <a name="366">366</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="367">367</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The argument, I<\@dbnames>, is a reference to an array of strings, used </td> </tr> <tr> <td class="h" > <a name="368">368</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> as the values of the single column display. </td> </tr> <tr> <td class="h" > <a name="369">369</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="370">370</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="371">371</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="372">372</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowDatabases { </td> </tr> <tr> <td class="h" > <a name="373">373</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#373-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#373-1"> 0 </a> </td> <td > 0 </td> <td class="s"> my @argv = @_; </td> </tr> <tr> <td class="h" > <a name="374">374</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> local $databases; </td> </tr> <tr> <td class="h" > <a name="375">375</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my $args = get_params \@argv, {data => \$databases}, ['data']; </td> </tr> <tr> <td class="h" > <a name="376">376</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#376-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $databases ne '' or croak "Missing array of databases.\n"; </td> </tr> <tr> <td class="h" > <a name="377">377</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="378">378</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#378-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'titles'} = 'Databases' unless exists $args->{'titles'}; </td> </tr> <tr> <td class="h" > <a name="379">379</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'types'} = [ 'char' ]; </td> </tr> <tr> <td class="h" > <a name="380">380</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'width'} = max_length $databases; </td> </tr> <tr> <td class="h" > <a name="381">381</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'lengths'} = $args->{'width'}; </td> </tr> <tr> <td class="h" > <a name="382">382</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> local( $current_row ) = 0; </td> </tr> <tr> <td class="h" > <a name="383">383</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#383-1"> 0 </a> </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'row_sub'} = sub { &ShowRow( $_[0], \$current_row, $databases ); }; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="384">384</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> ShowTable $args; </td> </tr> <tr> <td class="h" > <a name="385">385</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="386">386</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="387">387</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowTables </td> </tr> <tr> <td class="h" > <a name="388">388</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="389">389</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Show an array of table names. </td> </tr> <tr> <td class="h" > <a name="390">390</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="391">391</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowTables> I<\@tblnames>; </td> </tr> <tr> <td class="h" > <a name="392">392</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="393">393</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowTables> { 'data' => I<\@tblnames>, I<parameter> => I<value>, ...}; </td> </tr> <tr> <td class="h" > <a name="394">394</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="395">395</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> B<ShowTables> is used to display a list of table names, under the column </td> </tr> <tr> <td class="h" > <a name="396">396</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> heading of "Tables". It is a special case usage of B<ShowTable>, and can </td> </tr> <tr> <td class="h" > <a name="397">397</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> be passed any L<"ShowTable"> argument parameter. </td> </tr> <tr> <td class="h" > <a name="398">398</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="399">399</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="400">400</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="401">401</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowTables { </td> </tr> <tr> <td class="h" > <a name="402">402</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#402-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#402-1"> 0 </a> </td> <td > 0 </td> <td class="s"> my @argv = @_; </td> </tr> <tr> <td class="h" > <a name="403">403</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> local $tables; </td> </tr> <tr> <td class="h" > <a name="404">404</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my $args = get_params \@argv, {data => \$tables}, ['data']; </td> </tr> <tr> <td class="h" > <a name="405">405</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#405-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $tables ne '' or croak "Missing array of tables.\n"; </td> </tr> <tr> <td class="h" > <a name="406">406</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="407">407</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#407-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'titles'} = 'Tables' unless exists $args->{'titles'}; </td> </tr> <tr> <td class="h" > <a name="408">408</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'types'} = 'char'; </td> </tr> <tr> <td class="h" > <a name="409">409</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'width'} = max_length $tables; </td> </tr> <tr> <td class="h" > <a name="410">410</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'lengths'} = $args->{'width'}; </td> </tr> <tr> <td class="h" > <a name="411">411</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> local( $current_row ) = 0; </td> </tr> <tr> <td class="h" > <a name="412">412</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#412-1"> 0 </a> </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'row_sub'} = sub { &ShowRow( $_[0], \$current_row, $tables ); }; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="413">413</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> ShowTable $args; </td> </tr> <tr> <td class="h" > <a name="414">414</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="415">415</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="416">416</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowColumns </td> </tr> <tr> <td class="h" > <a name="417">417</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="418">418</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Display a table of column names, types, and attributes. </td> </tr> <tr> <td class="h" > <a name="419">419</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="420">420</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowColumns> { I<parameter> => I<values>, ... }; </td> </tr> <tr> <td class="h" > <a name="421">421</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="422">422</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowColumns> I<\@columns>, I<\@col_types>, I<\@col_lengths>, I<\@col_attrs>; </td> </tr> <tr> <td class="h" > <a name="423">423</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="424">424</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The B<ShowColumns> subroutine displays a table of column names, types, lengths, </td> </tr> <tr> <td class="h" > <a name="425">425</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> and other attributes in a nicely formatted table. It is a special case usage </td> </tr> <tr> <td class="h" > <a name="426">426</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> of B<ShowTable>, and can be passed any argument suitable for L<"ShowTable">; </td> </tr> <tr> <td class="h" > <a name="427">427</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="428">428</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The arguments are: </td> </tr> <tr> <td class="h" > <a name="429">429</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="430">430</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="431">431</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="432">432</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<columns> = I<\@columns> </td> </tr> <tr> <td class="h" > <a name="433">433</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="434">434</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> An array of column names. This provides the value for the first column </td> </tr> <tr> <td class="h" > <a name="435">435</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> of the output. </td> </tr> <tr> <td class="h" > <a name="436">436</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="437">437</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<col_types> = I<\@col_types> </td> </tr> <tr> <td class="h" > <a name="438">438</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="439">439</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> An array of column types names. This provides the value for the second </td> </tr> <tr> <td class="h" > <a name="440">440</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> column. </td> </tr> <tr> <td class="h" > <a name="441">441</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="442">442</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<col_lengths> = I<\@col_lengths> </td> </tr> <tr> <td class="h" > <a name="443">443</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="444">444</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> An array of maximum lengths for corresponding columns. This provides </td> </tr> <tr> <td class="h" > <a name="445">445</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the value for the third column of the output. </td> </tr> <tr> <td class="h" > <a name="446">446</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="447">447</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<col_attrs> = I<\@col_attrs> </td> </tr> <tr> <td class="h" > <a name="448">448</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="449">449</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> An array of column attributes array references (ie: an array of arrays). </td> </tr> <tr> <td class="h" > <a name="450">450</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The attributes array for the first column are at "I<$col_attrs>-\>[0]". </td> </tr> <tr> <td class="h" > <a name="451">451</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The first attribute of the second column is "I<$col_attrs>-\>[1][0]". </td> </tr> <tr> <td class="h" > <a name="452">452</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="453">453</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="454">454</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="455">455</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The columns, types, lengths, and attributes are displayed in a table </td> </tr> <tr> <td class="h" > <a name="456">456</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> with the column headings: "Column", "Type", "Length", and "Attributes". </td> </tr> <tr> <td class="h" > <a name="457">457</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> This is a special case usage of B<ShowTable>, and can be passed </td> </tr> <tr> <td class="h" > <a name="458">458</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> additional arguments suitable for L<"ShowTable">. </td> </tr> <tr> <td class="h" > <a name="459">459</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="460">460</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="461">461</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="462">462</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowColumns { </td> </tr> <tr> <td class="h" > <a name="463">463</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#463-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#463-1"> 0 </a> </td> <td > 0 </td> <td class="s"> my @argv = @_; </td> </tr> <tr> <td class="h" > <a name="464">464</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> local ($col_names, $col_types, $col_lengths, $col_attributes); </td> </tr> <tr> <td class="h" > <a name="465">465</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my $args = </td> </tr> <tr> <td class="h" > <a name="466">466</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> get_params </td> </tr> <tr> <td class="h" > <a name="467">467</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> \@argv, </td> </tr> <tr> <td class="h" > <a name="468">468</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> { col_names => \$col_names, </td> </tr> <tr> <td class="h" > <a name="469">469</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> col_types => \$col_types, </td> </tr> <tr> <td class="h" > <a name="470">470</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> col_lengths => \$col_lengths, </td> </tr> <tr> <td class="h" > <a name="471">471</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> col_attributes => \$col_attributes, </td> </tr> <tr> <td class="h" > <a name="472">472</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> },[qw(col_names col_types col_lengths col_attributes)]; </td> </tr> <tr> <td class="h" > <a name="473">473</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="474">474</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#474-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $col_names ne '' or croak "Missing array of column names.\n"; </td> </tr> <tr> <td class="h" > <a name="475">475</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#475-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $col_types ne '' or croak "Missing array of column types.\n"; </td> </tr> <tr> <td class="h" > <a name="476">476</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#476-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $col_lengths ne '' or croak "Missing array of column lengths.\n"; </td> </tr> <tr> <td class="h" > <a name="477">477</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#477-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $col_attributes ne '' or croak "Missing array of column attributes.\n"; </td> </tr> <tr> <td class="h" > <a name="478">478</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="479">479</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # setup the descriptor arrays </td> </tr> <tr> <td class="h" > <a name="480">480</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'titles'} = [ qw(Column Type Length Attributes) ]; </td> </tr> <tr> <td class="h" > <a name="481">481</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'types'} = [ qw(varchar varchar int varchar) ]; </td> </tr> <tr> <td class="h" > <a name="482">482</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="483">483</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Do some data conversions before displaying </td> </tr> <tr> <td class="h" > <a name="484">484</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Convert attribute array to a string of attributes </td> </tr> <tr> <td class="h" > <a name="485">485</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> local @col_attrs = (); </td> </tr> <tr> <td class="h" > <a name="486">486</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my $i; </td> </tr> <tr> <td class="h" > <a name="487">487</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> for ($i = 0; $i <= $#{$col_attributes}; $i++) { </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="488">488</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $col_attrs[$i] = join(', ',@{$col_attributes->[$i]}); </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="489">489</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="490">490</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="491">491</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # count the widths, to setup the Column name column width </td> </tr> <tr> <td class="h" > <a name="492">492</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'lengths'} = [ (max_length $col_names), (max_length $col_types), </td> </tr> <tr> <td class="h" > <a name="493">493</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> (max_length $col_lengths), (max_length \@col_attrs) ]; </td> </tr> <tr> <td class="h" > <a name="494">494</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="495">495</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> local($current_row) = 0; </td> </tr> <tr> <td class="h" > <a name="496">496</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#496-1"> 0 </a> </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $args->{'row_sub'} = sub { &ShowRow($_[0], \$current_row, $col_names, </td> </tr> <tr> <td class="h" > <a name="497">497</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $col_types, $col_lengths, \@col_attrs); }; </td> </tr> <tr> <td class="h" > <a name="498">498</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="499">499</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Finally, show the darn thing </td> </tr> <tr> <td class="h" > <a name="500">500</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> ShowTable $args; </td> </tr> <tr> <td class="h" > <a name="501">501</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="502">502</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="503">503</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="504">504</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowBoxTable </td> </tr> <tr> <td class="h" > <a name="505">505</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="506">506</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Show tabular data in a box. </td> </tr> <tr> <td class="h" > <a name="507">507</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="508">508</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowBoxTable> { I<parameter> = I<value>, ... }; </td> </tr> <tr> <td class="h" > <a name="509">509</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="510">510</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowBoxTable> I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> </td> </tr> <tr> <td class="h" > <a name="511">511</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >[, [ I<\&fmt_sub> ] [, I<$max_width> ] ]; </td> </tr> <tr> <td class="h" > <a name="512">512</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="513">513</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The B<ShowBoxTable> displays tabular data in titled columns using a "box" </td> </tr> <tr> <td class="h" > <a name="514">514</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> of ASCII graphics, looking something like this: </td> </tr> <tr> <td class="h" > <a name="515">515</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="516">516</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="517">517</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> +------------+----------+-----+----------+ </td> </tr> <tr> <td class="h" > <a name="518">518</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> | Column1 | Column2 | ... | ColumnN | </td> </tr> <tr> <td class="h" > <a name="519">519</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> +------------+----------+-----+----------+ </td> </tr> <tr> <td class="h" > <a name="520">520</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> | Value11 | Value12 | ... | Value 1M | </td> </tr> <tr> <td class="h" > <a name="521">521</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> | Value21 | Value22 | ... | Value 2M | </td> </tr> <tr> <td class="h" > <a name="522">522</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> | Value31 | Value32 | ... | Value 3M | </td> </tr> <tr> <td class="h" > <a name="523">523</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> | ... | ... | ... | ... | </td> </tr> <tr> <td class="h" > <a name="524">524</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> | ValueN1 | ValueN2 | ... | Value NM | </td> </tr> <tr> <td class="h" > <a name="525">525</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> +------------+----------+-----+----------+ </td> </tr> <tr> <td class="h" > <a name="526">526</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="527">527</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="528">528</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The arguments are the same as with L<"ShowTable">. If the I<@titles> array </td> </tr> <tr> <td class="h" > <a name="529">529</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is empty, the header row is omitted. </td> </tr> <tr> <td class="h" > <a name="530">530</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="531">531</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="532">532</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="533">533</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowBoxTable { </td> </tr> <tr> <td class="h" > <a name="534">534</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#534-1"> 37 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#534-1"> 0 </a> </td> <td > 569167 </td> <td class="s"> my @argv = @_; </td> </tr> <tr> <td class="h" > <a name="535">535</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 510 </td> <td class="s"> local ($titles, $types, $col_widths, $row_sub, $fmt_sub, $max_width); </td> </tr> <tr> <td class="h" > <a name="536">536</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1923 </td> <td class="s"> my $args = </td> </tr> <tr> <td class="h" > <a name="537">537</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> get_params </td> </tr> <tr> <td class="h" > <a name="538">538</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> \@argv, </td> </tr> <tr> <td class="h" > <a name="539">539</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> { titles => \$titles, </td> </tr> <tr> <td class="h" > <a name="540">540</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> types => \$types, </td> </tr> <tr> <td class="h" > <a name="541">541</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> widths => \$col_widths, </td> </tr> <tr> <td class="h" > <a name="542">542</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> row_sub => \$row_sub, </td> </tr> <tr> <td class="h" > <a name="543">543</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> fmtsub => \$fmt_sub, </td> </tr> <tr> <td class="h" > <a name="544">544</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> max_width => \$max_width, </td> </tr> <tr> <td class="h" > <a name="545">545</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> }, </td> </tr> <tr> <td class="h" > <a name="546">546</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [qw(titles types widths row_sub fmtsub max_width)]; </td> </tr> <tr> <td class="h" > <a name="547">547</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="548">548</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#548-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 258 </td> <td class="s"> $titles ne '' or croak "Missing column names array.\n"; </td> </tr> <tr> <td class="h" > <a name="549">549</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#549-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 311 </td> <td class="s"> $types ne '' or croak "Missing column types array.\n"; </td> </tr> <tr> <td class="h" > <a name="550">550</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#550-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1102 </td> <td class="s"> $col_widths ne '' or croak "Missing column width array.\n"; </td> </tr> <tr> <td class="h" > <a name="551">551</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#551-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 147 </td> <td class="s"> $row_sub ne '' or croak "Missing row subroutine.\n"; </td> </tr> <tr> <td class="h" > <a name="552">552</a> </td> <td class="c3" > 37 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#552-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#552-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 560 </td> <td class="s"> $fmt_sub = \&ShowTableValue if !defined($fmt_sub) || $fmt_sub eq ''; </td> </tr> <tr> <td class="h" > <a name="553">553</a> </td> <td class="c3" > 37 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#553-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#553-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 405 </td> <td class="s"> $max_width = $Max_Table_Width if !defined($max_width) || $max_width eq ''; </td> </tr> <tr> <td class="h" > <a name="554">554</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="555">555</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 332 </td> <td class="s"> my $rewindable = &$row_sub(1); # see if data is rewindable </td> </tr> <tr> <td class="h" > <a name="556">556</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="557">557</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 582 </td> <td class="s"> my ($num_cols, $widths, $precision, $max_widths) = </td> </tr> <tr> <td class="h" > <a name="558">558</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &calc_widths($col_widths, $titles, $rewindable, </td> </tr> <tr> <td class="h" > <a name="559">559</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $row_sub, $fmt_sub, $types, 'box', $max_width); </td> </tr> <tr> <td class="h" > <a name="560">560</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="561">561</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 96 </td> <td class="s"> my $width = 1; </td> </tr> <tr> <td class="h" > <a name="562">562</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 111 </td> <td class="s"> my $dashes = ' +'; </td> </tr> <tr> <td class="h" > <a name="563">563</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 59 </td> <td class="s"> my $title_line = ' |'; </td> </tr> <tr> <td class="h" > <a name="564">564</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 50 </td> <td class="s"> my $title; </td> </tr> <tr> <td class="h" > <a name="565">565</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 721 </td> <td class="s"> my $fmt = ' |'; # initial format string </td> </tr> <tr> <td class="h" > <a name="566">566</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 59 </td> <td class="s"> my $c; </td> </tr> <tr> <td class="h" > <a name="567">567</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="568">568</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Compose the box header </td> </tr> <tr> <td class="h" > <a name="569">569</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 132 </td> <td class="s"> for ($c = 0; $c < $num_cols; $c++) { </td> </tr> <tr> <td class="h" > <a name="570">570</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 264 </td> <td class="s"> $width = $max_widths->[$c]; # get previously calculated max col width </td> </tr> <tr> <td class="h" > <a name="571">571</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 288 </td> <td class="s"> $width += 2; # account for a blank on either </td> </tr> <tr> <td class="h" > <a name="572">572</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # side of each value </td> </tr> <tr> <td class="h" > <a name="573">573</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 352 </td> <td class="s"> $dashes .= ('-' x $width); </td> </tr> <tr> <td class="h" > <a name="574">574</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 223 </td> <td class="s"> $dashes .= '+'; </td> </tr> <tr> <td class="h" > <a name="575">575</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="576">576</a> </td> <td class="c3" > 170 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#576-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#576-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1328 </td> <td class="s"> $title = $#$titles >= 0 && defined($titles->[$c]) ? $titles->[$c] : </td> </tr> <tr> <td class="h" > <a name="577">577</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sprintf("Field_%d", $c+1); </td> </tr> <tr> <td class="h" > <a name="578">578</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 454 </td> <td class="s"> $title_line .= center $title, $width; </td> </tr> <tr> <td class="h" > <a name="579">579</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3122 </td> <td class="s"> $title_line .= '|'; </td> </tr> <tr> <td class="h" > <a name="580">580</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="581">581</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 262 </td> <td class="s"> out $dashes; </td> </tr> <tr> <td class="h" > <a name="582">582</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#582-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 292 </td> <td class="s"> if ($#$titles >= 0) { </td> </tr> <tr> <td class="h" > <a name="583">583</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 167 </td> <td class="s"> out $title_line; </td> </tr> <tr> <td class="h" > <a name="584">584</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 99 </td> <td class="s"> out $dashes; </td> </tr> <tr> <td class="h" > <a name="585">585</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="586">586</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="587">587</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 142 </td> <td class="s"> my @values; </td> </tr> <tr> <td class="h" > <a name="588">588</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 163 </td> <td class="s"> my @prefix = (" ", "<"); </td> </tr> <tr> <td class="h" > <a name="589">589</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 130 </td> <td class="s"> my @suffix = (" |", ">|"); </td> </tr> <tr> <td class="h" > <a name="590">590</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 63 </td> <td class="s"> my @cell; </td> </tr> <tr> <td class="h" > <a name="591">591</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="592">592</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # loop over the data, formatting it into cells, one row at a time. </td> </tr> <tr> <td class="h" > <a name="593">593</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#593-1"> 22 </a> </td> <td > &nbsp; </td> <td > 21946 </td> <td class="s"> while ((@values = &$row_sub(0)), $#values >= $[) { </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 10006 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 91824 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 171 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="594">594</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # first pass -- format each value into a string </td> </tr> <tr> <td class="h" > <a name="595">595</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 541 </td> <td class="s"> @cell = (); </td> </tr> <tr> <td class="h" > <a name="596">596</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 695 </td> <td class="s"> for ($c = 0; $c <= $#values; $c++) { </td> </tr> <tr> <td class="h" > <a name="597">597</a> </td> <td class="c3" > 850 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3092 </td> <td class="s"> $cell[$c] = &$fmt_sub($values[$c], $types->[$c], $max_widths->[$c], </td> </tr> <tr> <td class="h" > <a name="598">598</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $widths->[$c], $precision->[$c], 'box'); </td> </tr> <tr> <td class="h" > <a name="599">599</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="600">600</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # second pass -- output each cell, wrapping if necessary </td> </tr> <tr> <td class="h" > <a name="601">601</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 315 </td> <td class="s"> my $will_wrap; </td> </tr> <tr> <td class="h" > <a name="602">602</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 318 </td> <td class="s"> my $wrapped = 0; </td> </tr> <tr> <td class="h" > <a name="603">603</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 227 </td> <td class="s"> do { $will_wrap = 0; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 462 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 561 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="604">604</a> </td> <td class="c3" > 462 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1324 </td> <td class="s"> put " |"; # start a line </td> </tr> <tr> <td class="h" > <a name="605">605</a> </td> <td class="c3" > 462 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1625 </td> <td class="s"> for ($c = 0; $c <= $#cell; $c++) { </td> </tr> <tr> <td class="h" > <a name="606">606</a> </td> <td class="c3" > 2169 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 6752 </td> <td class="s"> $will_wrap |= &putcell(\@cell, $c, $max_widths->[$c], </td> </tr> <tr> <td class="h" > <a name="607">607</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> \@prefix, \@suffix, $wrapped); </td> </tr> <tr> <td class="h" > <a name="608">608</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="609">609</a> </td> <td class="c3" > 462 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 972 </td> <td class="s"> out ""; </td> </tr> <tr> <td class="h" > <a name="610">610</a> </td> <td class="c3" > 462 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2643 </td> <td class="s"> $wrapped++; </td> </tr> <tr> <td class="h" > <a name="611">611</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } while ($will_wrap); </td> </tr> <tr> <td class="h" > <a name="612">612</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="613">613</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 119 </td> <td class="s"> out $dashes; </td> </tr> <tr> <td class="h" > <a name="614">614</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 102 </td> <td class="s"> out ""; </td> </tr> <tr> <td class="h" > <a name="615">615</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="616">616</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="617">617</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="618">618</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowSimpleTable </td> </tr> <tr> <td class="h" > <a name="619">619</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="620">620</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Display a table of data using a simple table format. </td> </tr> <tr> <td class="h" > <a name="621">621</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="622">622</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowSimpleTable> I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> [, I<\&fmt_sub>]; </td> </tr> <tr> <td class="h" > <a name="623">623</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="624">624</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowSimpleTable> { I<parameter> => I<values>, ... }; </td> </tr> <tr> <td class="h" > <a name="625">625</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="626">626</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The B<ShowSimpleTable> subroutine formats data into a simple table of </td> </tr> <tr> <td class="h" > <a name="627">627</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> aligned columns, in the following example: </td> </tr> <tr> <td class="h" > <a name="628">628</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="629">629</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Column1 Column2 Column3 </td> </tr> <tr> <td class="h" > <a name="630">630</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ------- ------- ------- </td> </tr> <tr> <td class="h" > <a name="631">631</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Value1 Value2 Value3 </td> </tr> <tr> <td class="h" > <a name="632">632</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Value12 Value22 Value32 </td> </tr> <tr> <td class="h" > <a name="633">633</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="634">634</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Columns are auto-sized by the data's widths, plus two spaces between columns. </td> </tr> <tr> <td class="h" > <a name="635">635</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Values which are too long for the maximum colulmn width are wrapped within </td> </tr> <tr> <td class="h" > <a name="636">636</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the column. </td> </tr> <tr> <td class="h" > <a name="637">637</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="638">638</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="639">639</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="640">640</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowSimpleTable { </td> </tr> <tr> <td class="h" > <a name="641">641</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#641-1"> 37 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#641-1"> 0 </a> </td> <td > 449802 </td> <td class="s"> my @argv = @_; </td> </tr> <tr> <td class="h" > <a name="642">642</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1443 </td> <td class="s"> local ($titles, $types, $col_widths, $row_sub, $fmt_sub, $max_width); </td> </tr> <tr> <td class="h" > <a name="643">643</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1358 </td> <td class="s"> my $args = </td> </tr> <tr> <td class="h" > <a name="644">644</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> get_params </td> </tr> <tr> <td class="h" > <a name="645">645</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> \@argv, </td> </tr> <tr> <td class="h" > <a name="646">646</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> { titles => \$titles, </td> </tr> <tr> <td class="h" > <a name="647">647</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> types => \$types, </td> </tr> <tr> <td class="h" > <a name="648">648</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> widths => \$col_widths, </td> </tr> <tr> <td class="h" > <a name="649">649</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> row_sub => \$row_sub, </td> </tr> <tr> <td class="h" > <a name="650">650</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> fmtsub => \$fmt_sub, </td> </tr> <tr> <td class="h" > <a name="651">651</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> max_width => \$max_width, </td> </tr> <tr> <td class="h" > <a name="652">652</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> }, </td> </tr> <tr> <td class="h" > <a name="653">653</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [qw(titles types widths row_sub fmtsub max_width)]; </td> </tr> <tr> <td class="h" > <a name="654">654</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="655">655</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#655-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 411 </td> <td class="s"> $titles ne '' or croak "Missing column names array.\n"; </td> </tr> <tr> <td class="h" > <a name="656">656</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#656-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 202 </td> <td class="s"> $types ne '' or croak "Missing column types array.\n"; </td> </tr> <tr> <td class="h" > <a name="657">657</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#657-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 191 </td> <td class="s"> $col_widths ne '' or croak "Missing column width array.\n"; </td> </tr> <tr> <td class="h" > <a name="658">658</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#658-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 141 </td> <td class="s"> $row_sub ne '' or croak "Missing row sub array.\n"; </td> </tr> <tr> <td class="h" > <a name="659">659</a> </td> <td class="c3" > 37 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#659-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#659-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 348 </td> <td class="s"> $fmt_sub = \&ShowTableValue if !defined($fmt_sub) || $fmt_sub eq ''; </td> </tr> <tr> <td class="h" > <a name="660">660</a> </td> <td class="c3" > 37 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#660-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#660-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 429 </td> <td class="s"> $max_width = $Max_Table_Width if !defined($max_width) || $max_width eq ''; </td> </tr> <tr> <td class="h" > <a name="661">661</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="662">662</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 236 </td> <td class="s"> my $rewindable = &$row_sub(1); # see if data is rewindable </td> </tr> <tr> <td class="h" > <a name="663">663</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="664">664</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 435 </td> <td class="s"> my ($num_cols, $widths, $precision, $max_widths) = </td> </tr> <tr> <td class="h" > <a name="665">665</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &calc_widths($col_widths, $titles, $rewindable, </td> </tr> <tr> <td class="h" > <a name="666">666</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $row_sub, $fmt_sub, $types, 'table', $max_width); </td> </tr> <tr> <td class="h" > <a name="667">667</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="668">668</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 71 </td> <td class="s"> my $width = 1; </td> </tr> <tr> <td class="h" > <a name="669">669</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 82 </td> <td class="s"> my $dashes = ' '; </td> </tr> <tr> <td class="h" > <a name="670">670</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 71 </td> <td class="s"> my $title_line = ' '; </td> </tr> <tr> <td class="h" > <a name="671">671</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 54 </td> <td class="s"> my $title ; </td> </tr> <tr> <td class="h" > <a name="672">672</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 62 </td> <td class="s"> my $postfix = shift; </td> </tr> <tr> <td class="h" > <a name="673">673</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 474 </td> <td class="s"> my $c ; </td> </tr> <tr> <td class="h" > <a name="674">674</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="675">675</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Calculate the maximum widths </td> </tr> <tr> <td class="h" > <a name="676">676</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 121 </td> <td class="s"> for ($c = 0; $c < $num_cols; $c++) { </td> </tr> <tr> <td class="h" > <a name="677">677</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 305 </td> <td class="s"> $width = $max_widths->[$c]; </td> </tr> <tr> <td class="h" > <a name="678">678</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 344 </td> <td class="s"> $dashes .= ('-' x $width); </td> </tr> <tr> <td class="h" > <a name="679">679</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 223 </td> <td class="s"> $dashes .= ' '; </td> </tr> <tr> <td class="h" > <a name="680">680</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="681">681</a> </td> <td class="c3" > 170 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#681-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 511 </td> <td class="s"> next if $#$titles < 0; </td> </tr> <tr> <td class="h" > <a name="682">682</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 648 </td> <td class="s"> $title = center $titles->[$c], $width; </td> </tr> <tr> <td class="h" > <a name="683">683</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 330 </td> <td class="s"> $title_line .= $title; </td> </tr> <tr> <td class="h" > <a name="684">684</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 446 </td> <td class="s"> $title_line .= ' '; </td> </tr> <tr> <td class="h" > <a name="685">685</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="686">686</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="687">687</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#687-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 329 </td> <td class="s"> out $title_line if $#$titles >= 0; </td> </tr> <tr> <td class="h" > <a name="688">688</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 210 </td> <td class="s"> out $dashes; </td> </tr> <tr> <td class="h" > <a name="689">689</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="690">690</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 259 </td> <td class="s"> my @values; </td> </tr> <tr> <td class="h" > <a name="691">691</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 661 </td> <td class="s"> my @prefix = (" ", "<"); </td> </tr> <tr> <td class="h" > <a name="692">692</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 216 </td> <td class="s"> my @suffix = (" ", ">"); </td> </tr> <tr> <td class="h" > <a name="693">693</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="694">694</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 185 </td> <td class="s"> while ((@values = &$row_sub(0)), $#values >= $[) { </td> </tr> <tr> <td class="h" > <a name="695">695</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # first pass -- format each value into a string </td> </tr> <tr> <td class="h" > <a name="696">696</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 587 </td> <td class="s"> my @cell; </td> </tr> <tr> <td class="h" > <a name="697">697</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 547 </td> <td class="s"> for ($c = 0; $c <= $#values; $c++) { </td> </tr> <tr> <td class="h" > <a name="698">698</a> </td> <td class="c3" > 850 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4435 </td> <td class="s"> $cell[$c] = &$fmt_sub($values[$c], $types->[$c], $max_widths->[$c], </td> </tr> <tr> <td class="h" > <a name="699">699</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $widths->[$c], $precision->[$c], 'table'); </td> </tr> <tr> <td class="h" > <a name="700">700</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="701">701</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # second pass -- output each cell, wrapping if necessary </td> </tr> <tr> <td class="h" > <a name="702">702</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 246 </td> <td class="s"> my $will_wrap; </td> </tr> <tr> <td class="h" > <a name="703">703</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 301 </td> <td class="s"> my $wrapped = 0; </td> </tr> <tr> <td class="h" > <a name="704">704</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 229 </td> <td class="s"> do { $will_wrap = 0; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 391 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 481 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="705">705</a> </td> <td class="c3" > 391 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 968 </td> <td class="s"> for ($c = 0; $c <= $#cell; $c++) { </td> </tr> <tr> <td class="h" > <a name="706">706</a> </td> <td class="c3" > 1814 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5716 </td> <td class="s"> $will_wrap |= &putcell(\@cell, $c, $max_widths->[$c], </td> </tr> <tr> <td class="h" > <a name="707">707</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> \@prefix, \@suffix, $wrapped); </td> </tr> <tr> <td class="h" > <a name="708">708</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="709">709</a> </td> <td class="c3" > 391 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 911 </td> <td class="s"> out ""; </td> </tr> <tr> <td class="h" > <a name="710">710</a> </td> <td class="c3" > 391 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2475 </td> <td class="s"> $wrapped++; </td> </tr> <tr> <td class="h" > <a name="711">711</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } while ($will_wrap); </td> </tr> <tr> <td class="h" > <a name="712">712</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="713">713</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 101 </td> <td class="s"> out ""; </td> </tr> <tr> <td class="h" > <a name="714">714</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="715">715</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="716">716</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowHTMLTable </td> </tr> <tr> <td class="h" > <a name="717">717</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="718">718</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Display a table of data nicely using HTML tables. </td> </tr> <tr> <td class="h" > <a name="719">719</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="720">720</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowHTMLTable> { I<parameter> => I<value>, ... }; </td> </tr> <tr> <td class="h" > <a name="721">721</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="722">722</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowHTMLTable> I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> </td> </tr> <tr> <td class="h" > <a name="723">723</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [, I<\&fmt_sub> [, I<$max_width> [, I<\%URL_Keys> [, I<$no_escape> </td> </tr> <tr> <td class="h" > <a name="724">724</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [, I<\@title_formats> [, I<\@data_formats> [, I<$table_attrs> ] ] ] ] ] ] ]; </td> </tr> <tr> <td class="h" > <a name="725">725</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="726">726</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The B<ShowHTMLTable> displays one or more rows of columns of data using </td> </tr> <tr> <td class="h" > <a name="727">727</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the HTML C<\<TABLE\>> feature. In addition to the usual parameter arguments </td> </tr> <tr> <td class="h" > <a name="728">728</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> of L<"ShowTable">, the following parameter arguments are defined: </td> </tr> <tr> <td class="h" > <a name="729">729</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="730">730</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="731">731</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="732">732</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<url_keys> => I<\%URL_Keys>, </td> </tr> <tr> <td class="h" > <a name="733">733</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="734">734</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> This is a hash array of column names (titles) and corresponding base </td> </tr> <tr> <td class="h" > <a name="735">735</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> URLs. The values of any column names or indexes occuring as keys in </td> </tr> <tr> <td class="h" > <a name="736">736</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the hash array will be generated as hypertext anchors using the </td> </tr> <tr> <td class="h" > <a name="737">737</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> associated I<printf>-like string as the base URL. Either the column name </td> </tr> <tr> <td class="h" > <a name="738">738</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> or the column index (beginning with 1) may be used as the hash key. </td> </tr> <tr> <td class="h" > <a name="739">739</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="740">740</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> In the string value, these macros can be substituted: </td> </tr> <tr> <td class="h" > <a name="741">741</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="742">742</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> "C<%K>" is replaced with the column name. </td> </tr> <tr> <td class="h" > <a name="743">743</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="744">744</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> "C<%V>" is replaced with the column value; </td> </tr> <tr> <td class="h" > <a name="745">745</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="746">746</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> "C<%I>" is replaced with the column index. </td> </tr> <tr> <td class="h" > <a name="747">747</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="748">748</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> For example, if we define the array: </td> </tr> <tr> <td class="h" > <a name="749">749</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="750">750</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $base_url = "http://www.$domain/cgi/lookup?col=%K?val=%V"; </td> </tr> <tr> <td class="h" > <a name="751">751</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> %url_cols = ('Author' => $base_url, </td> </tr> <tr> <td class="h" > <a name="752">752</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'Name' => $base_url); </td> </tr> <tr> <td class="h" > <a name="753">753</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="754">754</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Then, the values in the C<Author> column will be generated with the following </td> </tr> <tr> <td class="h" > <a name="755">755</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> HTML text: </td> </tr> <tr> <td class="h" > <a name="756">756</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="757">757</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> <A HREF="http://www.$domain/cgi/lookup?col=Author?val=somevalue>somevalue</A> </td> </tr> <tr> <td class="h" > <a name="758">758</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="759">759</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> and the values in the C<Name> column will be generated with the URL: </td> </tr> <tr> <td class="h" > <a name="760">760</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="761">761</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> <A HREF="http://www.$domain/cgi/lookup?col=Name?val=othervalue>othervalue</A> </td> </tr> <tr> <td class="h" > <a name="762">762</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="763">763</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If this variable is not given, it will default to the global variable </td> </tr> <tr> <td class="h" > <a name="764">764</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> C<\%URL_Keys>. </td> </tr> <tr> <td class="h" > <a name="765">765</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="766">766</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<no_escape> => I<boolean>, </td> </tr> <tr> <td class="h" > <a name="767">767</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="768">768</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Unless B<$no_escape> is set, HTML-escaping is performed on the data </td> </tr> <tr> <td class="h" > <a name="769">769</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> values in order to properly display the special HTML formatting </td> </tr> <tr> <td class="h" > <a name="770">770</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> characters : '\<', '\>', and '&'. If you wish to display data with </td> </tr> <tr> <td class="h" > <a name="771">771</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> embedded HTML text, you must set B<$no_escape>. </td> </tr> <tr> <td class="h" > <a name="772">772</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="773">773</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Enabling embedded HTML, turns on certain heuristics which enable the </td> </tr> <tr> <td class="h" > <a name="774">774</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> user to more completely define appearance of the table. For instance, </td> </tr> <tr> <td class="h" > <a name="775">775</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> any C<\<TR\>> tokens found embedded *anywhere* within a row of data will </td> </tr> <tr> <td class="h" > <a name="776">776</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> be placed at the front of the row, within the generated C<\<TR\>>. </td> </tr> <tr> <td class="h" > <a name="777">777</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="778">778</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Similarly, a row of data containing the C<\<THEAD\>> or C<\<TFOOT\>> </td> </tr> <tr> <td class="h" > <a name="779">779</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> tokens, and their closing counterparts, will begin and end, respectively </td> </tr> <tr> <td class="h" > <a name="780">780</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> a table header or footer data. </td> </tr> <tr> <td class="h" > <a name="781">781</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="782">782</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<title_formats> => I<\@title_formats>, </td> </tr> <tr> <td class="h" > <a name="783">783</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="784">784</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<tformats> => I<\@title_formats>, </td> </tr> <tr> <td class="h" > <a name="785">785</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="786">786</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> An array of HTML formatting elements for the column titles, one for each </td> </tr> <tr> <td class="h" > <a name="787">787</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> column. Each array element is a list of one or more HTML elements, </td> </tr> <tr> <td class="h" > <a name="788">788</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> given as C<\<ELEMENT\>> or plainly, C<ELEMENT>, and separated by a comma </td> </tr> <tr> <td class="h" > <a name="789">789</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> C<','>, semi-colon C<';'>, or vertical bar C<'|'>. Each given HTML </td> </tr> <tr> <td class="h" > <a name="790">790</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> element is prepended to the corresponding column title, in the order </td> </tr> <tr> <td class="h" > <a name="791">791</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> given. The corresponding HTML closing elements are appended in the </td> </tr> <tr> <td class="h" > <a name="792">792</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> opposite order. </td> </tr> <tr> <td class="h" > <a name="793">793</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="794">794</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> For example, if I<\@title_formats> contains the two elements: </td> </tr> <tr> <td class="h" > <a name="795">795</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="796">796</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [ 'FONT SIZE=+2,BOLD', 'FONT COLOR=red,EM' ] </td> </tr> <tr> <td class="h" > <a name="797">797</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="798">798</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> then the text output for the title of the first column would be: </td> </tr> <tr> <td class="h" > <a name="799">799</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="800">800</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> <FONT SIZE=+2><BOLD>I<column_1_title></BOLD></FONT> </td> </tr> <tr> <td class="h" > <a name="801">801</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="802">802</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If C<title_formats> is omitted, the global variable B<@Title_Formats> </td> </tr> <tr> <td class="h" > <a name="803">803</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is used by default. </td> </tr> <tr> <td class="h" > <a name="804">804</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="805">805</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<data_formats> => I<\@data_formats>, </td> </tr> <tr> <td class="h" > <a name="806">806</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="807">807</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<dformats> => I<\@data_formats>, </td> </tr> <tr> <td class="h" > <a name="808">808</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="809">809</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Similar to C<title_formats>, this array provides HTML formatting for </td> </tr> <tr> <td class="h" > <a name="810">810</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the columns of each row of data. If C<data_formats> is omitted or </td> </tr> <tr> <td class="h" > <a name="811">811</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> null, then the global variable B<\@Data_Formats> is used by default. </td> </tr> <tr> <td class="h" > <a name="812">812</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="813">813</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<table_attrs> => I<$table_attrs>, </td> </tr> <tr> <td class="h" > <a name="814">814</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="815">815</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> This variable defines a string of attributes to be inserted within the </td> </tr> <tr> <td class="h" > <a name="816">816</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> C<\<TABLE\>> token. For example, if the user wishes to have no table </td> </tr> <tr> <td class="h" > <a name="817">817</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> border: </td> </tr> <tr> <td class="h" > <a name="818">818</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="819">819</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowHTMLTable { </td> </tr> <tr> <td class="h" > <a name="820">820</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ... </td> </tr> <tr> <td class="h" > <a name="821">821</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> table_attrs => 'BORDER=0', </td> </tr> <tr> <td class="h" > <a name="822">822</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ... </td> </tr> <tr> <td class="h" > <a name="823">823</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="824">824</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="825">825</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="826">826</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="827">827</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="828">828</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="829">829</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowHTMLTable { </td> </tr> <tr> <td class="h" > <a name="830">830</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#830-1"> 49 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#830-1"> 0 </a> </td> <td > 833551 </td> <td class="s"> my @argv = @_; </td> </tr> <tr> <td class="h" > <a name="831">831</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1431 </td> <td class="s"> local ($titles, $types, $col_widths, $row_sub, $fmt_sub, $max_width, </td> </tr> <tr> <td class="h" > <a name="832">832</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $url_keys, $no_escape, $title_formats, $data_formats, </td> </tr> <tr> <td class="h" > <a name="833">833</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $show_mode, $table_attrs); </td> </tr> <tr> <td class="h" > <a name="834">834</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3115 </td> <td class="s"> my $args = </td> </tr> <tr> <td class="h" > <a name="835">835</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> get_params </td> </tr> <tr> <td class="h" > <a name="836">836</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> \@argv, </td> </tr> <tr> <td class="h" > <a name="837">837</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> { titles => \$titles, </td> </tr> <tr> <td class="h" > <a name="838">838</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> types => \$types, </td> </tr> <tr> <td class="h" > <a name="839">839</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> widths => \$col_widths, </td> </tr> <tr> <td class="h" > <a name="840">840</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> row_sub => \$row_sub, </td> </tr> <tr> <td class="h" > <a name="841">841</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> fmtsub => \$fmt_sub, </td> </tr> <tr> <td class="h" > <a name="842">842</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> max_width => \$max_width, </td> </tr> <tr> <td class="h" > <a name="843">843</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> url_keys => \$url_keys, </td> </tr> <tr> <td class="h" > <a name="844">844</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> no_escape => \$no_escape, </td> </tr> <tr> <td class="h" > <a name="845">845</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> tformats => \$title_formats, </td> </tr> <tr> <td class="h" > <a name="846">846</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> dformats => \$data_formats, </td> </tr> <tr> <td class="h" > <a name="847">847</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> table_attrs => \$table_attrs, </td> </tr> <tr> <td class="h" > <a name="848">848</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> data_formats => 'tformats', </td> </tr> <tr> <td class="h" > <a name="849">849</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> title_formats => 'tformats', </td> </tr> <tr> <td class="h" > <a name="850">850</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> }, </td> </tr> <tr> <td class="h" > <a name="851">851</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [qw(titles types widths row_sub fmtsub max_width </td> </tr> <tr> <td class="h" > <a name="852">852</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> url_keys no_escape title_formats data_formats </td> </tr> <tr> <td class="h" > <a name="853">853</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> table_attrs)]; </td> </tr> <tr> <td class="h" > <a name="854">854</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="855">855</a> </td> <td class="c3" > 49 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#855-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 445 </td> <td class="s"> $titles ne '' or croak "Missing column names array.\n"; </td> </tr> <tr> <td class="h" > <a name="856">856</a> </td> <td class="c3" > 49 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#856-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1390 </td> <td class="s"> $types ne '' or croak "Missing column types array.\n"; </td> </tr> <tr> <td class="h" > <a name="857">857</a> </td> <td class="c3" > 49 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#857-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 178 </td> <td class="s"> $col_widths ne '' or croak "Missing column width array.\n"; </td> </tr> <tr> <td class="h" > <a name="858">858</a> </td> <td class="c3" > 49 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#858-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 373 </td> <td class="s"> $row_sub ne '' or croak "Missing row sub array.\n"; </td> </tr> <tr> <td class="h" > <a name="859">859</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="860">860</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Defaults </td> </tr> <tr> <td class="h" > <a name="861">861</a> </td> <td class="c3" > 49 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#861-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#861-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 320 </td> <td class="s"> $fmt_sub = \&ShowTableValue if !defined($fmt_sub) || $fmt_sub eq ''; </td> </tr> <tr> <td class="h" > <a name="862">862</a> </td> <td class="c3" > 49 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#862-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#862-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 476 </td> <td class="s"> $max_width = $Max_Table_Width if !defined($max_width) || $max_width eq ''; </td> </tr> <tr> <td class="h" > <a name="863">863</a> </td> <td class="c3" > 49 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#863-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#863-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 300 </td> <td class="s"> $url_keys = \%URL_Keys if !defined($url_keys) || $url_keys eq ''; </td> </tr> <tr> <td class="h" > <a name="864">864</a> </td> <td class="c3" > 49 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#864-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#864-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 963 </td> <td class="s"> $title_formats = \@Title_Formats if !defined($title_formats) || $title_formats eq ''; </td> </tr> <tr> <td class="h" > <a name="865">865</a> </td> <td class="c3" > 49 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#865-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#865-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 257 </td> <td class="s"> $data_formats = \@Data_Formats if !defined($data_formats) || $data_formats eq ''; </td> </tr> <tr> <td class="h" > <a name="866">866</a> </td> <td class="c3" > 49 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#866-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 204 </td> <td class="s"> $no_escape = $No_Escape if !defined($no_escape); </td> </tr> <tr> <td class="h" > <a name="867">867</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="868">868</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 356 </td> <td class="s"> my $rewindable = &$row_sub(1); # see if rewindable </td> </tr> <tr> <td class="h" > <a name="869">869</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="870">870</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 525 </td> <td class="s"> my ($num_cols, $widths, $precision, $max_widths) = </td> </tr> <tr> <td class="h" > <a name="871">871</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &calc_widths($col_widths, $titles, $rewindable, </td> </tr> <tr> <td class="h" > <a name="872">872</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $row_sub, $fmt_sub, $types, 'html', $max_width); </td> </tr> <tr> <td class="h" > <a name="873">873</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="874">874</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 133 </td> <td class="s"> my $width = 1; </td> </tr> <tr> <td class="h" > <a name="875">875</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 73 </td> <td class="s"> my $total_width = 0; </td> </tr> <tr> <td class="h" > <a name="876">876</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 94 </td> <td class="s"> my $title_line = ''; </td> </tr> <tr> <td class="h" > <a name="877">877</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 62 </td> <td class="s"> my $title; </td> </tr> <tr> <td class="h" > <a name="878">878</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 62 </td> <td class="s"> my ($c,$x); </td> </tr> <tr> <td class="h" > <a name="879">879</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my ($tprefixes,$tsuffixes,$dprefixes,$dsuffixes); </td> </tr> <tr> <td class="h" > <a name="880">880</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="881">881</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # prepare the HTML prefixes and suffixes, if any </td> </tr> <tr> <td class="h" > <a name="882">882</a> </td> <td class="c3" > 49 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#882-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#882-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 586 </td> <td class="s"> ($tprefixes,$tsuffixes) = html_formats $title_formats </td> </tr> <tr> <td class="h" > <a name="883">883</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> if defined($title_formats) && $title_formats ne ''; </td> </tr> <tr> <td class="h" > <a name="884">884</a> </td> <td class="c3" > 49 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#884-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#884-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 411 </td> <td class="s"> ($dprefixes,$dsuffixes) = html_formats $data_formats </td> </tr> <tr> <td class="h" > <a name="885">885</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> if defined($data_formats) && $data_formats ne ''; </td> </tr> <tr> <td class="h" > <a name="886">886</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="887">887</a> </td> <td class="c3" > 49 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#887-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 129 </td> <td class="s"> if ($table_attrs) { # any table attributes? </td> </tr> <tr> <td class="h" > <a name="888">888</a> </td> <td class="c3" > 4 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 19 </td> <td class="s"> local($_) = $table_attrs; </td> </tr> <tr> <td class="h" > <a name="889">889</a> </td> <td class="c3" > 4 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#889-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 50 </td> <td class="s"> $table_attrs .= ' BORDER=1' unless /\bBORDER=/i; </td> </tr> <tr> <td class="h" > <a name="890">890</a> </td> <td class="c3" > 4 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#890-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 56 </td> <td class="s"> $table_attrs .= ' CELLPADDING=1' unless /\bCELLPADDING=/i; </td> </tr> <tr> <td class="h" > <a name="891">891</a> </td> <td class="c3" > 4 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#891-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 25 </td> <td class="s"> $table_attrs .= ' CELLSPACING=1' unless /\bCELLSPACING=/i; </td> </tr> <tr> <td class="h" > <a name="892">892</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="893">893</a> </td> <td class="c3" > 45 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 213 </td> <td class="s"> $table_attrs = 'BORDER=2 CELLPADDING=1 CELLSPACING=1'; </td> </tr> <tr> <td class="h" > <a name="894">894</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="895">895</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="896">896</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 420 </td> <td class="s"> out "<TABLE $table_attrs>\n<TR>" ; </td> </tr> <tr> <td class="h" > <a name="897">897</a> </td> <td class="c3" > 49 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#897-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 134 </td> <td class="s"> map { $total_width += defined($_) ? $_ : 0; } @$max_widths; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 230 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 498 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="898">898</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 320 </td> <td class="s"> for ($c = 0; $c < $num_cols; $c++) { </td> </tr> <tr> <td class="h" > <a name="899">899</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If the user specified a width, then use it. </td> </tr> <tr> <td class="h" > <a name="900">900</a> </td> <td class="c3" > 230 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#900-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1720 </td> <td class="s"> $width = defined($widths->[$c]) ? $widths->[$c] : $max_widths->[$c]; </td> </tr> <tr> <td class="h" > <a name="901">901</a> </td> <td class="c3" > 230 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 570 </td> <td class="s"> my $pct_width = int(100 * $width/$total_width); </td> </tr> <tr> <td class="h" > <a name="902">902</a> </td> <td class="c3" > 230 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 583 </td> <td class="s"> $title_line .= " <TH ALIGN=CENTER WIDTH=$pct_width%%>"; </td> </tr> <tr> <td class="h" > <a name="903">903</a> </td> <td class="c3" > 230 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#903-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 683 </td> <td class="s"> if ($#$titles >= 0) { </td> </tr> <tr> <td class="h" > <a name="904">904</a> </td> <td class="c3" > 230 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#904-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 638 </td> <td class="s"> if (($x = $#$tprefixes) >= 0) { </td> </tr> <tr> <td class="h" > <a name="905">905</a> </td> <td class="c3" > 10 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#905-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 35 </td> <td class="s"> $title_line .= $tprefixes->[$c > $x ? $x : $c]; </td> </tr> <tr> <td class="h" > <a name="906">906</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="907">907</a> </td> <td class="c3" > 230 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#907-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1132 </td> <td class="s"> $title_line .= $no_escape ? $titles->[$c] : &htmltext($titles->[$c]); </td> </tr> <tr> <td class="h" > <a name="908">908</a> </td> <td class="c3" > 230 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#908-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 552 </td> <td class="s"> if (($x = $#$tsuffixes) >= 0) { </td> </tr> <tr> <td class="h" > <a name="909">909</a> </td> <td class="c3" > 10 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#909-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 31 </td> <td class="s"> $title_line .= $tsuffixes->[$c > $x ? $x : $c]; </td> </tr> <tr> <td class="h" > <a name="910">910</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="911">911</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="912">912</a> </td> <td class="c3" > 230 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1006 </td> <td class="s"> $title_line .= "</TH>\n"; </td> </tr> <tr> <td class="h" > <a name="913">913</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="914">914</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 102 </td> <td class="s"> out $title_line; </td> </tr> <tr> <td class="h" > <a name="915">915</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 161 </td> <td class="s"> out "</TR>"; </td> </tr> <tr> <td class="h" > <a name="916">916</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="917">917</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 92 </td> <td class="s"> my ($href, $key, $val, $out); </td> </tr> <tr> <td class="h" > <a name="918">918</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 278 </td> <td class="s"> while ((@values = &$row_sub(0)), $#values >= $[) { </td> </tr> <tr> <td class="h" > <a name="919">919</a> </td> <td class="c3" > 245 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1579 </td> <td class="s"> out "<TR> "; </td> </tr> <tr> <td class="h" > <a name="920">920</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Walk through the values </td> </tr> <tr> <td class="h" > <a name="921">921</a> </td> <td class="c3" > 245 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5776 </td> <td class="s"> for ($c = 0; $c <= $#values; $c++) { </td> </tr> <tr> <td class="h" > <a name="922">922</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3161 </td> <td class="s"> $out = "<TD"; </td> </tr> <tr> <td class="h" > <a name="923">923</a> </td> <td class="c3" > 1150 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#923-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2385 </td> <td class="s"> if (defined($val = $values[$c])) { # only worry about defined values </td> </tr> <tr> <td class="h" > <a name="924">924</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # In HTML mode, all CHAR, TEXT, SYMBOL, or STRING data should </td> </tr> <tr> <td class="h" > <a name="925">925</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # be escaped to protect HTML syntax "<", ">", "\", and "&". </td> </tr> <tr> <td class="h" > <a name="926">926</a> </td> <td class="c3" > 1150 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#926-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5652 </td> <td class="s"> if ($types->[$c] =~ /char|text|symbol|string/i) { </td> </tr> <tr> <td class="h" > <a name="927">927</a> </td> <td class="c3" > 710 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#927-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3206 </td> <td class="s"> $val = &htmltext($val) unless $no_escape; </td> </tr> <tr> <td class="h" > <a name="928">928</a> </td> <td class="c3" > 710 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5822 </td> <td class="s"> $out .= " ALIGN=LEFT"; </td> </tr> <tr> <td class="h" > <a name="929">929</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="930">930</a> </td> <td class="c3" > 440 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 704 </td> <td class="s"> $out .= " ALIGN=RIGHT"; </td> </tr> <tr> <td class="h" > <a name="931">931</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="932">932</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1308 </td> <td class="s"> $out .= ">"; </td> </tr> <tr> <td class="h" > <a name="933">933</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Discover if either the column name or column index </td> </tr> <tr> <td class="h" > <a name="934">934</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # have been mapped to a URL. </td> </tr> <tr> <td class="h" > <a name="935">935</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1444 </td> <td class="s"> $href = ''; </td> </tr> <tr> <td class="h" > <a name="936">936</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#936-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4679 </td> <td class="s"> foreach $key ( $#$titles >= 0 && &PlainText($titles->[$c]), </td> </tr> <tr> <td class="h" > <a name="937">937</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sprintf("%d", $c+1)) { </td> </tr> <tr> <td class="h" > <a name="938">938</a> </td> <td class="c3" > 2255 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#938-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#938-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 15193 </td> <td class="s"> next unless $key ne '' && defined($url_keys->{$key}); </td> </tr> <tr> <td class="h" > <a name="939">939</a> </td> <td class="c3" > 45 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 75 </td> <td class="s"> $href = $url_keys->{$key}; </td> </tr> <tr> <td class="h" > <a name="940">940</a> </td> <td class="c3" > 45 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 65 </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="941">941</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="942">942</a> </td> <td class="c3" > 1150 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#942-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4214 </td> <td class="s"> if ($href ne '') { </td> </tr> <tr> <td class="h" > <a name="943">943</a> </td> <td class="c3" > 45 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#943-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 145 </td> <td class="s"> if ($href =~ /%K/) { </td> </tr> <tr> <td class="h" > <a name="944">944</a> </td> <td class="c3" > 30 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 73 </td> <td class="s"> my $s = &htmltext(&PlainText($titles->[$c]), 1); </td> </tr> <tr> <td class="h" > <a name="945">945</a> </td> <td class="c3" > 30 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 114 </td> <td class="s"> $href =~ s/%K/$s/g; </td> </tr> <tr> <td class="h" > <a name="946">946</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="947">947</a> </td> <td class="c3" > 45 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#947-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 130 </td> <td class="s"> if ($href =~ /%V/) { </td> </tr> <tr> <td class="h" > <a name="948">948</a> </td> <td class="c3" > 45 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 80 </td> <td class="s"> my $s = &htmltext($val, 1); </td> </tr> <tr> <td class="h" > <a name="949">949</a> </td> <td class="c3" > 45 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 149 </td> <td class="s"> $href =~ s/%V/$s/g; </td> </tr> <tr> <td class="h" > <a name="950">950</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="951">951</a> </td> <td class="c3" > 45 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#951-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 117 </td> <td class="s"> if ($href =~ /%I/) { </td> </tr> <tr> <td class="h" > <a name="952">952</a> </td> <td class="c3" > 20 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 56 </td> <td class="s"> my $s = sprintf("%d", $c+1); </td> </tr> <tr> <td class="h" > <a name="953">953</a> </td> <td class="c3" > 20 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 63 </td> <td class="s"> $href =~ s/%I/$s/g; </td> </tr> <tr> <td class="h" > <a name="954">954</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="955">955</a> </td> <td class="c3" > 45 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 214 </td> <td class="s"> $out .= sprintf("<A HREF=\"%s\">",$href); </td> </tr> <tr> <td class="h" > <a name="956">956</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="957">957</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4368 </td> <td class="s"> $val = &$fmt_sub($val, $types->[$c], 0, $widths->[$c], </td> </tr> <tr> <td class="h" > <a name="958">958</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $precision->[$c], 'html'); </td> </tr> <tr> <td class="h" > <a name="959">959</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3935 </td> <td class="s"> $val =~ s/^\s+//; # don't try to align </td> </tr> <tr> <td class="h" > <a name="960">960</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4396 </td> <td class="s"> $val =~ s/\s+$//; </td> </tr> <tr> <td class="h" > <a name="961">961</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="962">962</a> </td> <td class="c3" > 1150 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#962-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2805 </td> <td class="s"> if (($x = $#$dprefixes) >= 0) { </td> </tr> <tr> <td class="h" > <a name="963">963</a> </td> <td class="c3" > 125 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#963-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 296 </td> <td class="s"> $out .= $dprefixes->[$c > $x ? $x : $c]; </td> </tr> <tr> <td class="h" > <a name="964">964</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="965">965</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1778 </td> <td class="s"> $out .= $val; </td> </tr> <tr> <td class="h" > <a name="966">966</a> </td> <td class="c3" > 1150 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#966-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3121 </td> <td class="s"> if (($x = $#$dsuffixes) >= 0) { </td> </tr> <tr> <td class="h" > <a name="967">967</a> </td> <td class="c3" > 125 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#967-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 251 </td> <td class="s"> $out .= $dsuffixes->[$c > $x ? $x : $c]; </td> </tr> <tr> <td class="h" > <a name="968">968</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="969">969</a> </td> <td class="c3" > 1150 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#969-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2387 </td> <td class="s"> $out .= "</A>" if $href; </td> </tr> <tr> <td class="h" > <a name="970">970</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="971">971</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $out .= ">"; </td> </tr> <tr> <td class="h" > <a name="972">972</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="973">973</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5589 </td> <td class="s"> $out .= "</TD>"; </td> </tr> <tr> <td class="h" > <a name="974">974</a> </td> <td class="c3" > 1150 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 12546 </td> <td class="s"> out $out; </td> </tr> <tr> <td class="h" > <a name="975">975</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="976">976</a> </td> <td class="c3" > 245 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 485 </td> <td class="s"> out "</TR>"; </td> </tr> <tr> <td class="h" > <a name="977">977</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="978">978</a> </td> <td class="c3" > 49 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 127 </td> <td class="s"> out "</TABLE>"; </td> </tr> <tr> <td class="h" > <a name="979">979</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="980">980</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="981">981</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowListTable </td> </tr> <tr> <td class="h" > <a name="982">982</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="983">983</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Display a table of data using a list format. </td> </tr> <tr> <td class="h" > <a name="984">984</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="985">985</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowListTable> { I<parameter> => I<value>, ... }; </td> </tr> <tr> <td class="h" > <a name="986">986</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="987">987</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowListTable> I<\@titles>, I<\@types>, I<\@widths>, I<\&row_sub> </td> </tr> <tr> <td class="h" > <a name="988">988</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [, I<\&fmt_sub> [, I<$max_width> [, I<$wrap_margin> ] ] ]; </td> </tr> <tr> <td class="h" > <a name="989">989</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="990">990</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The arguments for B<ShowListTable> are the same as for L<"ShowTable">, </td> </tr> <tr> <td class="h" > <a name="991">991</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> except for those described next. </td> </tr> <tr> <td class="h" > <a name="992">992</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="993">993</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="994">994</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="995">995</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<max_width> = I<number>, </td> </tr> <tr> <td class="h" > <a name="996">996</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="997">997</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<wrap_margin> = I<number>, </td> </tr> <tr> <td class="h" > <a name="998">998</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="999">999</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Lines are truncated, and wrapped when their length exceeds </td> </tr> <tr> <td class="h" > <a name="1000">1000</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> I<$max_width>. Wrapping is done on a word-basis, unless the resulting </td> </tr> <tr> <td class="h" > <a name="1001">1001</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> right margin exceeds I<$wrap_margin>, in which case the line is simply </td> </tr> <tr> <td class="h" > <a name="1002">1002</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> truncated at the I<$max_width> limit. </td> </tr> <tr> <td class="h" > <a name="1003">1003</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1004">1004</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The I<$max_width> variable defaults to B<$Max_List_Width>. The </td> </tr> <tr> <td class="h" > <a name="1005">1005</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> I<$wrap_margin> defaults to B<$List_Wrap_Margin>. </td> </tr> <tr> <td class="h" > <a name="1006">1006</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1007">1007</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="1008">1008</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1009">1009</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> In I<List> mode, columns (called "fields" in List mode) are displayed </td> </tr> <tr> <td class="h" > <a name="1010">1010</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> wth a field name and value pair per line, with records being one or </td> </tr> <tr> <td class="h" > <a name="1011">1011</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> more fields . In other words, the output of a table would </td> </tr> <tr> <td class="h" > <a name="1012">1012</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> look something like this: </td> </tr> <tr> <td class="h" > <a name="1013">1013</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1014">1014</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Field1_1: Value1_1 </td> </tr> <tr> <td class="h" > <a name="1015">1015</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Field1_2: Value1_2 </td> </tr> <tr> <td class="h" > <a name="1016">1016</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Field1_3: Value1_3 </td> </tr> <tr> <td class="h" > <a name="1017">1017</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ... </td> </tr> <tr> <td class="h" > <a name="1018">1018</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Field1-N: Value1_M </td> </tr> <tr> <td class="h" > <a name="1019">1019</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> <empty line> </td> </tr> <tr> <td class="h" > <a name="1020">1020</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Field2_1: Value2_1 </td> </tr> <tr> <td class="h" > <a name="1021">1021</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Field2_2: Value2_2 </td> </tr> <tr> <td class="h" > <a name="1022">1022</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Field2_3: Value2_3 </td> </tr> <tr> <td class="h" > <a name="1023">1023</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ... </td> </tr> <tr> <td class="h" > <a name="1024">1024</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Field2_N: Value2_N </td> </tr> <tr> <td class="h" > <a name="1025">1025</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ... </td> </tr> <tr> <td class="h" > <a name="1026">1026</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> FieldM_1: ValueM_1 </td> </tr> <tr> <td class="h" > <a name="1027">1027</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> FieldM_2: ValueM_2 </td> </tr> <tr> <td class="h" > <a name="1028">1028</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ... </td> </tr> <tr> <td class="h" > <a name="1029">1029</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> FieldM_N: ValueM_N </td> </tr> <tr> <td class="h" > <a name="1030">1030</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> <empty line> </td> </tr> <tr> <td class="h" > <a name="1031">1031</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> <empty line> </td> </tr> <tr> <td class="h" > <a name="1032">1032</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1033">1033</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Characteristics of I<List> mode: </td> </tr> <tr> <td class="h" > <a name="1034">1034</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1035">1035</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="1036">1036</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1037">1037</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="1038">1038</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1039">1039</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> two empty lines indicate the end of data. </td> </tr> <tr> <td class="h" > <a name="1040">1040</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1041">1041</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="1042">1042</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1043">1043</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> An empty field (column) may be omitted, or may have a label, but no </td> </tr> <tr> <td class="h" > <a name="1044">1044</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> data. </td> </tr> <tr> <td class="h" > <a name="1045">1045</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1046">1046</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="1047">1047</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1048">1048</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A long line can be continue by a null field (column): </td> </tr> <tr> <td class="h" > <a name="1049">1049</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1050">1050</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Field2: blah blah blah </td> </tr> <tr> <td class="h" > <a name="1051">1051</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> : blah blah blah </td> </tr> <tr> <td class="h" > <a name="1052">1052</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1053">1053</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="1054">1054</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1055">1055</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> On a continuation, the null field is an arbitrary number of leading </td> </tr> <tr> <td class="h" > <a name="1056">1056</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> white space, a colon ':', a single blank or tab, followed by the </td> </tr> <tr> <td class="h" > <a name="1057">1057</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> continued text. </td> </tr> <tr> <td class="h" > <a name="1058">1058</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1059">1059</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="1060">1060</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1061">1061</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Embedded newlines are indicated by the escape mechanism "\n". </td> </tr> <tr> <td class="h" > <a name="1062">1062</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Similarly, embedded tabs are indicated with "\t", returns with "\r". </td> </tr> <tr> <td class="h" > <a name="1063">1063</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1064">1064</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="1065">1065</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1066">1066</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If the I<@titles> array is empty, the field names "C<Field_>I<NN>" are used </td> </tr> <tr> <td class="h" > <a name="1067">1067</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> instead. </td> </tr> <tr> <td class="h" > <a name="1068">1068</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1069">1069</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="1070">1070</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1071">1071</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1072">1072</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1073">1073</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowListTable { </td> </tr> <tr> <td class="h" > <a name="1074">1074</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1074-1"> 37 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1074-1"> 0 </a> </td> <td > 535146 </td> <td class="s"> my @argv = @_; </td> </tr> <tr> <td class="h" > <a name="1075">1075</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 998 </td> <td class="s"> local ($titles, $types, $col_widths, $row_sub, $fmt_sub, $max_width, </td> </tr> <tr> <td class="h" > <a name="1076">1076</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $wrap_margin); </td> </tr> <tr> <td class="h" > <a name="1077">1077</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1804 </td> <td class="s"> my $args = </td> </tr> <tr> <td class="h" > <a name="1078">1078</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> get_params </td> </tr> <tr> <td class="h" > <a name="1079">1079</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> \@argv, </td> </tr> <tr> <td class="h" > <a name="1080">1080</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> { titles => \$titles, </td> </tr> <tr> <td class="h" > <a name="1081">1081</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> types => \$types, </td> </tr> <tr> <td class="h" > <a name="1082">1082</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> widths => \$col_widths, </td> </tr> <tr> <td class="h" > <a name="1083">1083</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> row_sub => \$row_sub, </td> </tr> <tr> <td class="h" > <a name="1084">1084</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> fmtsub => \$fmt_sub, </td> </tr> <tr> <td class="h" > <a name="1085">1085</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> max_width => \$max_width, </td> </tr> <tr> <td class="h" > <a name="1086">1086</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> wrap_margin => \$wrap_margin, </td> </tr> <tr> <td class="h" > <a name="1087">1087</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> }, </td> </tr> <tr> <td class="h" > <a name="1088">1088</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [qw(titles types widths row_sub fmt_sub max_width wrap_margin)]; </td> </tr> <tr> <td class="h" > <a name="1089">1089</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1090">1090</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1090-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1090-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 545 </td> <td class="s"> defined($titles) && $titles ne '' or croak "Missing column names array.\n"; </td> </tr> <tr> <td class="h" > <a name="1091">1091</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1091-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1091-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 956 </td> <td class="s"> defined($types) && $types ne '' or croak "Missing column types array.\n"; </td> </tr> <tr> <td class="h" > <a name="1092">1092</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1092-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1092-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 456 </td> <td class="s"> defined($col_widths) && $col_widths ne '' or croak "Missing column width array.\n"; </td> </tr> <tr> <td class="h" > <a name="1093">1093</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1093-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1093-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 302 </td> <td class="s"> defined($row_sub) && $row_sub ne '' or croak "Missing row sub array.\n"; </td> </tr> <tr> <td class="h" > <a name="1094">1094</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1095">1095</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1095-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1095-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 276 </td> <td class="s"> $fmt_sub = \&ShowTableValue if !defined($fmt_sub) || $fmt_sub eq ''; </td> </tr> <tr> <td class="h" > <a name="1096">1096</a> </td> <td class="c3" > 37 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1096-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1096-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 360 </td> <td class="s"> $max_width = $Max_List_Width if !defined($max_width) || $max_width eq ''; </td> </tr> <tr> <td class="h" > <a name="1097">1097</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1097-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1097-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 160 </td> <td class="s"> $wrap_margin = $List_Wrap_Margin if !defined($wrap_margin) || $wrap_margin eq ''; </td> </tr> <tr> <td class="h" > <a name="1098">1098</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1099">1099</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 266 </td> <td class="s"> my $rewindable = &$row_sub(1); # init the row pointer </td> </tr> <tr> <td class="h" > <a name="1100">1100</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1101">1101</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 472 </td> <td class="s"> my ($num_cols, $widths, $precision, $max_widths) = </td> </tr> <tr> <td class="h" > <a name="1102">1102</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &calc_widths($col_widths, $titles, $rewindable, </td> </tr> <tr> <td class="h" > <a name="1103">1103</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $row_sub, $fmt_sub, $types, 'list', ''); </td> </tr> <tr> <td class="h" > <a name="1104">1104</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1105">1105</a> </td> <td class="c3" > 37 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1105-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 281 </td> <td class="s"> my $fmt = sprintf("%%-%ds : %%s\n", ($#$titles >= 0 ? &max_length($titles) : 8)); </td> </tr> <tr> <td class="h" > <a name="1106">1106</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 63 </td> <td class="s"> my @values; </td> </tr> <tr> <td class="h" > <a name="1107">1107</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 49 </td> <td class="s"> my ($value, $c, $cut, $line); </td> </tr> <tr> <td class="h" > <a name="1108">1108</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 80 </td> <td class="s"> my $col_limit = $max_width - 2; </td> </tr> <tr> <td class="h" > <a name="1109">1109</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1110">1110</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 126 </td> <td class="s"> while ((@values = &$row_sub(0)), $#values >= $[) { </td> </tr> <tr> <td class="h" > <a name="1111">1111</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 638 </td> <td class="s"> for ($c = 0; $c <= $#values; $c++) { </td> </tr> <tr> <td class="h" > <a name="1112">1112</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # get this column's title </td> </tr> <tr> <td class="h" > <a name="1113">1113</a> </td> <td class="c3" > 850 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1113-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2341 </td> <td class="s"> $title = $#$titles >= 0 ? $titles->[$c] : sprintf("Field_%d", $c+1); </td> </tr> <tr> <td class="h" > <a name="1114">1114</a> </td> <td class="c3" > 850 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1336 </td> <td class="s"> my $type = $types->[$c]; </td> </tr> <tr> <td class="h" > <a name="1115">1115</a> </td> <td class="c3" > 850 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 991 </td> <td class="s"> my $width = 0; </td> </tr> <tr> <td class="h" > <a name="1116">1116</a> </td> <td class="c3" > 850 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1264 </td> <td class="s"> my $prec = $precision->[$c]; </td> </tr> <tr> <td class="h" > <a name="1117">1117</a> </td> <td class="c3" > 850 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2701 </td> <td class="s"> $value = &$fmt_sub($values[$c], $type, 0, $width, $prec, 'list'); </td> </tr> <tr> <td class="h" > <a name="1118">1118</a> </td> <td class="c3" > 850 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2101 </td> <td class="s"> while (length($value)) { </td> </tr> <tr> <td class="h" > <a name="1119">1119</a> </td> <td class="c3" > 871 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1119-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1791 </td> <td class="s"> if (length($value) > ($cut = $col_limit)) { </td> </tr> <tr> <td class="h" > <a name="1120">1120</a> </td> <td class="c3" > 21 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 65 </td> <td class="s"> $line = substr($value, 0, $cut); </td> </tr> <tr> <td class="h" > <a name="1121">1121</a> </td> <td class="c3" > 21 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1121-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1121-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 565 </td> <td class="s"> if ($line =~ m/([-,;? \t])([^-,;? \t]*)$/ && </td> </tr> <tr> <td class="h" > <a name="1122">1122</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> length($2) <= $wrap_margin) { </td> </tr> <tr> <td class="h" > <a name="1123">1123</a> </td> <td class="c3" > 21 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 50 </td> <td class="s"> $cut = $col_limit - length($2); </td> </tr> <tr> <td class="h" > <a name="1124">1124</a> </td> <td class="c3" > 21 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 47 </td> <td class="s"> $line = substr($value, 0, $cut); </td> </tr> <tr> <td class="h" > <a name="1125">1125</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1126">1126</a> </td> <td class="c3" > 21 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 198 </td> <td class="s"> ($value = substr($value, $cut)) =~ s/^\s+//; </td> </tr> <tr> <td class="h" > <a name="1127">1127</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="1128">1128</a> </td> <td class="c3" > 850 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1233 </td> <td class="s"> $line = $value; </td> </tr> <tr> <td class="h" > <a name="1129">1129</a> </td> <td class="c3" > 850 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1149 </td> <td class="s"> $value = ''; </td> </tr> <tr> <td class="h" > <a name="1130">1130</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1131">1131</a> </td> <td class="c3" > 871 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1913 </td> <td class="s"> out $fmt, $title, $line; </td> </tr> <tr> <td class="h" > <a name="1132">1132</a> </td> <td class="c3" > 871 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5230 </td> <td class="s"> $title = ''; </td> </tr> <tr> <td class="h" > <a name="1133">1133</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1134">1134</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1135">1135</a> </td> <td class="c3" > 185 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 491 </td> <td class="s"> out ""; </td> </tr> <tr> <td class="h" > <a name="1136">1136</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1137">1137</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1138">1138</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1139">1139</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowRow </td> </tr> <tr> <td class="h" > <a name="1140">1140</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1141">1141</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Fetch rows successively from one or more columns of data. </td> </tr> <tr> <td class="h" > <a name="1142">1142</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1143">1143</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<ShowRow> I<$rewindflag>, I<\$index>, I<$col_array_1> [, I<$col_array_2>, ...;] </td> </tr> <tr> <td class="h" > <a name="1144">1144</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1145">1145</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The B<ShowRow> subroutine returns a row of data from one or more </td> </tr> <tr> <td class="h" > <a name="1146">1146</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> columns of data. It is designed to be used as a I<callback> routine, </td> </tr> <tr> <td class="h" > <a name="1147">1147</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> within the B<ShowTable> routine. It can be used to select elements </td> </tr> <tr> <td class="h" > <a name="1148">1148</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> from one or more array reference arguments. </td> </tr> <tr> <td class="h" > <a name="1149">1149</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1150">1150</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If passed two or more array references as arguments, elements of the </td> </tr> <tr> <td class="h" > <a name="1151">1151</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> arrays selected by I<$index> are returned as the "row" of data. </td> </tr> <tr> <td class="h" > <a name="1152">1152</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1153">1153</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If a single array argument is passed, and each element of the array is </td> </tr> <tr> <td class="h" > <a name="1154">1154</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> itself an array, the subarray is returned as the "row" of data. </td> </tr> <tr> <td class="h" > <a name="1155">1155</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1156">1156</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If the I<$rewindflag> flag is set, then the I<$index> pointer is reset </td> </tr> <tr> <td class="h" > <a name="1157">1157</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> to zero, and "true" is returned (a scalar 1). This indicates that the </td> </tr> <tr> <td class="h" > <a name="1158">1158</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> data is rewindable to the B<ShowTable> routines. </td> </tr> <tr> <td class="h" > <a name="1159">1159</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1160">1160</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> When the I<$rewindflag> is not set, then the current row of data, as </td> </tr> <tr> <td class="h" > <a name="1161">1161</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> determined by I<$index> is returned, and I<$index> will </td> </tr> <tr> <td class="h" > <a name="1162">1162</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> have been incremented. </td> </tr> <tr> <td class="h" > <a name="1163">1163</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1164">1164</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> An actual invocation (from B<ShowColumns>) is: </td> </tr> <tr> <td class="h" > <a name="1165">1165</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1166">1166</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ShowTable \@titles, \@types, \@lengths, </td> </tr> <tr> <td class="h" > <a name="1167">1167</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub { &ShowRow( $_[0], \$current_row, $col_names, $col_types, </td> </tr> <tr> <td class="h" > <a name="1168">1168</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $col_lengths, \@col_attrs); }; </td> </tr> <tr> <td class="h" > <a name="1169">1169</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1170">1170</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> In the example above, after each invocation, the I<$current_row> argument </td> </tr> <tr> <td class="h" > <a name="1171">1171</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> will have been incremented. </td> </tr> <tr> <td class="h" > <a name="1172">1172</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1173">1173</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1174">1174</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1175">1175</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowRow { </td> </tr> <tr> <td class="h" > <a name="1176">1176</a> </td> <td class="c3" > 2044 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1176-1"> 2044 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1176-1"> 0 </a> </td> <td > 11840 </td> <td class="s"> my $rewind_flag = shift; </td> </tr> <tr> <td class="h" > <a name="1177">1177</a> </td> <td class="c3" > 2044 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3102 </td> <td class="s"> my $index_ref = shift; # an indirect index </td> </tr> <tr> <td class="h" > <a name="1178">1178</a> </td> <td class="c3" > 2044 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 6928 </td> <td class="s"> my @columns = @_; # get rest of columns </td> </tr> <tr> <td class="h" > <a name="1179">1179</a> </td> <td class="c3" > 2044 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3171 </td> <td class="s"> my @row; # we're selecting a row </td> </tr> <tr> <td class="h" > <a name="1180">1180</a> </td> <td class="c3" > 2044 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1180-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5537 </td> <td class="s"> if ($rewind_flag) { </td> </tr> <tr> <td class="h" > <a name="1181">1181</a> </td> <td class="c3" > 292 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 556 </td> <td class="s"> $$index_ref = 0; # reset the pointer </td> </tr> <tr> <td class="h" > <a name="1182">1182</a> </td> <td class="c3" > 292 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1184 </td> <td class="s"> return 1; </td> </tr> <tr> <td class="h" > <a name="1183">1183</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1184">1184</a> </td> <td class="c3" > 1752 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1184-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5058 </td> <td class="s"> return () if $#{$columns[0]} < $$index_ref; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 1752 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 9244 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1185">1185</a> </td> <td class="c3" > 1460 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1185-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3643 </td> <td class="s"> if ($#columns == 0) { # exactly one array ref argument </td> </tr> <tr> <td class="h" > <a name="1186">1186</a> </td> <td class="c3" > 1460 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3162 </td> <td class="s"> my $data = $columns[0]->[$$index_ref]; # get the current data </td> </tr> <tr> <td class="h" > <a name="1187">1187</a> </td> <td class="c3" > 1460 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1187-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5383 </td> <td class="s"> if (ref($data) eq 'ARRAY') { # if an array.. </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#-2"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1188">1188</a> </td> <td class="c3" > 1460 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 7962 </td> <td class="s"> @row = @$data; # ..return the array of data </td> </tr> <tr> <td class="h" > <a name="1189">1189</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } elsif (ref($data) eq 'HASH') {# if a hash.. </td> </tr> <tr> <td class="h" > <a name="1190">1190</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> @row = values %$data; # ..return the values </td> </tr> <tr> <td class="h" > <a name="1191">1191</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { # otherwise.. </td> </tr> <tr> <td class="h" > <a name="1192">1192</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> @row = ($data); # ..return the data element </td> </tr> <tr> <td class="h" > <a name="1193">1193</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1194">1194</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { # with two or more array refs.. </td> </tr> <tr> <td class="h" > <a name="1195">1195</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my $col; # select elements from each </td> </tr> <tr> <td class="h" > <a name="1196">1196</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> for ($col = 0; $col <= $#columns; $col++) { </td> </tr> <tr> <td class="h" > <a name="1197">1197</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> push(@row, ${$columns[$col]}[$$index_ref]); </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1198">1198</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1199">1199</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1200">1200</a> </td> <td class="c3" > 1460 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2707 </td> <td class="s"> ${$index_ref}++; # increment the index for the next call </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 1460 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2644 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1201">1201</a> </td> <td class="c3" > 1460 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 27593 </td> <td class="s"> @row; # return this row of data </td> </tr> <tr> <td class="h" > <a name="1202">1202</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1203">1203</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1204">1204</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 ShowTableValue </td> </tr> <tr> <td class="h" > <a name="1205">1205</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1206">1206</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Prepare and return a formatted representation of a value. A value </td> </tr> <tr> <td class="h" > <a name="1207">1207</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> argument, using its corresponding type, effective width, and precision </td> </tr> <tr> <td class="h" > <a name="1208">1208</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is formatted into a field of a given maximum width. </td> </tr> <tr> <td class="h" > <a name="1209">1209</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1210">1210</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$fmt> = B<ShowTableValue> I<$value>, I<$type>, I<$max_width>, I<$width>, I<$precision>, I<$showmode>; </td> </tr> <tr> <td class="h" > <a name="1211">1211</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1212">1212</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="1213">1213</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1214">1214</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<width> => I<$width> </td> </tr> <tr> <td class="h" > <a name="1215">1215</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1216">1216</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$width> </td> </tr> <tr> <td class="h" > <a name="1217">1217</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1218">1218</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The width of the current value. If omittied, I<$max_width> is assumed. </td> </tr> <tr> <td class="h" > <a name="1219">1219</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1220">1220</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<precision> => I<$precision> </td> </tr> <tr> <td class="h" > <a name="1221">1221</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1222">1222</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$precision> </td> </tr> <tr> <td class="h" > <a name="1223">1223</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1224">1224</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The number of decimal digits; zero is assumed if omittied. </td> </tr> <tr> <td class="h" > <a name="1225">1225</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1226">1226</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<value> => I<$value> </td> </tr> <tr> <td class="h" > <a name="1227">1227</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1228">1228</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$value> </td> </tr> <tr> <td class="h" > <a name="1229">1229</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1230">1230</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The value to be formatted. </td> </tr> <tr> <td class="h" > <a name="1231">1231</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1232">1232</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$type> </td> </tr> <tr> <td class="h" > <a name="1233">1233</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1234">1234</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The type name of the value; eg: C<char>, C<varchar>, C<int>, etc. </td> </tr> <tr> <td class="h" > <a name="1235">1235</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1236">1236</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item C<maxwidth> => I<$max_width> </td> </tr> <tr> <td class="h" > <a name="1237">1237</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1238">1238</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$max_width> </td> </tr> <tr> <td class="h" > <a name="1239">1239</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1240">1240</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The maximum width of any value in the current value's column. If I<$width> </td> </tr> <tr> <td class="h" > <a name="1241">1241</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is zero or null, I<$max_width> is used by default. I<$max_width> is also </td> </tr> <tr> <td class="h" > <a name="1242">1242</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> used as a I<minimum> width, in case I<$width> is a smaller value. </td> </tr> <tr> <td class="h" > <a name="1243">1243</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1244">1244</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$width> </td> </tr> <tr> <td class="h" > <a name="1245">1245</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1246">1246</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The default width of the value, obtained from the width specification of the </td> </tr> <tr> <td class="h" > <a name="1247">1247</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> column in which this value occurs. </td> </tr> <tr> <td class="h" > <a name="1248">1248</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1249">1249</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$precision> </td> </tr> <tr> <td class="h" > <a name="1250">1250</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1251">1251</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The precision specification, if any, from the column width specification. </td> </tr> <tr> <td class="h" > <a name="1252">1252</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1253">1253</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$showmode> </td> </tr> <tr> <td class="h" > <a name="1254">1254</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1255">1255</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The mode of the output: one of "table", "list", "box", or "html". Currently, </td> </tr> <tr> <td class="h" > <a name="1256">1256</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> only the "html" mode is significant: it is used to avoid using HTML tokens </td> </tr> <tr> <td class="h" > <a name="1257">1257</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> as part of the formatted text and length calculations. </td> </tr> <tr> <td class="h" > <a name="1258">1258</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1259">1259</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="1260">1260</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1261">1261</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1262">1262</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1263">1263</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub ShowTableValue { </td> </tr> <tr> <td class="h" > <a name="1264">1264</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1264-1"> 6760 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1264-1"> 0 </a> </td> <td > 14686 </td> <td class="s"> my $value = shift; </td> </tr> <tr> <td class="h" > <a name="1265">1265</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 10076 </td> <td class="s"> my $type = shift; </td> </tr> <tr> <td class="h" > <a name="1266">1266</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 9823 </td> <td class="s"> my $max_width = shift; </td> </tr> <tr> <td class="h" > <a name="1267">1267</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 11081 </td> <td class="s"> my $width = shift; </td> </tr> <tr> <td class="h" > <a name="1268">1268</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1268-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 38009 </td> <td class="s"> my $prec = shift || 2; </td> </tr> <tr> <td class="h" > <a name="1269">1269</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 12684 </td> <td class="s"> my $showmode = shift; </td> </tr> <tr> <td class="h" > <a name="1270">1270</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1270-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 27015 </td> <td class="s"> my $fmt = ($Type2Format{lc($type)} || $Type2Format{'char'}); </td> </tr> <tr> <td class="h" > <a name="1271">1271</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 8964 </td> <td class="s"> my $str; </td> </tr> <tr> <td class="h" > <a name="1272">1272</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1273">1273</a> </td> <td class="c3" > 6760 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1273-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1273-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 37870 </td> <td class="s"> $max_width = 0 if !defined($max_width) || $max_width eq ''; </td> </tr> <tr> <td class="h" > <a name="1274">1274</a> </td> <td class="c3" > 6760 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1274-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1274-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 43510 </td> <td class="s"> $width = $max_width if !defined($width) || $width eq ''; </td> </tr> <tr> <td class="h" > <a name="1275">1275</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1276">1276</a> </td> <td class="c3" > 6760 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1276-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 17870 </td> <td class="s"> $width = min($width, $max_width) if $max_width > 0; </td> </tr> <tr> <td class="h" > <a name="1277">1277</a> </td> <td class="c3" > 6760 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1277-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 15963 </td> <td class="s"> if ($type =~ /money/i) { # money formatting is special </td> </tr> <tr> <td class="h" > <a name="1278">1278</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1278-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> if (($str = $value) !~ /[\$,]/) { # not already formatted? </td> </tr> <tr> <td class="h" > <a name="1279">1279</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my ($d,$c) = split(/\./,$value,2); </td> </tr> <tr> <td class="h" > <a name="1280">1280</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # reverse the digits </td> </tr> <tr> <td class="h" > <a name="1281">1281</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $d = join('',reverse(split(//,abs($d)))); </td> </tr> <tr> <td class="h" > <a name="1282">1282</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # do the grouping from the rightmost to the left </td> </tr> <tr> <td class="h" > <a name="1283">1283</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $d =~ s/(...)(?=.)/$1,/g; </td> </tr> <tr> <td class="h" > <a name="1284">1284</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # reverse the digits and grouping char </td> </tr> <tr> <td class="h" > <a name="1285">1285</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $d = '$'.join('',reverse(split(//,$d))); </td> </tr> <tr> <td class="h" > <a name="1286">1286</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If there is any precision, add on pennies (allow for > 2 precision) </td> </tr> <tr> <td class="h" > <a name="1287">1287</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1287-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $d .= sprintf($prec > 2 ? "%0${prec}d" : ".%02d",$c) if $prec > 0; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#-2"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1288">1288</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Mark as negative with '(xxx)' </td> </tr> <tr> <td class="h" > <a name="1289">1289</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1289-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $d = '-'.$d if $value < 0; </td> </tr> <tr> <td class="h" > <a name="1290">1290</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $str = $d; </td> </tr> <tr> <td class="h" > <a name="1291">1291</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1292">1292</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="1293">1293</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 20196 </td> <td class="s"> $fmt = sprintf ($fmt,$width,$prec); </td> </tr> <tr> <td class="h" > <a name="1294">1294</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1295">1295</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If we are in HTML mode, and the value has any HTML tokens, </td> </tr> <tr> <td class="h" > <a name="1296">1296</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # then format it always as a string (even if it might </td> </tr> <tr> <td class="h" > <a name="1297">1297</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # be a decimal--this is a kluge but seems to work). </td> </tr> <tr> <td class="h" > <a name="1298">1298</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1299">1299</a> </td> <td class="c3" > 6760 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1299-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1299-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 45840 </td> <td class="s"> if ($showmode =~ /html/i && $value =~ /<\/?($HTML_Elements)/) { </td> </tr> <tr> <td class="h" > <a name="1300">1300</a> </td> <td class="c3" > 80 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 168 </td> <td class="s"> $fmt =~ s/[df]/s/; # convert to string sub </td> </tr> <tr> <td class="h" > <a name="1301">1301</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1302">1302</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 18896 </td> <td class="s"> $str = sprintf($fmt,$value); </td> </tr> <tr> <td class="h" > <a name="1303">1303</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1304">1304</a> </td> <td class="c3" > 6760 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1304-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 15122 </td> <td class="s"> if ($width > length(&PlainText($str))) { </td> </tr> <tr> <td class="h" > <a name="1305">1305</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # right align the value if any kind of number </td> </tr> <tr> <td class="h" > <a name="1306">1306</a> </td> <td class="c3" > 40 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1306-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 156 </td> <td class="s"> $str = sprintf("%${width}s", $str) </td> </tr> <tr> <td class="h" > <a name="1307">1307</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> if $type =~ /int|float|pct|real|numeric|money/i; </td> </tr> <tr> <td class="h" > <a name="1308">1308</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1309">1309</a> </td> <td class="c3" > 6760 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 27322 </td> <td class="s"> $str; </td> </tr> <tr> <td class="h" > <a name="1310">1310</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1311">1311</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1312">1312</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> %Type2Format = ( </td> </tr> <tr> <td class="h" > <a name="1313">1313</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'char' => '%%-%ds', </td> </tr> <tr> <td class="h" > <a name="1314">1314</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'varchar' => '%%-%ds', </td> </tr> <tr> <td class="h" > <a name="1315">1315</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'symbol' => '%%-%ds', </td> </tr> <tr> <td class="h" > <a name="1316">1316</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'tinyint' => '%%%dd', </td> </tr> <tr> <td class="h" > <a name="1317">1317</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'shortint' => '%%%dd', </td> </tr> <tr> <td class="h" > <a name="1318">1318</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'int' => '%%%dd', </td> </tr> <tr> <td class="h" > <a name="1319">1319</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'pct' => '%%%d.%df%%%%', </td> </tr> <tr> <td class="h" > <a name="1320">1320</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'real' => '%%%d.%df', </td> </tr> <tr> <td class="h" > <a name="1321">1321</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'float' => '%%%d.%df', </td> </tr> <tr> <td class="h" > <a name="1322">1322</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'numeric' => '%%%d.%df', </td> </tr> <tr> <td class="h" > <a name="1323">1323</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'text' => '%%-%ds', </td> </tr> <tr> <td class="h" > <a name="1324">1324</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1325">1325</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # The money types do not actually need to be in this table, since </td> </tr> <tr> <td class="h" > <a name="1326">1326</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # ShowTableValue handle money formatting explicitly. However, some </td> </tr> <tr> <td class="h" > <a name="1327">1327</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # one else might use this table, so we treat them like right-aligned </td> </tr> <tr> <td class="h" > <a name="1328">1328</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # strings. </td> </tr> <tr> <td class="h" > <a name="1329">1329</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'money' => '%%%d.%df', </td> </tr> <tr> <td class="h" > <a name="1330">1330</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 'smallmoney' => '%%%d.%df', </td> </tr> <tr> <td class="h" > <a name="1331">1331</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1332">1332</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="1333">1333</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1334">1334</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 PlainText </td> </tr> <tr> <td class="h" > <a name="1335">1335</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1336">1336</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$plaintext> = B<&PlainText>(I<$htmltext>); </td> </tr> <tr> <td class="h" > <a name="1337">1337</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1338">1338</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<&PlainText> </td> </tr> <tr> <td class="h" > <a name="1339">1339</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1340">1340</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> This function removes any HTML formatting sequences from the input argument, </td> </tr> <tr> <td class="h" > <a name="1341">1341</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> or from C<$_> if no argument is given. The resulting plain text is returned </td> </tr> <tr> <td class="h" > <a name="1342">1342</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> as the result. </td> </tr> <tr> <td class="h" > <a name="1343">1343</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1344">1344</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1345">1345</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1346">1346</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # $plaintext = &PlainText($htmltext); </td> </tr> <tr> <td class="h" > <a name="1347">1347</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # or: </td> </tr> <tr> <td class="h" > <a name="1348">1348</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # &PlainText; </td> </tr> <tr> <td class="h" > <a name="1349">1349</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1350">1350</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Convert the argument and return as a string, or convert $_. </td> </tr> <tr> <td class="h" > <a name="1351">1351</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1352">1352</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub PlainText { </td> </tr> <tr> <td class="h" > <a name="1353">1353</a> </td> <td class="c3" > 8153 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1353-1"> 50 </a> </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1353-1"> 8153 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1353-1"> 0 </a> </td> <td > 37391 </td> <td class="s"> local($_) = shift if $#_ >= 0; # set local $_ if there's an argument </td> </tr> <tr> <td class="h" > <a name="1354">1354</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # skip unless there's a sequence </td> </tr> <tr> <td class="h" > <a name="1355">1355</a> </td> <td class="c3" > 8153 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1355-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 81592 </td> <td class="s"> return $_ unless m=</?($HTML_Elements)=i; # HTML text? </td> </tr> <tr> <td class="h" > <a name="1356">1356</a> </td> <td class="c3" > 80 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1676 </td> <td class="s"> s{</?(?:$HTML_Elements)# # match and remove any HTML token.. </td> </tr> <tr> <td class="h" > <a name="1357">1357</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> (?:\ \w+# # ..then PARAM or PARAM=VALUE </td> </tr> <tr> <td class="h" > <a name="1358">1358</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> (?:\=(?:"(?:[^"]|\\")*"|# # ...."STRING" or.. </td> </tr> <tr> <td class="h" > <a name="1359">1359</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [^"> ]+# # ....VALUE </td> </tr> <tr> <td class="h" > <a name="1360">1360</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> )# </td> </tr> <tr> <td class="h" > <a name="1361">1361</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> )?# # ..=VALUE is optional </td> </tr> <tr> <td class="h" > <a name="1362">1362</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> )*# # zero or more PARAM or PARAM=VALUE </td> </tr> <tr> <td class="h" > <a name="1363">1363</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> >}{}igx; # up to the closing '>' </td> </tr> <tr> <td class="h" > <a name="1364">1364</a> </td> <td class="c3" > 80 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 431 </td> <td class="s"> $_; # return the result </td> </tr> <tr> <td class="h" > <a name="1365">1365</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1366">1366</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1367">1367</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> BEGIN { </td> </tr> <tr> <td class="h" > <a name="1368">1368</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1369">1369</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1369-1"> 22 </a> </td> <td > &nbsp; </td> <td > 432 </td> <td class="s"> @HTML_Elements = qw( </td> </tr> <tr> <td class="h" > <a name="1370">1370</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A ABBREV ACRONYM ADDRESS APP APPLET AREA AU B BANNER BASE BASEFONT BDO </td> </tr> <tr> <td class="h" > <a name="1371">1371</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> BGSOUND BIG BLINK BLOCKQUOTE BODY BQ BR CAPTION CENTER CITE CODE COL </td> </tr> <tr> <td class="h" > <a name="1372">1372</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> COLGROUP CREDIT DD DEL DFN DIR DIV DL DT EM EMBED FN FIG FONT FORM FRAME </td> </tr> <tr> <td class="h" > <a name="1373">1373</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> FRAMESET H1 H2 H3 H4 H5 H6 HEAD HP HR HTML I IMG INPUT INS ISINDEX KBD </td> </tr> <tr> <td class="h" > <a name="1374">1374</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> LANG LH LI LINK LISTING MAP MARQUEE MENU META NEXTID NOBR NOEMBED </td> </tr> <tr> <td class="h" > <a name="1375">1375</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> NOFRAMES NOTE OL OPTION OVERLAY P PARAM PERSON PLAINTEXT PRE Q S SAMP </td> </tr> <tr> <td class="h" > <a name="1376">1376</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> SELECT SMALL SPAN STRIKE STRONG SUB SUP TAB TABLE TBODY TD TEXTAREA </td> </tr> <tr> <td class="h" > <a name="1377">1377</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> TFOOT TH THEAD TITLE TR TT U UL VAR WBR XMP </td> </tr> <tr> <td class="h" > <a name="1378">1378</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="1379">1379</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1380">1380</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 12665 </td> <td class="s"> $HTML_Elements = join("|",@HTML_Elements); </td> </tr> <tr> <td class="h" > <a name="1381">1381</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1382">1382</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1383">1383</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1384">1384</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 VARIABLES </td> </tr> <tr> <td class="h" > <a name="1385">1385</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1386">1386</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The following variables may be set by the user to affect the display (with </td> </tr> <tr> <td class="h" > <a name="1387">1387</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the defaults enclosed in square brackets [..]): </td> </tr> <tr> <td class="h" > <a name="1388">1388</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1389">1389</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="1390">1390</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1391">1391</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item B<$Show_Mode> [Box] </td> </tr> <tr> <td class="h" > <a name="1392">1392</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1393">1393</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> This is the default display mode when using B<ShowTable>. The </td> </tr> <tr> <td class="h" > <a name="1394">1394</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> environment variable, C<$ENV{'SHOW_MODE'}>, is used when this variable is </td> </tr> <tr> <td class="h" > <a name="1395">1395</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> null or the empty string. The possible values for this variable are: </td> </tr> <tr> <td class="h" > <a name="1396">1396</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> C<"Box">, C<"List">, C<"Table">, and C<"HTML">. Case is insignificant. </td> </tr> <tr> <td class="h" > <a name="1397">1397</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1398">1398</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item B<$List_Wrap_Margin> [2] </td> </tr> <tr> <td class="h" > <a name="1399">1399</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1400">1400</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> This variable's value determines how large a margin to keep before wrarpping a </td> </tr> <tr> <td class="h" > <a name="1401">1401</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> long value's display in a column. This value is only used in "List" mode. </td> </tr> <tr> <td class="h" > <a name="1402">1402</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1403">1403</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item B<$Max_List_Width> [80] </td> </tr> <tr> <td class="h" > <a name="1404">1404</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1405">1405</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> This variable, used in "List" mode, is used to determine how long an output line </td> </tr> <tr> <td class="h" > <a name="1406">1406</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> may be before wrapping it. The environment variable, C<$ENV{'COLUMNS'}>, is </td> </tr> <tr> <td class="h" > <a name="1407">1407</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> used to define this value when it is null. </td> </tr> <tr> <td class="h" > <a name="1408">1408</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1409">1409</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item B<$Max_Table_Width> [''] </td> </tr> <tr> <td class="h" > <a name="1410">1410</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1411">1411</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> This variable, when set, causes all tables to have their columns scaled </td> </tr> <tr> <td class="h" > <a name="1412">1412</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> such that their total combined width does not exceed this value. When </td> </tr> <tr> <td class="h" > <a name="1413">1413</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> this variable is not set, which is the default case, there is no maximum </td> </tr> <tr> <td class="h" > <a name="1414">1414</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> table width, and no scaling will be done. </td> </tr> <tr> <td class="h" > <a name="1415">1415</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1416">1416</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item B<$No_Escape> [''] </td> </tr> <tr> <td class="h" > <a name="1417">1417</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1418">1418</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If set, allows embedded HTML text to be included in the data displayed </td> </tr> <tr> <td class="h" > <a name="1419">1419</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> in an HTML-formatted table. By default, the HTML formatting characters </td> </tr> <tr> <td class="h" > <a name="1420">1420</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ("<", ">", and "&") occuring in values are escaped. </td> </tr> <tr> <td class="h" > <a name="1421">1421</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1422">1422</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item B<%URL_Keys> </td> </tr> <tr> <td class="h" > <a name="1423">1423</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1424">1424</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> In HTML mode, this variable is used to recognize which columns are to be </td> </tr> <tr> <td class="h" > <a name="1425">1425</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> displayed with a corresponding hypertext anchor. See L<"ShowHTMLTable"> </td> </tr> <tr> <td class="h" > <a name="1426">1426</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> for more details. </td> </tr> <tr> <td class="h" > <a name="1427">1427</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1428">1428</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item B<@HTML_Elements> </td> </tr> <tr> <td class="h" > <a name="1429">1429</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1430">1430</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> An array of HTML elements (as of HTML 3.0) used to recognize and strip for </td> </tr> <tr> <td class="h" > <a name="1431">1431</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> width calculations. </td> </tr> <tr> <td class="h" > <a name="1432">1432</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1433">1433</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item B<$HTML_Elements> </td> </tr> <tr> <td class="h" > <a name="1434">1434</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1435">1435</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A regular expression string formed from the elements of B<@HTML_Elements>. </td> </tr> <tr> <td class="h" > <a name="1436">1436</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1437">1437</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="1438">1438</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1439">1439</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1440">1440</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1441">1441</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="1442">1442</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1443">1443</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 INTERNAL SUBROUTINES </td> </tr> <tr> <td class="h" > <a name="1444">1444</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1445">1445</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 get_params </td> </tr> <tr> <td class="h" > <a name="1446">1446</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1447">1447</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >my I<$args> = B<&get_params> I<\@argv>, I<\%params>, I<\@arglist>; </td> </tr> <tr> <td class="h" > <a name="1448">1448</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1449">1449</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Given the I<@argv> originally passed to the calling sub, and the hash of </td> </tr> <tr> <td class="h" > <a name="1450">1450</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> named parameters as I<%params>, and the array of parameter names in the </td> </tr> <tr> <td class="h" > <a name="1451">1451</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> order expected for a pass-by-value invocation, set the values of each of </td> </tr> <tr> <td class="h" > <a name="1452">1452</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the variables named in I<@vars>. </td> </tr> <tr> <td class="h" > <a name="1453">1453</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1454">1454</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If the only element of the I<@argv> is a hash array, then set the </td> </tr> <tr> <td class="h" > <a name="1455">1455</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> variables to the values of their corresponding parameters used as keys </td> </tr> <tr> <td class="h" > <a name="1456">1456</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> to the hash array. If the parameter is not a key of the I<%params> </td> </tr> <tr> <td class="h" > <a name="1457">1457</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> hash, and is not a key in the global hash B<%ShowTableParams>, then an </td> </tr> <tr> <td class="h" > <a name="1458">1458</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> error is noted. </td> </tr> <tr> <td class="h" > <a name="1459">1459</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1460">1460</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> When I<@argv> has multiple elements, or is not a hash array, set each </td> </tr> <tr> <td class="h" > <a name="1461">1461</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> variable, in the order given within I<@arglist>, to the values from the </td> </tr> <tr> <td class="h" > <a name="1462">1462</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> I<@argv>, setting the variables named by each value in I<%params>. </td> </tr> <tr> <td class="h" > <a name="1463">1463</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1464">1464</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Variables may given either by name or by reference. </td> </tr> <tr> <td class="h" > <a name="1465">1465</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1466">1466</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The result is a HASH array reference, either corresponding directly to </td> </tr> <tr> <td class="h" > <a name="1467">1467</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the HASH array passed as the single argument, or one created by </td> </tr> <tr> <td class="h" > <a name="1468">1468</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> associating the resulting variable values to the parameter names </td> </tr> <tr> <td class="h" > <a name="1469">1469</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> associated with the variable names. </td> </tr> <tr> <td class="h" > <a name="1470">1470</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1471">1471</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1472">1472</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1473">1473</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub get_params { </td> </tr> <tr> <td class="h" > <a name="1474">1474</a> </td> <td class="c3" > 160 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1474-1"> 50 </a> </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1474-1"> 160 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1474-1"> 0 </a> </td> <td > 1468 </td> <td class="s"> my $argvref = shift or croak "Missing required argument.\n"; </td> </tr> <tr> <td class="h" > <a name="1475">1475</a> </td> <td class="c3" > 160 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1475-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 814 </td> <td class="s"> my $params = shift or croak "Missing required parameters hash.\n"; </td> </tr> <tr> <td class="h" > <a name="1476">1476</a> </td> <td class="c3" > 160 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1476-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1546 </td> <td class="s"> my $arglist = shift or croak "Missing required arglist array.\n"; </td> </tr> <tr> <td class="h" > <a name="1477">1477</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 458 </td> <td class="s"> my %args; </td> </tr> <tr> <td class="h" > <a name="1478">1478</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 307 </td> <td class="s"> my ($param, $var); </td> </tr> <tr> <td class="h" > <a name="1479">1479</a> </td> <td class="c3" > 160 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1479-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1479-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2979 </td> <td class="s"> if ($#$argvref == 0 && ref($argvref->[0]) eq 'HASH') { </td> </tr> <tr> <td class="h" > <a name="1480">1480</a> </td> <td class="c3" > 143 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 458 </td> <td class="s"> my $href = $argvref->[0]; </td> </tr> <tr> <td class="h" > <a name="1481">1481</a> </td> <td class="c3" > 143 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1702 </td> <td class="s"> %args = %$href; # initialize result with input hash </td> </tr> <tr> <td class="h" > <a name="1482">1482</a> </td> <td class="c3" > 143 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1062 </td> <td class="s"> foreach $param (keys %$href) { # for each named argument... </td> </tr> <tr> <td class="h" > <a name="1483">1483</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Is this a known parameter? </td> </tr> <tr> <td class="h" > <a name="1484">1484</a> </td> <td class="c3" > 674 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1484-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2309 </td> <td class="s"> if (exists($params->{$param})) { </td> </tr> <tr> <td class="h" > <a name="1485">1485</a> </td> <td class="c3" > 663 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1183 </td> <td class="s"> $var = $params->{$param}; </td> </tr> <tr> <td class="h" > <a name="1486">1486</a> </td> <td class="c3" > 663 </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1486-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 6491 </td> <td class="s"> while ($var ne '' && ref($var) eq '') { # indirect refs? </td> </tr> <tr> <td class="h" > <a name="1487">1487</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $var = $params->{$param = $var}; </td> </tr> <tr> <td class="h" > <a name="1488">1488</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1489">1489</a> </td> <td class="c3" > 663 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1489-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1901 </td> <td class="s"> if ($var ne '') { </td> </tr> <tr> <td class="h" > <a name="1490">1490</a> </td> <td class="c3" > 663 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1378 </td> <td class="s"> $$var = $href->{$param}; # assign the param's variable </td> </tr> <tr> <td class="h" > <a name="1491">1491</a> </td> <td class="c3" > 663 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1673 </td> <td class="s"> $args{$param} = $$var; # make sure canonical param gets defined </td> </tr> <tr> <td class="h" > <a name="1492">1492</a> </td> <td class="c3" > 663 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2401 </td> <td class="s"> next; # go to the next parameter </td> </tr> <tr> <td class="h" > <a name="1493">1493</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1494">1494</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1495">1495</a> </td> <td class="c3" > 11 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1495-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 127 </td> <td class="s"> if (!exists($show_table_params{$param})) { </td> </tr> <tr> <td class="h" > <a name="1496">1496</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> croak "Unknown parameter: \"$param\"\n"; </td> </tr> <tr> <td class="h" > <a name="1497">1497</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1498">1498</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1499">1499</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { # use args in the order given for variables </td> </tr> <tr> <td class="h" > <a name="1500">1500</a> </td> <td class="c3" > 17 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 35 </td> <td class="s"> my $i; </td> </tr> <tr> <td class="h" > <a name="1501">1501</a> </td> <td class="c3" > 17 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 80 </td> <td class="s"> for ($i = 0; $i <= $#$arglist; $i++) { </td> </tr> <tr> <td class="h" > <a name="1502">1502</a> </td> <td class="c3" > 131 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 212 </td> <td class="s"> $param = $arglist->[$i]; # get the next argument </td> </tr> <tr> <td class="h" > <a name="1503">1503</a> </td> <td class="c3" > 131 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 655 </td> <td class="s"> $var = $params->{$param}; # get it's variable </td> </tr> <tr> <td class="h" > <a name="1504">1504</a> </td> <td class="c3" > 131 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1504-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 392 </td> <td class="s"> next unless defined($var); </td> </tr> <tr> <td class="h" > <a name="1505">1505</a> </td> <td class="c3" > 127 </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1505-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 911 </td> <td class="s"> while ($var ne '' && ref($var) eq '') { </td> </tr> <tr> <td class="h" > <a name="1506">1506</a> </td> <td class="c3" > 10 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 59 </td> <td class="s"> $var = $params->{$param = $var}; </td> </tr> <tr> <td class="h" > <a name="1507">1507</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1508">1508</a> </td> <td class="c3" > 127 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1508-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1050 </td> <td class="s"> if ($var ne '') { </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#-2"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1509">1509</a> </td> <td class="c3" > 127 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1509-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 386 </td> <td class="s"> $$var = $i <= $#$argvref ? $argvref->[$i] : ''; </td> </tr> <tr> <td class="h" > <a name="1510">1510</a> </td> <td class="c3" > 127 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 481 </td> <td class="s"> $args{$param} = $$var; # assign to the hash </td> </tr> <tr> <td class="h" > <a name="1511">1511</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } elsif (!exists($show_table_params{$param})) { </td> </tr> <tr> <td class="h" > <a name="1512">1512</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> croak "Unknown parameter: \"$param\" for argument $i.\n"; </td> </tr> <tr> <td class="h" > <a name="1513">1513</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1514">1514</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1515">1515</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1516">1516</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Now, make sure all variables get initialized </td> </tr> <tr> <td class="h" > <a name="1517">1517</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1476 </td> <td class="s"> foreach $param (keys %$params) { </td> </tr> <tr> <td class="h" > <a name="1518">1518</a> </td> <td class="c3" > 1340 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3622 </td> <td class="s"> $var = $params->{$param}; </td> </tr> <tr> <td class="h" > <a name="1519">1519</a> </td> <td class="c3" > 1340 </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1519-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 9986 </td> <td class="s"> while ($var ne '' && ref($var) eq '') { </td> </tr> <tr> <td class="h" > <a name="1520">1520</a> </td> <td class="c3" > 98 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 585 </td> <td class="s"> $var = $params->{$param = $var}; </td> </tr> <tr> <td class="h" > <a name="1521">1521</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1522">1522</a> </td> <td class="c3" > 1340 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1522-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1522-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 7930 </td> <td class="s"> if ($var ne '' && !exists($args{$param})) { </td> </tr> <tr> <td class="h" > <a name="1523">1523</a> </td> <td class="c3" > 457 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1242 </td> <td class="s"> $$var = $args{$param} = undef; </td> </tr> <tr> <td class="h" > <a name="1524">1524</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1525">1525</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1526">1526</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1231 </td> <td class="s"> \%args; # return the HASH ref </td> </tr> <tr> <td class="h" > <a name="1527">1527</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1528">1528</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1529">1529</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> BEGIN { </td> </tr> <tr> <td class="h" > <a name="1530">1530</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1531">1531</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # A table of parameters used by all the external subroutines For </td> </tr> <tr> <td class="h" > <a name="1532">1532</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # example, in order for parameters applicable to ShowHTMLTable to be </td> </tr> <tr> <td class="h" > <a name="1533">1533</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # passed through ShowTable, they need to be defined in this table. </td> </tr> <tr> <td class="h" > <a name="1534">1534</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1535">1535</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1535-1"> 22 </a> </td> <td > &nbsp; </td> <td > 125 </td> <td class="s"> @show_table_params = qw( </td> </tr> <tr> <td class="h" > <a name="1536">1536</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> caption </td> </tr> <tr> <td class="h" > <a name="1537">1537</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> col_attributes </td> </tr> <tr> <td class="h" > <a name="1538">1538</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> col_lengths </td> </tr> <tr> <td class="h" > <a name="1539">1539</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> col_names </td> </tr> <tr> <td class="h" > <a name="1540">1540</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> col_types </td> </tr> <tr> <td class="h" > <a name="1541">1541</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> data </td> </tr> <tr> <td class="h" > <a name="1542">1542</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> data_formats </td> </tr> <tr> <td class="h" > <a name="1543">1543</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> dformats </td> </tr> <tr> <td class="h" > <a name="1544">1544</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> fmt_sub </td> </tr> <tr> <td class="h" > <a name="1545">1545</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> fmtsub </td> </tr> <tr> <td class="h" > <a name="1546">1546</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> max_width </td> </tr> <tr> <td class="h" > <a name="1547">1547</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> no_escape </td> </tr> <tr> <td class="h" > <a name="1548">1548</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> row_sub </td> </tr> <tr> <td class="h" > <a name="1549">1549</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> show_mode </td> </tr> <tr> <td class="h" > <a name="1550">1550</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> table_attrs </td> </tr> <tr> <td class="h" > <a name="1551">1551</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> tformats </td> </tr> <tr> <td class="h" > <a name="1552">1552</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> title_formats </td> </tr> <tr> <td class="h" > <a name="1553">1553</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> titles </td> </tr> <tr> <td class="h" > <a name="1554">1554</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> types </td> </tr> <tr> <td class="h" > <a name="1555">1555</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> url_keys </td> </tr> <tr> <td class="h" > <a name="1556">1556</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> widths </td> </tr> <tr> <td class="h" > <a name="1557">1557</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> wrap_margin </td> </tr> <tr> <td class="h" > <a name="1558">1558</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="1559">1559</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 394 </td> <td class="s"> @show_table_params{@show_table_params} = () x (1 + $#show_table_params); </td> </tr> <tr> <td class="h" > <a name="1560">1560</a> </td> <td class="c3" > 22 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 51814 </td> <td class="s"> undef @show_table_params; </td> </tr> <tr> <td class="h" > <a name="1561">1561</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1562">1562</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1563">1563</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1564">1564</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 html_formats </td> </tr> <tr> <td class="h" > <a name="1565">1565</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1566">1566</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >(I<$prefixes>,I<$suffixes>) = B<html_formats> I<\@html_formats>; </td> </tr> <tr> <td class="h" > <a name="1567">1567</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1568">1568</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The B<html_format> function takes an array reference of HTML formatting </td> </tr> <tr> <td class="h" > <a name="1569">1569</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> elements I<\@html_formats>, and builds two arrays of strings: the first: </td> </tr> <tr> <td class="h" > <a name="1570">1570</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> I<$prefixes>, is an array of prefixes containing the corresponding HTML </td> </tr> <tr> <td class="h" > <a name="1571">1571</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> formatting elements from I<\@html_formats>, and the second, </td> </tr> <tr> <td class="h" > <a name="1572">1572</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> I<$suffixes>, containing the appropriate HTML closing elements, in the </td> </tr> <tr> <td class="h" > <a name="1573">1573</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> opposite order. </td> </tr> <tr> <td class="h" > <a name="1574">1574</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1575">1575</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The result is designed to be used as prefixes and suffixes for the </td> </tr> <tr> <td class="h" > <a name="1576">1576</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> corresponding titles and column values. </td> </tr> <tr> <td class="h" > <a name="1577">1577</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1578">1578</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The array I<\@html_formats> contains lists of HTML formatting elements, </td> </tr> <tr> <td class="h" > <a name="1579">1579</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> one for each column (either title or data). Each array element is a </td> </tr> <tr> <td class="h" > <a name="1580">1580</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> list of one or more HTML elements, either given in HTML syntax, or as a </td> </tr> <tr> <td class="h" > <a name="1581">1581</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> "plain" name (ie: given as C<\<ELEMENT\>> or plainly, C<ELEMENT>). </td> </tr> <tr> <td class="h" > <a name="1582">1582</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Multiple elements are separated by a comma C<','>. </td> </tr> <tr> <td class="h" > <a name="1583">1583</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1584">1584</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The resulting array of I<$prefixes> contains the corresponding opening </td> </tr> <tr> <td class="h" > <a name="1585">1585</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> elements, in the order given, with the proper HTML element syntax. The </td> </tr> <tr> <td class="h" > <a name="1586">1586</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> resulting array of I<$suffixes> contains the closing elements, in the </td> </tr> <tr> <td class="h" > <a name="1587">1587</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> opposite order given, with the proper HTML element syntax. </td> </tr> <tr> <td class="h" > <a name="1588">1588</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1589">1589</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> For example, if I<\@html_formats> contains the two elements: </td> </tr> <tr> <td class="h" > <a name="1590">1590</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1591">1591</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [ 'FONT SIZE=+2,BOLD', 'FONT COLOR=red,EM' ] </td> </tr> <tr> <td class="h" > <a name="1592">1592</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1593">1593</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> then the resulting two arrays will be returned as: </td> </tr> <tr> <td class="h" > <a name="1594">1594</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1595">1595</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [ [ '<FONT SIZE=+2><BOLD>', '<FONT COLOR=red><EM>' ], </td> </tr> <tr> <td class="h" > <a name="1596">1596</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> [ '</FONT></BOLD>', '</FONT></EM>' ] ] </td> </tr> <tr> <td class="h" > <a name="1597">1597</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1598">1598</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1599">1599</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1600">1600</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub html_formats { </td> </tr> <tr> <td class="h" > <a name="1601">1601</a> </td> <td class="c3" > 98 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1601-1"> 98 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1601-1"> 0 </a> </td> <td > 174 </td> <td class="s"> my $html_formats = shift; # array ref </td> </tr> <tr> <td class="h" > <a name="1602">1602</a> </td> <td class="c3" > 98 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 108 </td> <td class="s"> my $i; </td> </tr> <tr> <td class="h" > <a name="1603">1603</a> </td> <td class="c3" > 98 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 156 </td> <td class="s"> my (@prefixes, @suffixes); </td> </tr> <tr> <td class="h" > <a name="1604">1604</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my ($html, $elt, $html_list, @html_list); </td> </tr> <tr> <td class="h" > <a name="1605">1605</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my ($prefixes, $suffixes); </td> </tr> <tr> <td class="h" > <a name="1606">1606</a> </td> <td class="c3" > 98 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 115 </td> <td class="s"> local($_); </td> </tr> <tr> <td class="h" > <a name="1607">1607</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1608">1608</a> </td> <td class="c3" > 98 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 419 </td> <td class="s"> foreach $html_list (@$html_formats) { </td> </tr> <tr> <td class="h" > <a name="1609">1609</a> </td> <td class="c3" > 9 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 43 </td> <td class="s"> @html_list = split(/,/,$html_list); </td> </tr> <tr> <td class="h" > <a name="1610">1610</a> </td> <td class="c3" > 9 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 17 </td> <td class="s"> $prefixes = $suffixes = ''; # initialize the list </td> </tr> <tr> <td class="h" > <a name="1611">1611</a> </td> <td class="c3" > 9 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 16 </td> <td class="s"> my %formats; # keep track of formats </td> </tr> <tr> <td class="h" > <a name="1612">1612</a> </td> <td class="c3" > 9 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 19 </td> <td class="s"> foreach (@html_list) { </td> </tr> <tr> <td class="h" > <a name="1613">1613</a> </td> <td class="c3" > 9 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 23 </td> <td class="s"> ($html, $elt) = (); </td> </tr> <tr> <td class="h" > <a name="1614">1614</a> </td> <td class="c3" > 9 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1614-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 94 </td> <td class="s"> if (($html, $elt) = /^(<)?\s*(\w+)/) {# <KEYWORD or KEYWORD </td> </tr> <tr> <td class="h" > <a name="1615">1615</a> </td> <td class="c3" > 9 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1615-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 119 </td> <td class="s"> next if $formats{$elt}++ > 0; # only do an element once </td> </tr> <tr> <td class="h" > <a name="1616">1616</a> </td> <td class="c3" > 9 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1616-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 24 </td> <td class="s"> $html = '<' unless $html; </td> </tr> <tr> <td class="h" > <a name="1617">1617</a> </td> <td class="c3" > 9 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 33 </td> <td class="s"> $prefixes .= $html.$elt.$'; </td> </tr> <tr> <td class="h" > <a name="1618">1618</a> </td> <td class="c3" > 9 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1618-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 34 </td> <td class="s"> $prefixes .= '>' unless $prefixes =~ />$/; </td> </tr> <tr> <td class="h" > <a name="1619">1619</a> </td> <td class="c3" > 9 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 35 </td> <td class="s"> $suffixes = $html.'/'.$elt.'>'.$suffixes; </td> </tr> <tr> <td class="h" > <a name="1620">1620</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1621">1621</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1622">1622</a> </td> <td class="c3" > 9 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 22 </td> <td class="s"> push(@prefixes, $prefixes); # even push empty items </td> </tr> <tr> <td class="h" > <a name="1623">1623</a> </td> <td class="c3" > 9 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 31 </td> <td class="s"> push(@suffixes, $suffixes); </td> </tr> <tr> <td class="h" > <a name="1624">1624</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1625">1625</a> </td> <td class="c3" > 98 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 340 </td> <td class="s"> ( \@prefixes, \@suffixes ); </td> </tr> <tr> <td class="h" > <a name="1626">1626</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1627">1627</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1628">1628</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1629">1629</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 calc_widths </td> </tr> <tr> <td class="h" > <a name="1630">1630</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1631">1631</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >(I<$num_cols>, I<$widths>, I<$precision>, I<$max_widths>) = </td> </tr> <tr> <td class="h" > <a name="1632">1632</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<&calc_widths>( I<$widthspec>, I<$titles>, I<$rewindable>, </td> </tr> <tr> <td class="h" > <a name="1633">1633</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$row_sub>, I<$fmt_sub>, I<$types>, I<$showmode>, </td> </tr> <tr> <td class="h" > <a name="1634">1634</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$max_width>); </td> </tr> <tr> <td class="h" > <a name="1635">1635</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1636">1636</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head2 B<DESCRIPTION> </td> </tr> <tr> <td class="h" > <a name="1637">1637</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1638">1638</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> B<calc_widths> is a generalized subroutine used by all the B<ShowTable> </td> </tr> <tr> <td class="h" > <a name="1639">1639</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> variant subroutines to setup internal variables prior to formatting for </td> </tr> <tr> <td class="h" > <a name="1640">1640</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> display. B<Calc_widths> handles the column width and precision </td> </tr> <tr> <td class="h" > <a name="1641">1641</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> analysis, including scanning the data (if rewindable) for appropriate </td> </tr> <tr> <td class="h" > <a name="1642">1642</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> default values. </td> </tr> <tr> <td class="h" > <a name="1643">1643</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1644">1644</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The number of columns in the data is returned, as well as three arrays: </td> </tr> <tr> <td class="h" > <a name="1645">1645</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the declared column widths, the column precision values, and the maximum </td> </tr> <tr> <td class="h" > <a name="1646">1646</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> column widths. </td> </tr> <tr> <td class="h" > <a name="1647">1647</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1648">1648</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head2 B<RETURN VALUES> </td> </tr> <tr> <td class="h" > <a name="1649">1649</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1650">1650</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="1651">1651</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1652">1652</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$num_cols> </td> </tr> <tr> <td class="h" > <a name="1653">1653</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1654">1654</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is the number of columns in the data. If the data is not rewindable, </td> </tr> <tr> <td class="h" > <a name="1655">1655</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> this is computed as the maximum of the number of elements in the </td> </tr> <tr> <td class="h" > <a name="1656">1656</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> I<$widthspec> array and the number of elements in the I<$titles> </td> </tr> <tr> <td class="h" > <a name="1657">1657</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> array. When the data is rewindable, this is the maximum of the number </td> </tr> <tr> <td class="h" > <a name="1658">1658</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> of columns of each row of data. </td> </tr> <tr> <td class="h" > <a name="1659">1659</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1660">1660</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$widths> </td> </tr> <tr> <td class="h" > <a name="1661">1661</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1662">1662</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is the column widths array ref, without the precision specs (if any). </td> </tr> <tr> <td class="h" > <a name="1663">1663</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Each column's width value is determined by the original I<$widthspec> </td> </tr> <tr> <td class="h" > <a name="1664">1664</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> value and/or the maximum length of the formatted data for the column. </td> </tr> <tr> <td class="h" > <a name="1665">1665</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1666">1666</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$precision> </td> </tr> <tr> <td class="h" > <a name="1667">1667</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1668">1668</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is the precision component (if any) of the original I<$widthspec> </td> </tr> <tr> <td class="h" > <a name="1669">1669</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> array ref. If there was no original precision component from the I<$widthspec>, </td> </tr> <tr> <td class="h" > <a name="1670">1670</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> and the data is rewindable, then the data is examined to determine the </td> </tr> <tr> <td class="h" > <a name="1671">1671</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> maximum default precision. </td> </tr> <tr> <td class="h" > <a name="1672">1672</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1673">1673</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$max_widths> </td> </tr> <tr> <td class="h" > <a name="1674">1674</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1675">1675</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is the ref to the array of maximum widths for the given columns. </td> </tr> <tr> <td class="h" > <a name="1676">1676</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1677">1677</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="1678">1678</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1679">1679</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head2 B<ARGUMENTS> </td> </tr> <tr> <td class="h" > <a name="1680">1680</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1681">1681</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="1682">1682</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1683">1683</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$widthspec> </td> </tr> <tr> <td class="h" > <a name="1684">1684</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1685">1685</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A reference to an array of column width (or length) values, each given </td> </tr> <tr> <td class="h" > <a name="1686">1686</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> as an integer, real number, or a string value of </td> </tr> <tr> <td class="h" > <a name="1687">1687</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> "I<width>.I<precision>". If a value is zero or null, the length of the </td> </tr> <tr> <td class="h" > <a name="1688">1688</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> corresponding formatted data (if rewindable) and column title length are </td> </tr> <tr> <td class="h" > <a name="1689">1689</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> used to determine a reasonable default. </td> </tr> <tr> <td class="h" > <a name="1690">1690</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1691">1691</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If a column's I<width> portion is a positive, non-zero number, then the </td> </tr> <tr> <td class="h" > <a name="1692">1692</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> column will be this wide, regardless of the values lengths of the data </td> </tr> <tr> <td class="h" > <a name="1693">1693</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> in the column. </td> </tr> <tr> <td class="h" > <a name="1694">1694</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1695">1695</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If the column's I<width> portion is given as a negative number, then the </td> </tr> <tr> <td class="h" > <a name="1696">1696</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> positive value is used as a minimum column width, with no limit on the </td> </tr> <tr> <td class="h" > <a name="1697">1697</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> maximum column width. In other words, the column will be at least </td> </tr> <tr> <td class="h" > <a name="1698">1698</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> I<width> characters wide. </td> </tr> <tr> <td class="h" > <a name="1699">1699</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1700">1700</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If the data is not rewindable, and a column's width value is null or </td> </tr> <tr> <td class="h" > <a name="1701">1701</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> zero, then the length of the column title is used. This may cause severe </td> </tr> <tr> <td class="h" > <a name="1702">1702</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> wrapping of data in the column, if the column data lengths are much </td> </tr> <tr> <td class="h" > <a name="1703">1703</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> greater than the column title widths. </td> </tr> <tr> <td class="h" > <a name="1704">1704</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1705">1705</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$titles> </td> </tr> <tr> <td class="h" > <a name="1706">1706</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1707">1707</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The array ref to the column titles; used to determine the minimum </td> </tr> <tr> <td class="h" > <a name="1708">1708</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> acceptable width, as well as the default number of columns. If the </td> </tr> <tr> <td class="h" > <a name="1709">1709</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> C<$titles> array is empty, then the C<$widthspec> array is used to </td> </tr> <tr> <td class="h" > <a name="1710">1710</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> determine the default number of columns. </td> </tr> <tr> <td class="h" > <a name="1711">1711</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1712">1712</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$rewindable> </td> </tr> <tr> <td class="h" > <a name="1713">1713</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1714">1714</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A flag indicating whether or not the data being formatted is rewindable. </td> </tr> <tr> <td class="h" > <a name="1715">1715</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If this is true, a pass over the data will be done in order to calculate </td> </tr> <tr> <td class="h" > <a name="1716">1716</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the maximum lengths of the actual formatted data, using I<$fmt_sub> </td> </tr> <tr> <td class="h" > <a name="1717">1717</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> (below), rather than just rely on the declared column lengths. This </td> </tr> <tr> <td class="h" > <a name="1718">1718</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> allows for optimal column width adjustments (ie: the actual column </td> </tr> <tr> <td class="h" > <a name="1719">1719</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> widths may be less than the declared column widths). </td> </tr> <tr> <td class="h" > <a name="1720">1720</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1721">1721</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If it is not desired to have the column widths dynamically adjusted, </td> </tr> <tr> <td class="h" > <a name="1722">1722</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> then set the I<$rewindable> argument to 0, even if the data is </td> </tr> <tr> <td class="h" > <a name="1723">1723</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> rewindable. </td> </tr> <tr> <td class="h" > <a name="1724">1724</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1725">1725</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$row_sub> </td> </tr> <tr> <td class="h" > <a name="1726">1726</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1727">1727</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The code reference to the subroutine which returns the data; invoked </td> </tr> <tr> <td class="h" > <a name="1728">1728</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> only if I<$rewindable> is non-null. </td> </tr> <tr> <td class="h" > <a name="1729">1729</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1730">1730</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$fmt_sub> </td> </tr> <tr> <td class="h" > <a name="1731">1731</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1732">1732</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The subroutine used to determine the length of the data when formatted; </td> </tr> <tr> <td class="h" > <a name="1733">1733</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> if this is omitted or null, the length of the data is used by default. </td> </tr> <tr> <td class="h" > <a name="1734">1734</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The I<$fmt_sub> is used only when the data is rewindable. </td> </tr> <tr> <td class="h" > <a name="1735">1735</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1736">1736</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$types> </td> </tr> <tr> <td class="h" > <a name="1737">1737</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1738">1738</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> An array reference to the types of each of the value columns; used only </td> </tr> <tr> <td class="h" > <a name="1739">1739</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> when I<$fmt_sub> is invoked. </td> </tr> <tr> <td class="h" > <a name="1740">1740</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1741">1741</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$showmode> </td> </tr> <tr> <td class="h" > <a name="1742">1742</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1743">1743</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> A string indicating the mode of the eventual display; one of four strings: </td> </tr> <tr> <td class="h" > <a name="1744">1744</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> "C<box>", "C<table>", "C<list>", and "C<html>". Used to adjust widths </td> </tr> <tr> <td class="h" > <a name="1745">1745</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> for formatting requirements. </td> </tr> <tr> <td class="h" > <a name="1746">1746</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1747">1747</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item I<$max_width> </td> </tr> <tr> <td class="h" > <a name="1748">1748</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1749">1749</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> The maximum width of the table being formatted. If set, and the total </td> </tr> <tr> <td class="h" > <a name="1750">1750</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sum of the individual columns exceeds this value, the column widths are </td> </tr> <tr> <td class="h" > <a name="1751">1751</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> scaled down uniformly. If not set (null), no column width scaling is done. </td> </tr> <tr> <td class="h" > <a name="1752">1752</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1753">1753</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="1754">1754</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1755">1755</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1756">1756</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1757">1757</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub calc_widths { </td> </tr> <tr> <td class="h" > <a name="1758">1758</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1758-1"> 160 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1758-1"> 0 </a> </td> <td > 424 </td> <td class="s"> my $widthspec = shift; </td> </tr> <tr> <td class="h" > <a name="1759">1759</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 283 </td> <td class="s"> my $titles = shift; </td> </tr> <tr> <td class="h" > <a name="1760">1760</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 315 </td> <td class="s"> my $rewindable = shift; </td> </tr> <tr> <td class="h" > <a name="1761">1761</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 315 </td> <td class="s"> my $row_sub = shift; </td> </tr> <tr> <td class="h" > <a name="1762">1762</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 280 </td> <td class="s"> my $fmt_sub = shift; </td> </tr> <tr> <td class="h" > <a name="1763">1763</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 249 </td> <td class="s"> my $types = shift; </td> </tr> <tr> <td class="h" > <a name="1764">1764</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 457 </td> <td class="s"> my $showmode = shift; </td> </tr> <tr> <td class="h" > <a name="1765">1765</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 312 </td> <td class="s"> my $max_width = shift; </td> </tr> <tr> <td class="h" > <a name="1766">1766</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1767">1767</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 383 </td> <td class="s"> my @precision; # array of precision values </td> </tr> <tr> <td class="h" > <a name="1768">1768</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> my @setprec; # array of flags to set default precision </td> </tr> <tr> <td class="h" > <a name="1769">1769</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my @widths; # array of widths </td> </tr> <tr> <td class="h" > <a name="1770">1770</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my @max_widths; # array of max widths </td> </tr> <tr> <td class="h" > <a name="1771">1771</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my @expandable; # flag if widths expandable </td> </tr> <tr> <td class="h" > <a name="1772">1772</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my $num_cols; </td> </tr> <tr> <td class="h" > <a name="1773">1773</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> my $c; </td> </tr> <tr> <td class="h" > <a name="1774">1774</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1775">1775</a> </td> <td class="c3" > 160 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1775-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 791 </td> <td class="s"> if ($#$widthspec >= 0) { </td> </tr> <tr> <td class="h" > <a name="1776">1776</a> </td> <td class="c3" > 144 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 739 </td> <td class="s"> @precision = @$widthspec; </td> </tr> <tr> <td class="h" > <a name="1777">1777</a> </td> <td class="c3" > 144 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1777-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1072 </td> <td class="s"> foreach (@precision) { s/^.*\.(\d+)/$1/ || ($_ = ''); } </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 672 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3527 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1778">1778</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1779">1779</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # The setprec array indicates which columns need a default precision </td> </tr> <tr> <td class="h" > <a name="1780">1780</a> </td> <td class="c3" > 144 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1263 </td> <td class="s"> @setprec = map { !length } @precision; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 672 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2607 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1781">1781</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1782">1782</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Get the integer portions </td> </tr> <tr> <td class="h" > <a name="1783">1783</a> </td> <td class="c3" > 144 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1783-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 396 </td> <td class="s"> @widths = map { length($_) ? int : 0 } @$widthspec; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 672 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1940 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1784">1784</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1785">1785</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Set @expandable if negative widths </td> </tr> <tr> <td class="h" > <a name="1786">1786</a> </td> <td class="c3" > 144 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 364 </td> <td class="s"> @expandable = map { $_ < 0 } @widths; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 672 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2772 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1787">1787</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1788">1788</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Convert widths to all positive values </td> </tr> <tr> <td class="h" > <a name="1789">1789</a> </td> <td class="c3" > 144 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 930 </td> <td class="s"> @widths = map abs, @widths; </td> </tr> <tr> <td class="h" > <a name="1790">1790</a> </td> <td class="c3" > 144 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 744 </td> <td class="s"> @max_widths = (0) x (1 + $#widths); # no maximums yet </td> </tr> <tr> <td class="h" > <a name="1791">1791</a> </td> <td class="c3" > 144 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 438 </td> <td class="s"> $num_cols = 1 + $#widths; </td> </tr> <tr> <td class="h" > <a name="1792">1792</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="1793">1793</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # No widths given </td> </tr> <tr> <td class="h" > <a name="1794">1794</a> </td> <td class="c3" > 16 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 373 </td> <td class="s"> @expandable = (1) x (1 + $#$titles); </td> </tr> <tr> <td class="h" > <a name="1795">1795</a> </td> <td class="c3" > 16 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 180 </td> <td class="s"> @precision = ('') x (1 + $#$titles); </td> </tr> <tr> <td class="h" > <a name="1796">1796</a> </td> <td class="c3" > 16 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 378 </td> <td class="s"> @setprec = @expandable; </td> </tr> <tr> <td class="h" > <a name="1797">1797</a> </td> <td class="c3" > 16 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 328 </td> <td class="s"> @max_widths = map length, @$titles; # initialize maximums to title widths </td> </tr> <tr> <td class="h" > <a name="1798">1798</a> </td> <td class="c3" > 16 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 85 </td> <td class="s"> $num_cols = 1 + $#$titles; </td> </tr> <tr> <td class="h" > <a name="1799">1799</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1800">1800</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1801">1801</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If the data is rewindable, scan and accumulate *actual* widths for </td> </tr> <tr> <td class="h" > <a name="1802">1802</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # each column, using the title lengths as a minimum. </td> </tr> <tr> <td class="h" > <a name="1803">1803</a> </td> <td class="c3" > 160 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1803-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 530 </td> <td class="s"> if ($rewindable) { </td> </tr> <tr> <td class="h" > <a name="1804">1804</a> </td> <td class="c3" > 132 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 407 </td> <td class="s"> my @values; </td> </tr> <tr> <td class="h" > <a name="1805">1805</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> my @prectype; </td> </tr> <tr> <td class="h" > <a name="1806">1806</a> </td> <td class="c3" > 132 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1806-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 685 </td> <td class="s"> if (ref($types) eq 'ARRAY') { </td> </tr> <tr> <td class="h" > <a name="1807">1807</a> </td> <td class="c3" > 132 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 394 </td> <td class="s"> @prectype = map {/float|num(eric|ber)|money|dec|real|precision|double/i } @$types; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 612 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4290 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1808">1808</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1809">1809</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1810">1810</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Scan the values </td> </tr> <tr> <td class="h" > <a name="1811">1811</a> </td> <td class="c3" > 132 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 560 </td> <td class="s"> while ((@values = &$row_sub(0)), $#values >= $[) { </td> </tr> <tr> <td class="h" > <a name="1812">1812</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If the new row is larger than the number of titles, adjust </td> </tr> <tr> <td class="h" > <a name="1813">1813</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # the info arrays.. </td> </tr> <tr> <td class="h" > <a name="1814">1814</a> </td> <td class="c3" > 660 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1814-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3850 </td> <td class="s"> if ($num_cols < 1 + $#values) { # new column? </td> </tr> <tr> <td class="h" > <a name="1815">1815</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $num_cols = 1 + $#values; # new # of columns </td> </tr> <tr> <td class="h" > <a name="1816">1816</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> for ($c = $#expandable + 1; $c <= $#values; $c++) { </td> </tr> <tr> <td class="h" > <a name="1817">1817</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $expandable[$c] = 1; </td> </tr> <tr> <td class="h" > <a name="1818">1818</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $precision[$c] = ''; </td> </tr> <tr> <td class="h" > <a name="1819">1819</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $setprec[$c] = 1; </td> </tr> <tr> <td class="h" > <a name="1820">1820</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $max_widths[$c] = 0; </td> </tr> <tr> <td class="h" > <a name="1821">1821</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1822">1822</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1823">1823</a> </td> <td class="c3" > 660 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1378 </td> <td class="s"> my $len; </td> </tr> <tr> <td class="h" > <a name="1824">1824</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> my $value; </td> </tr> <tr> <td class="h" > <a name="1825">1825</a> </td> <td class="c3" > 660 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1937 </td> <td class="s"> for ($c = 0; $c < $num_cols; $c++) { </td> </tr> <tr> <td class="h" > <a name="1826">1826</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Does this column's precision need setting? </td> </tr> <tr> <td class="h" > <a name="1827">1827</a> </td> <td class="c3" > 3060 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1827-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 11054 </td> <td class="s"> if ($setprec[$c]) { </td> </tr> <tr> <td class="h" > <a name="1828">1828</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Yes, is it a type of value which can use the precision? </td> </tr> <tr> <td class="h" > <a name="1829">1829</a> </td> <td class="c3" > 612 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1829-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1613 </td> <td class="s"> if ($prectype[$c]) { </td> </tr> <tr> <td class="h" > <a name="1830">1830</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # yes, how much is the current value's default precision? </td> </tr> <tr> <td class="h" > <a name="1831">1831</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1831-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> if ($values[$c] =~ /\.(.*)$/) { </td> </tr> <tr> <td class="h" > <a name="1832">1832</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1832-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $precision[$c] = length($1) if length($1) > $precision[$c]; </td> </tr> <tr> <td class="h" > <a name="1833">1833</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1834">1834</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="1835">1835</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # No, this column can't use the precision value -- don't </td> </tr> <tr> <td class="h" > <a name="1836">1836</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # do this check on this column again </td> </tr> <tr> <td class="h" > <a name="1837">1837</a> </td> <td class="c3" > 612 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1423 </td> <td class="s"> $precision[$c] = $setprec[$c] = 0; </td> </tr> <tr> <td class="h" > <a name="1838">1838</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1839">1839</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1840">1840</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1841">1841</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Now, let's get the formatted value so we can guess the best </td> </tr> <tr> <td class="h" > <a name="1842">1842</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # default widths </td> </tr> <tr> <td class="h" > <a name="1843">1843</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $value = </td> </tr> <tr> <td class="h" > <a name="1844">1844</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If a fmt_sub is available, use it to format the value </td> </tr> <tr> <td class="h" > <a name="1845">1845</a> </td> <td class="c3" > 3060 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1845-1"> 0 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 11364 </td> <td class="s"> $fmt_sub ? </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#-2"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1846">1846</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &$fmt_sub($values[$c], $types->[$c], 0, 0, $precision[$c], $showmode) </td> </tr> <tr> <td class="h" > <a name="1847">1847</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If no fmt sub, then use Perl stringify </td> </tr> <tr> <td class="h" > <a name="1848">1848</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> : length($showmode eq 'html' ? # in HTML mode? </td> </tr> <tr> <td class="h" > <a name="1849">1849</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &PlainText($values[$c]) # use plain text </td> </tr> <tr> <td class="h" > <a name="1850">1850</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> : $values[$c]); # else, use raw text </td> </tr> <tr> <td class="h" > <a name="1851">1851</a> </td> <td class="c3" > 3060 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4377 </td> <td class="s"> $len = length($value); </td> </tr> <tr> <td class="h" > <a name="1852">1852</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1853">1853</a> </td> <td class="c3" > 3060 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1853-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1853-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 34463 </td> <td class="s"> $max_widths[$c] = $len if </td> </tr> <tr> <td class="h" > <a name="1854">1854</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $c > $#max_widths || $len > $max_widths[$c]; </td> </tr> <tr> <td class="h" > <a name="1855">1855</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1856">1856</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1857">1857</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # okay -- maximums scanned. </td> </tr> <tr> <td class="h" > <a name="1858">1858</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If the maximum table width set, scale the max_widths </td> </tr> <tr> <td class="h" > <a name="1859">1859</a> </td> <td class="c3" > 132 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1859-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1859-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2805 </td> <td class="s"> $max_width = 0 unless </td> </tr> <tr> <td class="h" > <a name="1860">1860</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> defined($max_width) && $max_width ne ''; </td> </tr> <tr> <td class="h" > <a name="1861">1861</a> </td> <td class="c3" > 132 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1861-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 407 </td> <td class="s"> if ($max_width > 0) { </td> </tr> <tr> <td class="h" > <a name="1862">1862</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Start with the given maximum, but adjust it to account for </td> </tr> <tr> <td class="h" > <a name="1863">1863</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # the formatting and space characters. </td> </tr> <tr> <td class="h" > <a name="1864">1864</a> </td> <td class="c3" > 50 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 300 </td> <td class="s"> my $max_width = $max_width; </td> </tr> <tr> <td class="h" > <a name="1865">1865</a> </td> <td class="c3" > 50 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1865-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 541 </td> <td class="s"> $max_width -= $num_cols * 3 + 2 if $showmode eq 'box'; </td> </tr> <tr> <td class="h" > <a name="1866">1866</a> </td> <td class="c3" > 50 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1866-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 202 </td> <td class="s"> $max_width -= $num_cols * 2 - 1 if $showmode eq 'table'; </td> </tr> <tr> <td class="h" > <a name="1867">1867</a> </td> <td class="c3" > 50 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 94 </td> <td class="s"> my $total = 0; </td> </tr> <tr> <td class="h" > <a name="1868">1868</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Calculate the total table width </td> </tr> <tr> <td class="h" > <a name="1869">1869</a> </td> <td class="c3" > 50 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1189 </td> <td class="s"> for ($c = 0; $c <= $#max_widths; $c++) { </td> </tr> <tr> <td class="h" > <a name="1870">1870</a> </td> <td class="c3" > 250 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 607 </td> <td class="s"> $total += $max_widths[$c]; </td> </tr> <tr> <td class="h" > <a name="1871">1871</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1872">1872</a> </td> <td class="c3" > 50 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1872-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 505 </td> <td class="s"> if ($max_width < $total) { </td> </tr> <tr> <td class="h" > <a name="1873">1873</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Now scale it to the adjusted maximum table width </td> </tr> <tr> <td class="h" > <a name="1874">1874</a> </td> <td class="c3" > 44 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 187 </td> <td class="s"> for ($c = 0; $c <= $#max_widths; $c++) { </td> </tr> <tr> <td class="h" > <a name="1875">1875</a> </td> <td class="c3" > 220 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 681 </td> <td class="s"> $max_widths[$c] = int($max_widths[$c] * </td> </tr> <tr> <td class="h" > <a name="1876">1876</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $max_width / $total); </td> </tr> <tr> <td class="h" > <a name="1877">1877</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1878">1878</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1879">1879</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1880">1880</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1881">1881</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If the column is expandable, allow the width to grow to the max_width. </td> </tr> <tr> <td class="h" > <a name="1882">1882</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If the column is not expandable, allow the width to shrink to </td> </tr> <tr> <td class="h" > <a name="1883">1883</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # the max_width if it is smaller. </td> </tr> <tr> <td class="h" > <a name="1884">1884</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1885">1885</a> </td> <td class="c3" > 132 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1885-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 518 </td> <td class="s"> if ($#widths < 0) { # were there any widths? </td> </tr> <tr> <td class="h" > <a name="1886">1886</a> </td> <td class="c3" > 16 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 101 </td> <td class="s"> @widths = @max_widths; # nope, set them to the scanned values </td> </tr> <tr> <td class="h" > <a name="1887">1887</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="1888">1888</a> </td> <td class="c3" > 116 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1888-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3175 </td> <td class="s"> $num_cols = max($num_cols, 1 + $#widths) if $#widths >= 0; </td> </tr> <tr> <td class="h" > <a name="1889">1889</a> </td> <td class="c3" > 116 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 281 </td> <td class="s"> my $len; </td> </tr> <tr> <td class="h" > <a name="1890">1890</a> </td> <td class="c3" > 116 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5712 </td> <td class="s"> for ($c = 0; $c < $num_cols; $c++) { </td> </tr> <tr> <td class="h" > <a name="1891">1891</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # provide defaults first </td> </tr> <tr> <td class="h" > <a name="1892">1892</a> </td> <td class="c3" > 544 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1892-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1428 </td> <td class="s"> $max_widths[$c] = 0 if !defined($max_widths[$c]); </td> </tr> <tr> <td class="h" > <a name="1893">1893</a> </td> <td class="c3" > 544 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1893-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1893-1"> 33 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3303 </td> <td class="s"> $widths[$c] = $max_widths[$c] </td> </tr> <tr> <td class="h" > <a name="1894">1894</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> if $c > $#widths || !defined($widths[$c]); </td> </tr> <tr> <td class="h" > <a name="1895">1895</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # if the column can shrink, let it </td> </tr> <tr> <td class="h" > <a name="1896">1896</a> </td> <td class="c3" > 544 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1896-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1896-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5049 </td> <td class="s"> if ($max_widths[$c] < $widths[$c]) { </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#-2"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#-2"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#-3"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1897">1897</a> </td> <td class="c3" > 348 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 611 </td> <td class="s"> $widths[$c] = $max_widths[$c]; </td> </tr> <tr> <td class="h" > <a name="1898">1898</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } elsif ($expandable[$c] || !$widths[$c]) { </td> </tr> <tr> <td class="h" > <a name="1899">1899</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # allow the width to grow to the maximum width </td> </tr> <tr> <td class="h" > <a name="1900">1900</a> </td> <td class="c3" > 44 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1900-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 276 </td> <td class="s"> $widths[$c] = $max_widths[$c] if $widths[$c] < $max_widths[$c]; </td> </tr> <tr> <td class="h" > <a name="1901">1901</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } elsif ($max_widths[$c] > $widths[$c] && $widths[$c] > 0) { </td> </tr> <tr> <td class="h" > <a name="1902">1902</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # not expandable -- set the max width to the width value </td> </tr> <tr> <td class="h" > <a name="1903">1903</a> </td> <td class="c3" > 98 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 217 </td> <td class="s"> $max_widths[$c] = $widths[$c]; </td> </tr> <tr> <td class="h" > <a name="1904">1904</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1905">1905</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # In either case, however, ensure that the widths are at </td> </tr> <tr> <td class="h" > <a name="1906">1906</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # least as long as the title length </td> </tr> <tr> <td class="h" > <a name="1907">1907</a> </td> <td class="c3" > 544 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1907-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1922 </td> <td class="s"> if ($c <= $#$titles) { </td> </tr> <tr> <td class="h" > <a name="1908">1908</a> </td> <td class="c3" > 544 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1908-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1777 </td> <td class="s"> if (defined($titles->[$c])) { </td> </tr> <tr> <td class="h" > <a name="1909">1909</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # If we're in HTML mode, get the length of the plaintext </td> </tr> <tr> <td class="h" > <a name="1910">1910</a> </td> <td class="c3" > 544 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1910-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1397 </td> <td class="s"> $len = length($showmode eq 'html' ? &PlainText($titles->[$c]) </td> </tr> <tr> <td class="h" > <a name="1911">1911</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # else, use raw text. </td> </tr> <tr> <td class="h" > <a name="1912">1912</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> : $titles->[$c]); </td> </tr> <tr> <td class="h" > <a name="1913">1913</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="1914">1914</a> </td> <td class="c0" > 0 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 0 </td> <td class="s"> $len = length("Field_$c"); </td> </tr> <tr> <td class="h" > <a name="1915">1915</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1916">1916</a> </td> <td class="c3" > 544 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1916-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1661 </td> <td class="s"> $widths[$c] = $len </td> </tr> <tr> <td class="h" > <a name="1917">1917</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> if $widths[$c] < $len; </td> </tr> <tr> <td class="h" > <a name="1918">1918</a> </td> <td class="c3" > 544 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1918-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2313 </td> <td class="s"> $max_widths[$c] = $len </td> </tr> <tr> <td class="h" > <a name="1919">1919</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> if $max_widths[$c] < $len; </td> </tr> <tr> <td class="h" > <a name="1920">1920</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1921">1921</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1922">1922</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1923">1923</a> </td> <td class="c3" > 132 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 456 </td> <td class="s"> &$row_sub(1); # reset the pointer for the next scan </td> </tr> <tr> <td class="h" > <a name="1924">1924</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="1925">1925</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Use title width as default if original width is null or zero </td> </tr> <tr> <td class="h" > <a name="1926">1926</a> </td> <td class="c3" > 28 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 302 </td> <td class="s"> my $len; </td> </tr> <tr> <td class="h" > <a name="1927">1927</a> </td> <td class="c3" > 28 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1470 </td> <td class="s"> for ($c = 0; $c <= $#widths; $c++) { </td> </tr> <tr> <td class="h" > <a name="1928">1928</a> </td> <td class="c3" > 128 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1928-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 714 </td> <td class="s"> next unless $c <= $#$titles; </td> </tr> <tr> <td class="h" > <a name="1929">1929</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Get the length of the title (sans HTML text if in that mode) </td> </tr> <tr> <td class="h" > <a name="1930">1930</a> </td> <td class="c3" > 128 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1930-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1156 </td> <td class="s"> $len = length($showmode eq 'html' ? &PlainText($titles->[$c]) </td> </tr> <tr> <td class="h" > <a name="1931">1931</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> : $titles->[$c]); </td> </tr> <tr> <td class="h" > <a name="1932">1932</a> </td> <td class="c3" > 128 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1932-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 575 </td> <td class="s"> $widths[$c] = $len if $widths[$c] < $len; </td> </tr> <tr> <td class="h" > <a name="1933">1933</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1934">1934</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Can't scan the data, so the maximums can only be set by using the </td> </tr> <tr> <td class="h" > <a name="1935">1935</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # explicit widths. </td> </tr> <tr> <td class="h" > <a name="1936">1936</a> </td> <td class="c3" > 28 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 144 </td> <td class="s"> @max_widths = @widths; </td> </tr> <tr> <td class="h" > <a name="1937">1937</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1938">1938</a> </td> <td class="c3" > 160 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1334 </td> <td class="s"> ($num_cols, \@widths, \@precision, \@max_widths); </td> </tr> <tr> <td class="h" > <a name="1939">1939</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1940">1940</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1941">1941</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="1942">1942</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1943">1943</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 putcell </td> </tr> <tr> <td class="h" > <a name="1944">1944</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1945">1945</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$wrapped> = B<&putcell>( I<\@cells>, I<$c>, I<$cell_width>, I<\@prefix>, I<\@suffix>, I<$wrap_flag> ); </td> </tr> <tr> <td class="h" > <a name="1946">1946</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1947">1947</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Output the contents of an array cell at I<$cell>[I<$c>], causing text </td> </tr> <tr> <td class="h" > <a name="1948">1948</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> longer than I<$cell_width> to be saved for output on subsequent calls. </td> </tr> <tr> <td class="h" > <a name="1949">1949</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Prefixing the output of each cell's value is a string from the </td> </tr> <tr> <td class="h" > <a name="1950">1950</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> two-element array I<@prefix>. Suffixing each cell's value is a string </td> </tr> <tr> <td class="h" > <a name="1951">1951</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> from the two-element array I<@suffix>. The first element of either </td> </tr> <tr> <td class="h" > <a name="1952">1952</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> array is selected when I<$wrap_flag> is zero or null, or when there is </td> </tr> <tr> <td class="h" > <a name="1953">1953</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> no more text in the current to be output. The second element </td> </tr> <tr> <td class="h" > <a name="1954">1954</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> is selected when I<$wrap_flag> is non-zero, and when there is more text in </td> </tr> <tr> <td class="h" > <a name="1955">1955</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the current cell to be output. </td> </tr> <tr> <td class="h" > <a name="1956">1956</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1957">1957</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> In the case of text longer than I<$cell_width>, a non-zero value is </td> </tr> <tr> <td class="h" > <a name="1958">1958</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> returned. </td> </tr> <tr> <td class="h" > <a name="1959">1959</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1960">1960</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Cells with undefined data are not output, nor are the prefix or suffix </td> </tr> <tr> <td class="h" > <a name="1961">1961</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> strings. </td> </tr> <tr> <td class="h" > <a name="1962">1962</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1963">1963</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1964">1964</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1965">1965</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub putcell { </td> </tr> <tr> <td class="h" > <a name="1966">1966</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1966-1"> 3983 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#1966-1"> 0 </a> </td> <td > 6065 </td> <td class="s"> my $cells = shift; # ref to cell array </td> </tr> <tr> <td class="h" > <a name="1967">1967</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5069 </td> <td class="s"> my $c = shift; # index </td> </tr> <tr> <td class="h" > <a name="1968">1968</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4610 </td> <td class="s"> my $cell_width = shift; # maximum width of the cell </td> </tr> <tr> <td class="h" > <a name="1969">1969</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5412 </td> <td class="s"> my $prefix = shift; # 2-elt array of prefix strings </td> </tr> <tr> <td class="h" > <a name="1970">1970</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4983 </td> <td class="s"> my $suffix = shift; # 2-elt array of suffix strings </td> </tr> <tr> <td class="h" > <a name="1971">1971</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4993 </td> <td class="s"> my $wrap_flag = shift; # non-zero for wrapped lines </td> </tr> <tr> <td class="h" > <a name="1972">1972</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4288 </td> <td class="s"> my $more; </td> </tr> <tr> <td class="h" > <a name="1973">1973</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1974">1974</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 7950 </td> <td class="s"> my $v = $cells->[$c]; # get the data </td> </tr> <tr> <td class="h" > <a name="1975">1975</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 6676 </td> <td class="s"> my $px = 0; # prefix index </td> </tr> <tr> <td class="h" > <a name="1976">1976</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4937 </td> <td class="s"> my $sx = 0; # suffix index </td> </tr> <tr> <td class="h" > <a name="1977">1977</a> </td> <td class="c3" > 3983 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1977-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 10214 </td> <td class="s"> if (defined $v) { # not undef data? </td> </tr> <tr> <td class="h" > <a name="1978">1978</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5429 </td> <td class="s"> my $text = $v; # save the text </td> </tr> <tr> <td class="h" > <a name="1979">1979</a> </td> <td class="c3" > 3983 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1979-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1979-1"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 20011 </td> <td class="s"> $cell_width = 1 if !defined($cell_width) || $cell_width == 0; </td> </tr> <tr> <td class="h" > <a name="1980">1980</a> </td> <td class="c3" > 3983 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1980-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 9372 </td> <td class="s"> if ($cell_width <= length($text)) { </td> </tr> <tr> <td class="h" > <a name="1981">1981</a> </td> <td class="c3" > 2353 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 4973 </td> <td class="s"> $more = substr($text,$cell_width); </td> </tr> <tr> <td class="h" > <a name="1982">1982</a> </td> <td class="c3" > 2353 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5715 </td> <td class="s"> $v = substr($text,0,$cell_width); </td> </tr> <tr> <td class="h" > <a name="1983">1983</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } else { </td> </tr> <tr> <td class="h" > <a name="1984">1984</a> </td> <td class="c3" > 1630 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2042 </td> <td class="s"> $v = $text; $more = ''; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 1630 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2576 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1985">1985</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1986">1986</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1987">1987</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # wrapping? </td> </tr> <tr> <td class="h" > <a name="1988">1988</a> </td> <td class="c3" > 3983 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#1988-1"> 100 </a> </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#1988-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 33037 </td> <td class="s"> if ($more ne '' && </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--condition.html#-2"> 66 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1989">1989</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1990">1990</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # See if we can wrap on a word boundary, instead of </td> </tr> <tr> <td class="h" > <a name="1991">1991</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # arbitrarily splitting one; note that we try to not </td> </tr> <tr> <td class="h" > <a name="1992">1992</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # split grouped numbers (1,345) or reals (1.234). </td> </tr> <tr> <td class="h" > <a name="1993">1993</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1994">1994</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> $v =~ /([-,;? \t])([^-,;? \t0-9]*)$/ && </td> </tr> <tr> <td class="h" > <a name="1995">1995</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1996">1996</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # but also make sure that it is not too long </td> </tr> <tr> <td class="h" > <a name="1997">1997</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="1998">1998</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> length($2) <= $List_Wrap_Margin ) </td> </tr> <tr> <td class="h" > <a name="1999">1999</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> { </td> </tr> <tr> <td class="h" > <a name="2000">2000</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2001">2001</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # Okay, cut on the word boundary, leaving the break char </td> </tr> <tr> <td class="h" > <a name="2002">2002</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # on the tail end of the current output value </td> </tr> <tr> <td class="h" > <a name="2003">2003</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2004">2004</a> </td> <td class="c3" > 548 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1427 </td> <td class="s"> my $cut = $cell_width - length($2); </td> </tr> <tr> <td class="h" > <a name="2005">2005</a> </td> <td class="c3" > 548 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1095 </td> <td class="s"> $v = substr($text,0,$cut); # get new value </td> </tr> <tr> <td class="h" > <a name="2006">2006</a> </td> <td class="c3" > 548 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1023 </td> <td class="s"> $more = substr($text, $cut); # new remainder </td> </tr> <tr> <td class="h" > <a name="2007">2007</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2008">2008</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 6988 </td> <td class="s"> $cells->[$c] = $more; # leave the rest for later </td> </tr> <tr> <td class="h" > <a name="2009">2009</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--condition.html#2009-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 15561 </td> <td class="s"> $px = $wrap_flag != 0 && length($v) > 0; </td> </tr> <tr> <td class="h" > <a name="2010">2010</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 7710 </td> <td class="s"> $sx = length($more) > 0; </td> </tr> <tr> <td class="h" > <a name="2011">2011</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2012">2012</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 17444 </td> <td class="s"> my $fmt = sprintf("%%s%%-%ds%%s",$cell_width); </td> </tr> <tr> <td class="h" > <a name="2013">2013</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 10372 </td> <td class="s"> put $fmt,$prefix->[$px],$v,$suffix->[$sx]; # output something (could be blanks) </td> </tr> <tr> <td class="h" > <a name="2014">2014</a> </td> <td class="c3" > 3983 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 35665 </td> <td class="s"> $sx; # leave wrapped flag </td> </tr> <tr> <td class="h" > <a name="2015">2015</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2016">2016</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2017">2017</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="2018">2018</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2019">2019</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 center </td> </tr> <tr> <td class="h" > <a name="2020">2020</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2021">2021</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Center a string within a given width. </td> </tr> <tr> <td class="h" > <a name="2022">2022</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2023">2023</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$field> = B<center> I<$string>, I<$width>; </td> </tr> <tr> <td class="h" > <a name="2024">2024</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2025">2025</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2026">2026</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2027">2027</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub center { </td> </tr> <tr> <td class="h" > <a name="2028">2028</a> </td> <td class="c3" > 340 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2028-1"> 340 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2028-1"> 0 </a> </td> <td > 951 </td> <td class="s"> my($string,$width) = @_; </td> </tr> <tr> <td class="h" > <a name="2029">2029</a> </td> <td class="c3" > 340 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#2029-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1703 </td> <td class="s"> $width = 0 if !defined($width); </td> </tr> <tr> <td class="h" > <a name="2030">2030</a> </td> <td class="c3" > 340 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#2030-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 895 </td> <td class="s"> return $string if length($string) >= $width; </td> </tr> <tr> <td class="h" > <a name="2031">2031</a> </td> <td class="c3" > 280 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 675 </td> <td class="s"> my($pad) = int(($width - length($string))/2); # pad left half </td> </tr> <tr> <td class="h" > <a name="2032">2032</a> </td> <td class="c3" > 280 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 9787 </td> <td class="s"> my($center) = (' ' x $pad) . $string; </td> </tr> <tr> <td class="h" > <a name="2033">2033</a> </td> <td class="c3" > 280 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 377 </td> <td class="s"> $pad = $width - length($center); </td> </tr> <tr> <td class="h" > <a name="2034">2034</a> </td> <td class="c3" > 280 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 625 </td> <td class="s"> $center .= ' ' x $pad; # pad right half </td> </tr> <tr> <td class="h" > <a name="2035">2035</a> </td> <td class="c3" > 280 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 909 </td> <td class="s"> $center; # return with the centered string </td> </tr> <tr> <td class="h" > <a name="2036">2036</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2037">2037</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2038">2038</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="2039">2039</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2040">2040</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 max </td> </tr> <tr> <td class="h" > <a name="2041">2041</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2042">2042</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Compute the maximum value from a list of values. </td> </tr> <tr> <td class="h" > <a name="2043">2043</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2044">2044</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$max> = B<&max>( I<@values> ); </td> </tr> <tr> <td class="h" > <a name="2045">2045</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2046">2046</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2047">2047</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2048">2048</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub max { </td> </tr> <tr> <td class="h" > <a name="2049">2049</a> </td> <td class="c3" > 153 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2049-1"> 153 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2049-1"> 0 </a> </td> <td > 518 </td> <td class="s"> my ($max) = shift; </td> </tr> <tr> <td class="h" > <a name="2050">2050</a> </td> <td class="c3" > 153 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#2050-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1391 </td> <td class="s"> foreach (@_) { $max = $_ if $max < $_; } </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 249 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2406 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2051">2051</a> </td> <td class="c3" > 153 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 551 </td> <td class="s"> $max; </td> </tr> <tr> <td class="h" > <a name="2052">2052</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2053">2053</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2054">2054</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="2055">2055</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2056">2056</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 min </td> </tr> <tr> <td class="h" > <a name="2057">2057</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2058">2058</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Compute the minum value from a list of values. </td> </tr> <tr> <td class="h" > <a name="2059">2059</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2060">2060</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$min> = B<&min>( I<@values> ); </td> </tr> <tr> <td class="h" > <a name="2061">2061</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2062">2062</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2063">2063</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2064">2064</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub min { </td> </tr> <tr> <td class="h" > <a name="2065">2065</a> </td> <td class="c3" > 1690 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2065-1"> 1690 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2065-1"> 0 </a> </td> <td > 7956 </td> <td class="s"> my ($min) = shift; </td> </tr> <tr> <td class="h" > <a name="2066">2066</a> </td> <td class="c3" > 1690 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#2066-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 3234 </td> <td class="s"> foreach (@_) { $min = $_ if $min > $_; } </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 1690 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 8310 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2067">2067</a> </td> <td class="c3" > 1690 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 5964 </td> <td class="s"> $min; </td> </tr> <tr> <td class="h" > <a name="2068">2068</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2069">2069</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2070">2070</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="2071">2071</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2072">2072</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 max_length </td> </tr> <tr> <td class="h" > <a name="2073">2073</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2074">2074</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Compute the maximum length of a set of strings in an array reference. </td> </tr> <tr> <td class="h" > <a name="2075">2075</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2076">2076</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$maxlength> = B<&max_length>( I<\@array_ref> ); </td> </tr> <tr> <td class="h" > <a name="2077">2077</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2078">2078</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2079">2079</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2080">2080</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub max_length { </td> </tr> <tr> <td class="h" > <a name="2081">2081</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2081-1"> 37 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2081-1"> 0 </a> </td> <td > 140 </td> <td class="s"> my($aref) = shift; </td> </tr> <tr> <td class="h" > <a name="2082">2082</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 101 </td> <td class="s"> my(@lens) = map { length } @$aref; </td> </tr> <tr> <td class="h" > <a >&nbsp;</a> </td> <td class="c3" > 170 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 472 </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2083">2083</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 215 </td> <td class="s"> my($maxlen) = max( @lens ); </td> </tr> <tr> <td class="h" > <a name="2084">2084</a> </td> <td class="c3" > 37 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 189 </td> <td class="s"> $maxlen; </td> </tr> <tr> <td class="h" > <a name="2085">2085</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2086">2086</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2087">2087</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="2088">2088</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2089">2089</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 htmltext </td> </tr> <tr> <td class="h" > <a name="2090">2090</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2091">2091</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Translate regular text for output into an HTML document. This means </td> </tr> <tr> <td class="h" > <a name="2092">2092</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> certain characters, such as "&", ">", and "<" must be escaped. </td> </tr> <tr> <td class="h" > <a name="2093">2093</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2094">2094</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >I<$output> = B<&htmltext>( I<$input> [, I<$allflag> ] ); </td> </tr> <tr> <td class="h" > <a name="2095">2095</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2096">2096</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> If I<$allflag> is non-zero, then all characters are escaped. Normally, </td> </tr> <tr> <td class="h" > <a name="2097">2097</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> only the four HTML syntactic break characters are escaped. </td> </tr> <tr> <td class="h" > <a name="2098">2098</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2099">2099</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2100">2100</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2101">2101</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # htmltext -- translate special text into HTML esacpes </td> </tr> <tr> <td class="h" > <a name="2102">2102</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub htmltext { </td> </tr> <tr> <td class="h" > <a name="2103">2103</a> </td> <td class="c3" > 935 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2103-1"> 935 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2103-1"> 0 </a> </td> <td > 2153 </td> <td class="s"> local($_) = shift; </td> </tr> <tr> <td class="h" > <a name="2104">2104</a> </td> <td class="c3" > 935 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1283 </td> <td class="s"> my $all = shift; </td> </tr> <tr> <td class="h" > <a name="2105">2105</a> </td> <td class="c3" > 935 </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--branch.html#2105-1"> 50 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 2897 </td> <td class="s"> return undef unless defined($_); </td> </tr> <tr> <td class="h" > <a name="2106">2106</a> </td> <td class="c3" > 935 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1535 </td> <td class="s"> s/&(?!(?:amp|quot|gt|lt|#\d+);)/&amp;/g; </td> </tr> <tr> <td class="h" > <a name="2107">2107</a> </td> <td class="c3" > 935 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1133 </td> <td class="s"> s/\"/&quot;/g; </td> </tr> <tr> <td class="h" > <a name="2108">2108</a> </td> <td class="c3" > 935 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1242 </td> <td class="s"> s/>/&gt;/g; </td> </tr> <tr> <td class="h" > <a name="2109">2109</a> </td> <td class="c3" > 935 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1700 </td> <td class="s"> s/</\&lt;/g; </td> </tr> <tr> <td class="h" > <a name="2110">2110</a> </td> <td class="c3" > 935 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#2110-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1898 </td> <td class="s"> if ($all) { </td> </tr> <tr> <td class="h" > <a name="2111">2111</a> </td> <td class="c3" > 75 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 161 </td> <td class="s"> s/ /\&#32;/g; </td> </tr> <tr> <td class="h" > <a name="2112">2112</a> </td> <td class="c3" > 75 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 111 </td> <td class="s"> s/\t/\&#09;/g; </td> </tr> <tr> <td class="h" > <a name="2113">2113</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2114">2114</a> </td> <td class="c3" > 935 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 1828 </td> <td class="s"> $_; </td> </tr> <tr> <td class="h" > <a name="2115">2115</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2116">2116</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2117">2117</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="2118">2118</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2119">2119</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 out </td> </tr> <tr> <td class="h" > <a name="2120">2120</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2121">2121</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Print text followed by a newline. </td> </tr> <tr> <td class="h" > <a name="2122">2122</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2123">2123</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<out> I<$fmt> [, I<@text> ]; </td> </tr> <tr> <td class="h" > <a name="2124">2124</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2125">2125</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2126">2126</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2127">2127</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub out { </td> </tr> <tr> <td class="h" > <a name="2128">2128</a> </td> <td class="c3" > 4041 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2128-1"> 4041 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2128-1"> 0 </a> </td> <td > 7807 </td> <td class="s"> my $fmt = shift; </td> </tr> <tr> <td class="h" > <a name="2129">2129</a> </td> <td class="c3" > 4041 </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--branch.html#2129-1"> 100 </a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 14108 </td> <td class="s"> $fmt .= "\n" unless $fmt =~ /\n$/; </td> </tr> <tr> <td class="h" > <a name="2130">2130</a> </td> <td class="c3" > 4041 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > 116426 </td> <td class="s"> printf STDOUT $fmt, @_; </td> </tr> <tr> <td class="h" > <a name="2131">2131</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2132">2132</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2133">2133</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="2134">2134</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2135">2135</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 put </td> </tr> <tr> <td class="h" > <a name="2136">2136</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2137">2137</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Print text (without a trailing newline). </td> </tr> <tr> <td class="h" > <a name="2138">2138</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2139">2139</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> S< >B<out> I<$fmt> [, I<@text> ]; </td> </tr> <tr> <td class="h" > <a name="2140">2140</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2141">2141</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2142">2142</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2143">2143</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> sub put { </td> </tr> <tr> <td class="h" > <a name="2144">2144</a> </td> <td class="c3" > 4445 </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="c3" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2144-1"> 4445 </a> </td> <td class="c0" > <a href="blib-lib-Data-ShowTable-pm--subroutine.html#2144-1"> 0 </a> </td> <td > 91780 </td> <td class="s"> printf STDOUT @_; </td> </tr> <tr> <td class="h" > <a name="2145">2145</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2146">2146</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2147">2147</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> ############################## </td> </tr> <tr> <td class="h" > <a name="2148">2148</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2149">2149</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 AUTHOR </td> </tr> <tr> <td class="h" > <a name="2150">2150</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2151">2151</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Alan K. Stebbens <aks@stebbens.org> </td> </tr> <tr> <td class="h" > <a name="2152">2152</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2153">2153</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2154">2154</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2155">2155</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =head1 BUGS </td> </tr> <tr> <td class="h" > <a name="2156">2156</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2157">2157</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =over 10 </td> </tr> <tr> <td class="h" > <a name="2158">2158</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2159">2159</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="2160">2160</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2161">2161</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> Embedded HTML is how the user can insert formatting overrides. However, </td> </tr> <tr> <td class="h" > <a name="2162">2162</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> the HTML formatting techniques have not been given much consideration -- </td> </tr> <tr> <td class="h" > <a name="2163">2163</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> feel free to provide constructive feedback. </td> </tr> <tr> <td class="h" > <a name="2164">2164</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2165">2165</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="2166">2166</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2167">2167</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2168">2168</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> &nbsp; </td> </tr> <tr> <td class="h" > <a name="2169">2169</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2170">2170</a> </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td > &nbsp; </td> <td class="s"> 1; </td> </tr> </table> </body> </html>