my log_msg_1 {
my $FH = shift;
my $msg = shift;
print $FH $msg;
}
my log_msg_2 {
my ($FH, $msg) = @_;
print $FH $msg;
}
####
my sub log_msg ($FH, $msg, @args) {
print $FH $msg, @args;
}
##
##
sub log_msg {
my ($FH, $msg, @args) = @_;
print $FH $msg, @args;
}
##
##
#!/usr/bin/perl
use strict;
use warnings;
use POSIX qw(strftime);
printit("Foo", "bar", "baz");
log_time("Foo", "bar");
sub log_time {
my $time=strftime "%H:%M:%S :", localtime;
unshift @_, $time;
&printit;
}
sub printit {
my (@args) = @_;
print join(" ",@args), "\n";
}