LA.pm: Prepend
Douglas Wilson
dgwilson at gtemail.net
Fri Oct 5 18:37:26 CDT 2001
> >my ($records, $out);
> >while (my $hashref = $sth->fetchrow_hashref) {
> > $records++;
> > $out .= $hashref->{'Data'} . "\n";
> >}
> >
> >print FILE $records . "\n";
> >print FILE $out;
Hmm, you could print a blank line with about 10 spaces
to begin, print all your records, then seek back to
the beginning of the file and print the number of
records without a newline.
As long as the number isn't over a gazillion and you
don't mind some blank spaces after the number, it
should work. You could even format the number to be
right justified within those 10 spaces with sprintf.
-Doug
--
_______________________________________________
Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free!
http://www.net2phone.com/cgi-bin/link.cgi?143
More information about the Losangeles-pm
mailing list