in reply to Re: Finding array element
in thread Finding array element

There's no need for a regex here, and the math is doubly overkill. Let's use my favorite underrated function, the transliteration operator:
my $date = "2001-03-28"; (my $d2 = $date) =~ tr/-//d;