| Next | Welcome to my ~/bin | 19 |
#!/usr/bin/perl
if (@ARGV) {
for (@ARGV) {
print show_localtime($_), "\n";
}
} else {
while (<>) {
s/^(\d+)/show_localtime($1)/e;
print;
}
}
sub show_localtime {
my $t = shift;
scalar localtime $t;
}
What could be simpler?
| Next | Menu | ![]() |
Copyright © 2005 M. J. Dominus |