rsFalse has given you a good general-purpose answer. However, since you are manipulating dates, you could always use a date module such as the core module Time::Piece.
use strict; use warnings; use Time::Piece; use Test::More tests => 1; my $date = '3-15-1932'; my $want = '1932-03-15'; my $have = Time::Piece->strptime ($date, '%m-%d-%Y')->date; is $have, $want;
🦛
In reply to Re: Using sprintf in regular expression.
by hippo
in thread Using sprintf in regular expreession.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |