in reply to Re: Help in formating the output
in thread Help in formating the output

Thanks for pointing out that. I have tried this...
foreach my $ts ($te->table_states) { foreach my $row ($ts->rows) { if ($row !~ "disabled"){ my @users = split /,/,$row->[1]; foreach (@users) { print "$row->[0],$_ \n"; } } } }
and this is working but can these loops simplified....?

Replies are listed 'Best First'.
Re^3: Help in formating the output
by moritz (Cardinal) on Jan 13, 2009 at 11:43 UTC
    You can get rid of the temporary variable by writing
    for my $row (split /,/, $row->[1]) { ...

    But apart from that it doesn't look bloated, so there's no need to simplify them further.