[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Fumbling with formats and IO:Handle.



On Sep 4, 2008, at 8:39 PM, Dave Thacker wrote:
Objective.
Read a list of records out of a database table and generate a series of roster
files.  Each file should have an identical two line header.

Since I don't have your database and don't have "$rootdir/teams.dir" I can't debug your source.

Why use format at all? Instead of this

format RF =
@<<<<<<<<<<<  @< @<< @< @< @< @< @<
$name, $age, $nat, $st, $tk, $ps, $sh, $agg
.


Try this?

printf(
   "%12s  %2s %3s %2s %2s %2s %2s %2s\n",
   $name, $age, $nat, $st, $tk, $ps, $sh, $agg
);

Since the _TOP magic isn't working the way you want it, don't use format? You can run sprintf or printf whenever you want.

Or if you *really* want to use formats, can you post a demo of your problem w/o other dependencies?

HTH,

j