perl Script acting strange.
Hi,
This script needs to show directories older than certain time (ARGV[1]) It works fine till the values 1 to 9, directory count decreases. How ever if I do 10 as an arg. direcory no. increases. It more then with "9" 0r "4". Here is the code: Code:
Any Ideas? |
That's because you're comparing string values, not
numbers ... think ASCII values. |
Quote:
|
Just change the comparison from ge to >= ...
perl isn't a typed language. |
All times are GMT -5. The time now is 03:20 AM. |