in reply to Database Layout

This is what splice is for.
my @list = 1..30; while (@list) { print join "\t", splice(@list, 0, 4); print "\n"; }

Replies are listed 'Best First'.
Re: Re (tilly) 1: Database Layout
by biograd (Friar) on Feb 01, 2002 at 04:13 UTC
    This is something I've had on low priority for my own script recently. I did sort of what tilly did but in the messy C-style way with nested for loops. (forgive me please..it was just something to hold over until I got other things done) Problem is that not all entries are the same length, so tabbing doesn't ensure even columns.

    I was wondering whether the @<<<<< formatting placeholders might work for this? I skimmed Chapter7 of Programming Perl, but I confess I haven't studied it carefully yet.