Re: unlink output of printf

2003-08-21 Thread John W. Krahn
Ronen Kfir wrote: > > I need to delete oldest modified file in a directory. I find this file with this: > > my $oldest= printf "%s\n", (sort{ (-M $b) <=> (-M$a) } glob("v:\*")); > print $oldest; > > unlink "$oldest"; > > What I get in response is: > > oldest_filename > 1 > > File is not delet

unlink output of printf

2003-08-21 Thread Ronen Kfir
I need to delete oldest modified file in a directory. I find this file with this: my $oldest= printf "%s\n", (sort{ (-M $b) <=> (-M$a) } glob("v:\*")); print $oldest; unlink "$oldest"; What I get in response is: oldest_filename 1 File is not deleted. How would I do it? ?Ronen Kfir System