--At 4/15/02 4:25 PM -0500, PK Eidesis wrote:
>sub makeCalendar {
> $type = @_;
> if($type eq "month") {
> print "all the code for a monthly calendar";
> elsif($type eq "week") {
> print "all the code for a weekly calendar";
> elsif($type eq "year") {
> print "all the code for a yearly calendar";
> }
>}
Personally, I'd change all those prints to returns - that way all of
the following will work:
print STDOUT makeCalendar("week");
print $SOME_OTHER_HANDLE makeCalendar("week");
my $four_weeks_in_a_row = undef;
foreach (0..3) {
$four_weeks_in_a_row .= makeCalendar("week");
}
Ryan