#!/usr/bin/perl # # use strict; use warnings; my $time = "123456.745768"; my $time2 = "123456.745768"; $time =~ s/^(\d{2})(\d{2})(\d{2})\.(\d{2})\d{4}/$1:$2:$3.$4/; $time2 =~ s/^(\d{2})(\d{2})(\d{2})\.(\d{2})\d*$/$1:$2:$3.$4/; print "$time\n"; print "$time2\n";
In reply to Re: A would-be simple substitution...
by Anonymous Monk
in thread A would-be simple substitution...
by GaijinPunch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |