Ubuntu 10.04 is Perl 5.10, which has this operator avaiable.

On Wed, Aug 3, 2011 at 1:59 PM, shawn wilson <ag4ve...@gmail.com> wrote:
> 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.
>

--
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