Hi Maxim,
> no :) you forgot to escape backslash. but there is no difference > between \ and / slashes in path names in perl for windows. > Thanks for this. I use perl on a Linux box, and there I use a /. > second, unlink <$_path/*> does not works. > No. here's a small perl prog I wrote to test this: #!/usr/bin/perl -w $_dir = "/tmp/dummy/"; unlink <$_dir/*> if -r $_dir; exit; This prog worked on v5.6.1 built for i386-linux. Best, -tir --------------------------------------- > Hello Tirthankar, > > Tuesday, December 04, 2001, Tirthankar C. Patnaik <[EMAIL PROTECTED]> wrote: > > TCP> You might want to check the permissions of those files. > > TCP> The command works fine here. > TCP> But I guess the mistake is that you're working on Windows, and there you have > TCP> a back-slash ( \ ) instead of a slash ( / ). > TCP> Try this: > > TCP> my ($_path) = "c:\EventLogs"; > TCP> unlink <$_path/*> if -r $_path; > > TCP> This should work. > no :) you forgot to escape backslash. but there is no difference > between \ and / slashes in path names in perl for windows. > second, unlink <$_path/*> does not works. > can be > my $_path = "c:/EventLogs"; > if( -d $_path ) > { > chdir $_path; > unlink <*> or die $!; > } > > Best wishes, > Maxim mailto:[EMAIL PROTECTED] > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Tirthankar, IGIDR. +91-22-8400919 x275 (r), x593(o), x(542), +91-22-8421206 (r) http://www.igidr.ac.in/~tir And love will last as pure and whole As when he loved me here in Time, And at the spiritual prime Rewaken with the dawning soul. -Tennyson, Lord Alfred. (In Memoriam A.H.H.) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]