- or download this
my %Templates = (
header=>q{
...
# Now you can use it like:
print get_template('header');
- or download this
sub help {
my $NAME = $_[0];
...
here-document terminator:
HELP_TEXT
}
- or download this
sub gettime {
my ($sec,$min,$hr,$day,$mon,$yr,$dayOfWeek) = localtime();
...
return "$weekDays[$dayOfWeek] $mon/$day/$yr $hr:$min:$sec";
}
- or download this
sub print_tempDB_report_from_file {
my ($DB_FName, $RPT_FName) = @_;
...
return $text;
}
- or download this
# Startup
...
set_static_configuration();
# Do the work
- or download this
switch (c) {
case 'A': do_this();
...
break;
case 'C': do_this() && do_that();
}