in reply to Convert time string to seconds
What do you think how the code could be rewritten to avoid these warnings?
Use no warnings 'uninitialized';
in the inner scope where you do the arithmetics.
That tells the reader of your code knows exactly that the undef being interpreted as 0 is intentional. The effect of the "no warnings" is limited to the scope it is in, so there's no harm for the program as a whole.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Convert time string to seconds
by SuicideJunkie (Vicar) on Aug 16, 2010 at 13:35 UTC | |
by moritz (Cardinal) on Aug 16, 2010 at 13:51 UTC | |
by SuicideJunkie (Vicar) on Aug 16, 2010 at 14:17 UTC |