On Wed, Aug 06, 2003 at 11:49:20PM -0400, perlwannabe wrote:
> I have made the script as simple as possible and cannot get 
> unlink to work.
> 
> unlink ("c:\testdir\*030977*.*") || die "unlink failed: $!";

You'd need to expand the wildcards yourself:

  my $pat = 'c:\testdir\*030977*.*';
  foreach (glob($pat)) {
      unlink or warn "Couldn't unlink '$_': $!";
  }

And be careful with double-quotes and backslashes.

> I have even simplified further using a file "test.txt" and
> using unlink ("test.txt");  this also failed.

What was the error this time?

(Maybe you're in the wrong directory.)

-- 
Steve

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to