Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Output:foreach $test (keys %Tests) { print "Test and students are\n $test:\n"; $" = "\n"; # Only do the sort and join with newlines # if there's more than one student. if (@{ $Tests{$test} } > 1){ @tempvar1 = sort( @{ $Tests{$test} }); $i = 0; #Making sure everything is sorted, and will #actually print. Had problems with lines being #dropped. $tempvar = @{ $Tests{$test} }; print $tempvar, "\n"; while ($i < @{ $Tests{$test} }){ print $Tests{$test}[$i]; print "\n"; $i++; } $tempvar2 = @tempvar1; print $tempvar2, "\n"; print "@tempvar1"; # print $tempvar1 . "hello\n"; # print join("|", sort @{ $Tests{$test} }); } else {print "@{ $Tests{$test} }\n";} print ",,,,,,,,,\n,,,,,,,,,\n"; }
Test and students are
Development:
4
"Drayton, xxx",,3 Years and 7 Months,,,,,,
"Areen, xxx",,3 Years and 9 Months,,,,,,
"Lyles, xxx",,4 Years and 0 Months,,,,,,
"Coleman, xxx",,3 Years and 9 Months,,,,,,
4
"Areen, xxx",,3 Years and 9 Months,,,,,,
"Coleman, xxx",,3 Years and 9 Months,,,,,,
"Drayton, xxx",,3 Years and 7 Months,,,,,,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: print dropping a line?
by tedrek (Pilgrim) on Jun 02, 2003 at 01:52 UTC | |
by edoc (Chaplain) on Jun 02, 2003 at 01:59 UTC | |
|
Re: print dropping a line?
by Zaxo (Archbishop) on Jun 02, 2003 at 00:30 UTC | |
by edoc (Chaplain) on Jun 02, 2003 at 02:20 UTC | |
by Anonymous Monk on Jun 02, 2003 at 00:55 UTC | |
|
Re: print dropping a line?
by halley (Prior) on Jun 02, 2003 at 14:41 UTC | |
by Anonymous Monk on Jun 02, 2003 at 18:55 UTC |