Please help me to rectify the cript below , I am a novice to perl.
Thanks.
chomp($value = <STDIN>); if($value =~ /(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.] \d\d +\d\d)/) { print "date"; }else{ print $value; print "not a date"; }
I changed the delimiter , Thanks for help , but still it moves to not a date , even if I enter a valid date
Edit: g0n - formatting and code tags
In reply to Problem in date checking script by garyprmr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |