123 results found for perl //=
$name = "" unless defined $name; if($name ne '') { # do something with $name } In Perl 5.10, this can be shortened to `$name //= "";` which is exactly
$ENV{NOT_DEFINED}' (don't do #4). Since this is Perl, there are several more ways to do it. In Perl <= v5.8, you have to use || and ||= instead of // and //= , which
which doesn't sound like what you want. Using $args{bar} //= 99; if you're using perl 5.10 or later would do what you want, though. Based on your comment
What does `$hash{$key} |= {}` do in Perl? What does `$hash{$key} |= {}` do in Perl? I was wrestling with some Perl that uses hash references. In the
bash operator for logical defined-or bash operator for logical defined-or Is there an equivalent Bash operator to Perl's logical defined-or?
to defined $a ? $a : $b and the statement $c //= $d; can now be used instead of $c = $d unless defined $c; Perl doesn't offer a way to check whether or
rather than having to list them all in order (and potentially having to list ones I don't actually want). Tags: ruby idioms Perl now has the //= syntax to
Misspelling variable names (i.e., use strict , again) Meta-Answers The perltrap manpage Perl::Critic See Also: ASP.NET - Common gotchas Tags: perl
Perl 6) Atomic Blocks Concurrency Defined-or ( // ) operator Tags: perl polls features perl6 Perl 6 is taking more time than Windows Vista did!!! :( I
How to avoid extra information to be printed How to avoid extra information to be printed In my perl code I have used the following line :