[Israel.pm] Unlink v/s deletion

Srikanth Madani srikanth.madani at vodafone.com
Mon Feb 16 04:12:30 PST 2004


Hi,

I wanted to not use the rm command (not to make the program OS independent,
just to make it $PATH independent!), and so, used the following code:

my $deleted = unlink ('$fifo_dir/$pipe');
#I also tried to chdir to $fifo_dir, and pass just $pipe to unlink.
if (!$deleted) {
	print "\n$0: Fatal error: Unable to unlink pipe $pipe in directory
$fifo_dir.";
	exit 1;
}


And it doesn't delete it.

The file I'm trying to unlink is:

naxos3!ccmn:~/fifo [113]> ls -lgo done.build.mnb360.4mng
prw-rw----   1       0 Feb 13 03:33 done.build.mnb360.4mng|


I run the script as owner of this pipe. If I use the
	system qq(rm -f $pipe);
it works fine.


What am I missing? I'm using Perl 5.005_03 on SunOS 5.8.

Thanks,
Srikanth

Srikanth Madani
Software Configuration Management (CC) [TATS Take Over]
+49-211-533-8461 srikanth.madani at vodafone.com
Ericsson Building E4-33; Fritz-Vomfelde-Stra?e 14. D?sseldorf.
Larry Wall on Perl 6 : We're working on it, slowly but surely...or
not-so-surely in the spots we're not so sure.




More information about the Perl mailing list