in reply to use strict; before/after use warnings;

Hello msh210,

I see no differences. I suppose use strict; use warnings; is with me since ever. It is also less cacophonic in sentences: use strict and warnings or...

If both are at the top of the program, again I see no differences. If you put a syntax error between them the error is the same:

io@COMP:C>cat sw.pl use strict; 0 use warnings; io@COMP:C>perl sw.pl "use" not allowed in expression at sw.pl line 5, at end of line syntax error at sw.pl line 5, near "use warnings" Execution of sw.pl aborted due to compilation errors. io@COMP:C>cat ws.pl use warnings; 0 use strict; io@COMP:C>perl ws.pl "use" not allowed in expression at ws.pl line 5, at end of line syntax error at ws.pl line 5, near "use strict" Execution of ws.pl aborted due to compilation errors.

Obviously strict can catch something and warnings too, but is a rare situation:

io@COMP:C>cat sw.pl use strict; $x=1; use warnings; io@COMP:C>perl sw.pl Global symbol "$x" requires explicit package name (did you forget to d +eclare "my $x"?) at sw.pl line 2. BEGIN not safe after errors--compilation aborted at sw.pl line 3. io@COMP:C>cat ws.pl use warnings; $x=1; use strict; io@COMP:C>perl ws.pl Name "main::x" used only once: possible typo at ws.pl line 2.

So I suppose it is a matter of taste.

The only important thing is to use them both everytime ;)

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.