I found an example of some Perl code I needed, but it had something in it that I didn't recognise.
my $i //= '08';
my $i = '08';
In the context of a
my variable declaration, the variable is initially undefined so it is equivalent to assignment (and would be better written as
my $i = '08';). In general, though,
$i //= '08';
is a shorthand for:
$i = (defined $i) ? $i : '08';
It is documented in the Perl operators (
perldoc perlop) in two places (tersely under the assignment operators section, and in full in the section on 'logical defined-or'). It was added in Perl 5.10.0.