in reply to Onliner magic to remove files

It is equivalent to:

for( glob("*") ) { stat $_; # Useless code unlink $_; }

- tye        

Replies are listed 'Best First'.
Re^2: Onliner magic to remove files (useless)
by mr.nick (Chaplain) on Dec 23, 2014 at 20:04 UTC
    Thanks, Tye. I've been struggling to figure out what the stat() did myself. I was currently exploring that maybe stat threw some sort of error on an unreadable file, directory or something and that would prevent the evaluation of the right hand expression, but all my tests ALWAYS evaluated both sides regardless.

    mr.nick ...