in reply to Using HoH data in formats

format STDOUT_TOP = ... ...
Interesting, I didn't know you could do this with perl. This is all called when write is called?

The two other things that jumped out at me:

Why not $list{$cust}{$money} += $amount instead of $list{$cust}->{$money} += $amount? The -> isn't really necessary.

Where you you compute $list{$cust}->{prior}? I don't see it anywhere else in the code, save the place where you try to print it.

Update: Oh, I'm an idiot. $money is set to prior by the function call. /me slaps forehead and slinks away....

Cheers,
ibanix

$ echo '$0 & $0 &' > foo; chmod a+x foo; foo;

Replies are listed 'Best First'.
Re: Re: Using HoH data in formats
by Popcorn Dave (Abbot) on Dec 20, 2002 at 04:53 UTC
    Yep. You can set all that stuff to be printed in that 'format' when the write command is called. From what the docs say, it's sort of like nroff for Perl. Never having used nroff I can't say, but for my application currently, I do need it.

    Mutters something unintelligeble about having to output to a dot matrix printer...

    There is no emoticon for what I'm feeling now.