in reply to Re^2: Perl Regex \A or ^ Not Working
in thread Perl Regex \A or ^ Not Working

If you had used Data::Dumper to look at @dir_files like I suggested, you'd see strings such as "-rw-rw---- 1 xupromgr xupromgr           10 Feb 27 14:08 auditsample.txt", which won't match the regex /^audit/. Try using the command $ftp->ls instead of $ftp->dir to list files, this should give you a listing consisting of file names only.

You should always Use strict and warnings, and see also the Basic debugging checklist.

Replies are listed 'Best First'.
Re^4: Perl Regex \A or ^ Not Working
by thundercat (Novice) on Mar 29, 2019 at 13:54 UTC
    Thanks, changing to ls did it
Re^4: Perl Regex \A or ^ Not Working
by thundercat (Novice) on Mar 29, 2019 at 17:18 UTC

    Thanks changing to ls worked.