This how-to comes with no guaratees other than the fact that these code segments were copy/pasted from code that I wrote and ran successfully.
Solution
format FORMAT_EXPIRED_ACCOUNTS = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<| @<<<<<<<<<<<<<<<<<<<<<<<<| @<<<<<<<<<<< $realname, $studentno, $login .
Solution
sub output_formatted_to_screen { my $arrayref = shift; $~ = 'FORMAT_EXPIRED_ACCOUNTS'; for ( @$arrayref ) { $realname = $_->[0] ? $_->[0] : 'NULL'; $studentno = $_->[1] ? $_->[1] : 'NULL'; $login = $_->[2] ? $_->[2] : 'NULL'; write(); } }
Alex BATKO <abatko AT cs.mcgill.ca>
http://www.cs.mcgill.ca/~abatko/computers/programming/perl/howto/