How to check if the date is in format 'YYYYMMDD' and replace it with 'YYMMDD'. 20070820 is in YYYYMMDD, is to replaced with 070820. 070223 is already in the format YYMMDD, so I should not replace it. Please tell me how to replace it.#!/usr/bin/perl while(<DATA>){ s/^\d\d//g; print $_; } __DATA__ 20070820 070223 20080929
In reply to date replace by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |