I have a group of files I need to delete. They have a format like this.
c:\game\data\(variable)info.file(variable)
the actual file name is c:[EMAIL PROTECTED]
I need to delete all files in this directory with the partial name of "info.file" where the (variable) is a wildcard.
In dos it would be *file*.*
What is it in perl?
I found the delete command as "unlink" $gamedata="?player.dat?"; unlink($gamedata);
perldoc -f unlink perldoc -f glob
This is generally handled with either a fileglob as the above docs indicate or by using a loop with opendir,readdir...
perldoc -f opendir perldoc -f readdir
will this delete the file on the players computer or on my server???? I want it to delete the file on the players computer.
Back up a minute... where is the script? Since you are posting in a CGI forum, if the script is server side it won't delete it from the 'players' computer...but then how did it get created there in the first place? We are going to need more info about what you are doing, be careful with the client/server model.... You may also want to consider:
use taint; (perldoc taint)
http://danconia.org
Thanks for your help.
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
