Solved

delete remote files with wild card

Posted on 2004-09-24
2
860 Views
Last Modified: 2008-02-26
 $ftp->delete("*.old");

*.old: The filename, directory name, or volume label syntax is incorrect.
0
Comment
Question by:matgold
2 Comments
 
LVL 5

Accepted Solution

by:
ZiaTioN earned 25 total points
ID: 12145672
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
 

Author Comment

by:matgold
ID: 12145850
ok I was hoping that I could.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Filtering a file to table 9 101
How to search multiple patterms in a file with perl? 4 82
iSeries PERL Scripts 7 172
Edit Odbc.ini using perl module 2 90
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question