On Aug 3, 2011 12:40 AM, "Brian Fraser" <frase...@gmail.com> wrote: > > On Wed, Aug 3, 2011 at 2:32 AM, terry peng <terry.p...@mail.ru> wrote: > > > I have forgot that, is there a //= operator in Perl? > > which should do the same stuff as: > > > > unless (defined($foo) ) { > > $foo = ...; > > } > > > > Thanks. > > > > > Yes. > > Now wasn't that simple? : ) It's the defined-or, and you can read more about > it on perlop[0]. Do be mindful that in ancient versions of Perl it's not > available; If for whatever reason you are on one of those.. Please update? > > [0] http://perldoc.perl.org/perlop.html#C-style-Logical-Defined-Or
Debian stable ( <6 ) was 5.8, so if you're in a shop that uses debian and likes to test that still might not be available to you.