Nov 18, 2017, 3:28 PM
Re: [tester_V] delete the newest file from the list
The code works great if it is used with this input: If you're reading your filenames from a file, then you need to use chomp to remove the trailing newline character from the input before you use stat on them.
my @files = qw /
but if the lines are inside the "Flow.txt" file then the code sorts the lines but produces 2 types of error:
Unsuccessful stat on filename containing newline at...
Use of uninitialized value in numeric comparison (<=>) at C:....
But, as I said before, I doubt it is a good idea to use stat for your purpose.
BTW, where did you get the idea of using stat from? From your other question, it seems you don't understand what it does.
Did you post on another forum?
(This post was edited by Laurent_R on Nov 18, 2017, 3:31 PM)