in reply to Perl Regex \A or ^ Not Working
Works for me. Here's an SSCCE:
use strict; use warnings; use Test::More tests => 1; my @dir_files = ('audit', 'notanaudit'); my @want = ('audit'); @dir_files = grep { /^audit/ } @dir_files; is_deeply \@dir_files, \@want;
|
|---|