What is the best way to convert yyyymmddhhmmss to YYYY-MM-DD hh:mm:ss and back in perl?
for example: 20130218165601 to 2013-02-18 16:56:01 and back? (can https://met
without regular expressions, you can just use substr to grab the characters you want:
substr
$year = substr $d, 0, 4; $month = substr $d, 4, 2; ... $secs = substr $d, 12, 2;