Hi Alex,

I guess it would be very difficult and error-prone to do it. Here's my thought:

my $bar = 3;

my $assign = (my $foo = $bar);
if($assign){
    say '$assign=',$assign;
}

my $equal = ($foo == $bar);
if($equal){
    say '$equal=',$equal;
}

output:
$ perl tst.pl
$assign=3
$equal=1

But if $bar = 0 or 1, then again you will not be clear of what is happening.

Cheers,

Jing
On 15 Aug 2013, at 02:34, Alexey Mishustin <shum...@shumkar.ru> wrote:

> Hi Jing,
> 
> Thanks for the reply.
> 
> So, there is no built-in way to catch these typos?
> 
> -- 
> Regards,
> Alex
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
> 
> 

Reply via email to