I get the following output when I execute the perl script below. Can
anyone tell me what changes I can make to the scipt so that the columns
will line up neatly?
01
'3', undef, 'Blue Island', 'IL', 'Grinnell', 'IA', '550.00', '267.00'
'45', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'46', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'47', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'48', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'49', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'50', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'51', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'52', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'53', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'54', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'55', '2000-03-31', 'Zanesville', 'OH', 'Blue Island', 'IL', '575.00',
'357.00'
'57', '2000-03-31', 'Blue Island', 'IL', 'Dubuque', 'IA', '525.00',
'177.00'
'61', '0000-00-00', 'Dixmoor', 'IL', 'Greenville', 'TX', '1200.00',
'869.00'
'62', '0000-00-00', 'Dixmoor', 'IL', 'Mounds', 'IL', '535.00', '441.00'
15 rows
15DBD::mysql::st fetch failed: fetch() without execute() at
/usr/lib/perl5/site_perl/DBI.pm line 581, <STDIN> chunk 4.
0 rows (19: fetch() without execute())
system("clear");
use DBI;
my $db = DBI->connect("DBI:mysql:test",root,5492);
my $query = "SELECT qteno, qtedate, orgcity, orgstate, dstcity,
dststate , price, miles
FROM oldqts WHERE (custno = $SearchFor)";
my $oldqts_output = $db->prepare($query);
$oldqts_output->execute;
write;
print DBI::dump_results($oldqts_output);
# Print the output in a neat table.
open(OLDQTS,">>oldqts");
print DBI::dump_results($oldqts_output,\*OLDQTS);
# Print the output again into the file 'oldqts'.
$db->disconnect;
}
format STDOUT =
@<<<<<<<<
@<<<<<<<<<<<<<<
@<<<<<<<<<< @<<<<<<<<
@<<<<<<
print DBI::dump_results($oldqts_output,\*OLDQTS);
.
| Thread |
|---|
| • Format question | Richard Reina | 9 Apr |