Yes, that is awesome... I would never have come up with something that concise. on a side note, i noticed that when the last line is changed from:
unlink @files or die $!;
to:
unlink @files || die $!;
it runs without any errors, but does not delete anything. what is the difference between or and ||? or, is it all in my imaginition? Much Thanks,
See perldoc perlop. || has a rather
high precedence. or is lower. When using
the former, it's as if you'd written
unlink(@files || die $!)
which will never die as long as @files is true.