Next | Trivial Utilities | 27 |
#!/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 © 2012 M. J. Dominus |