delete remote files with wild card

 $ftp->delete("*.old");

*.old: The filename, directory name, or volume label syntax is incorrect.
matgoldAsked:
Who is Participating?
 
ZiaTioNConnect With a Mentor Commented:
You cannot really use wild cards so probably the easiest way to do this would be the following:

my @files = $ftp->ls();
for (@files) { $ftp->delete("$_") if (/\.old$/); }
0
 
matgoldAuthor Commented:
ok I was hoping that I could.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.