in reply to print dropping a line?

You're getting snarled up in indexes. In perl it is better to print arrays as single arguments, forming a list argument for print. You can sort on the fly before printing. Since you want newlines between fields, we'll change the output field seperator to suit.

{ local $, = "\n"; print sort @{$Tests{$test}}; }

Update You appear to have a foreach () {} else {} construct there. Is this really the code that's dropping a line? What you show shouldn't compile.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: print dropping a line?
by edoc (Chaplain) on Jun 02, 2003 at 02:20 UTC

    the "hidden" '}' at the end of:

    else {print "@{ $Tests{$test} }\n";}

    means it's valid.. maybe not correct, but I don't think it's got to do with the problem..

    cheers,

    J

Re: Re: print dropping a line?
by Anonymous Monk on Jun 02, 2003 at 00:55 UTC
    Tried your code, and I still get the same thing.
    The last line still isn't printing.

    Thanks