http://www.perlmonks.org?node_id=436415


in reply to To Pattern Match or not to Pattern Match

Your first attempt at matching doesn't include the surrounding //s for your pattern. Not sure if that's what's troubling you.

Incidentally, the more perlesque way to write your for loop is

for my $user_id (@cdwv_list) {

Caution: Contents may have been coded under pressure.