You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/usr/bin/perl -w
|
|
|
|
use strict;
|
|
|
|
log_warning("A", "B");
|
|
log_warning("C");
|
|
log_warning();
|
|
|
|
sub log_warning {
|
|
my $message = shift || "Something's wrong";
|
|
my $time = shift || localtime; # Default to now.
|
|
print "[$time] $message\n";
|
|
}
|