that doesn't really work. if you have a large list and don't want to spell out each individual elements, try generating the format list yourself and then just eval it in run time like:
#!/usr/bin/perl -w use strict; my @a = (1..5); my $eval = <<'START'; format FM = ========================= a b c d ========================= START $eval .= "\@###.##\t" x @a . "\n"; foreach my $i (0..$#a){ $eval .= "\$a[$i],"; } $eval .= "\n.\n \$~ = 'FM'; write;"; eval $eval; __END__ as you can see, this is very mess too but if you have a large list, this should help in some degree :-) david Mandar Rahurkar wrote: > Hi, > I wrote perl script so as to have a formatted list however it doesnt > work.It cant take a list as its value.It has to be $variable. Does anyone > know a workaround. > > Many Thanks > Mandar > > format TABLE = > > =================================================================================== > A B C D E F G > > =================================================================================== > @###.## @###.## @###.## @###.## @###.## @###.## > @###.## > @pitcha, @pitchb, @pitchc, @pitchd, @pitche, @pitchf, > @pitchg > > =================================================================================== > .. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]