[sr-dev] another syntax error
Andrei Pelinescu-Onciul
andrei at iptel.org
Mon Jun 1 18:15:21 CEST 2009
On Jun 01, 2009 at 18:56, Juha Heinanen <jh at tutpro.com> wrote:
> Andrei Pelinescu-Onciul writes:
>
> > No, there are very minor differences:
> >
> > !defined $fU fastest
>
> ok, please change the syntax.
If you mean defined ($fU), instead of defined $fU, I prefer defined $fU
(is more perl-like) and defined ($fU) or defined($fU) works anyway.
>
> > $fU == "" - extra string conversion
>
> this i don't understand. if i assign $something = "", then $something
> is defined and test defined $something should return true.
== is for comparisons not for assignment. If I compare an undefined
value with "" in most languages is true.
>
> > $fU == $null slowest (has to go through a pv call and string or integer
> > conversion)
Andrei
More information about the sr-dev
mailing list