I agree with what you say; providing some code in answer to a question is entirely appropriate most of the time.
The nit I have is that you say there is no difference other than style between my $scalar="bleh"; and my($scalar) = "bleh";. There is a difference. The former uses scalar context and the latter uses list context. That can make a difference to the evaluation of an expression. For example:
use strict;
my $time1 = localtime();
my($time2) = localtime();
print "time1 is $time1\n";
print "time2 is $time2\n";
The time2 line prints only the seconds value of the current time. |