in reply to Re^2: "use strict" and undeclared variables
in thread "use strict" and undeclared variables

As a rule of thumb, you should try to restrict the scope of a variable as much as possible. The former restricts @row life to the while block, while the other goes beyond. Anyway, I wouldn't classify this neither as "bad" nor as "buggy".

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Io ho capito... ma tu che hai detto?

Replies are listed 'Best First'.
Re^4: "use strict" and undeclared variables
by blazar (Canon) on Oct 12, 2007 at 12:31 UTC
    Anyway, I wouldn't classify this neither as "bad" nor as "buggy"

    I personally believe "error prone" may be more appropriate. Ain't it?

Re^4: "use strict" and undeclared variables
by leocharre (Priest) on Oct 18, 2007 at 18:19 UTC
    Exactly.
    I was thinking of a more complex loop, and a more complex origin of @row's content. The possibility of contamining the array through some buggy code elsewhere, etc.
    But I didn't explain that more thoroughly- and it was perceived I came accross as rude :-( Sigh.