in reply to Help in formating the output

So you need to split $row->[1] on a comma, and for each of the result print that and $row->[0].

Given that you've managed to get as far as you did, that doesn't sound too complicated - just try it, and if you can't make it, come back and show us what you've tried.

Replies are listed 'Best First'.
Re^2: Help in formating the output
by Anonymous Monk on Jan 13, 2009 at 10:49 UTC
    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....?
      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.