[sr-dev] another syntax error

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Jun 1 17:52:45 CEST 2009


On Jun 01, 2009 at 17:48, Juha Heinanen <jh at tutpro.com> wrote:
> Andrei Pelinescu-Onciul writes:
> 
>  > I thing
>  >     if ($fU == $null)
>  > 
>  > or better:
>  >     if (!defined $fU)
> 
> just for curiosity, is performance of the above two equivalent?

No, there are very minor differences:

!defined $fU  fastest
$fU == "" - extra string conversion
$fU == $null slowest (has to go through a pv call and string or integer
                      conversion)

Andrei



More information about the sr-dev mailing list