T
Tassilo v. Parseval
Also sprach Tad McClellan:
Because one day it will emit a warning.
And likewise some of the core modules use it as a trick to create static
variables. However, perl5.10 will have a new warning "Deprecated use of
my() in conditional" that went into blead just a few days ago.
Tassilo
Lukas Mai said:Tad McClellan schrob:
[...]
You should not use modifiers that you don't understand. m//o is
useless for your pattern.my $tail = $1 if $the_number =~ m/\d+(.*)/s;
Whoa! Don't do that!
Why not?
Because one day it will emit a warning.
The behaviour of
`my $foo if bar;' is undefined
I believe that that is incorrect.
The docs themselves use that form twice that I can see:
perl -ne 'print "$ARGV: $_" if /^\s+my\b.*\bif\b/' *.pod
perltooc.pod: my $class = ref $self if $self;
perlwin32.pod: my @g = File:osGlob::glob($_) if /[*?]/;
And likewise some of the core modules use it as a trick to create static
variables. However, perl5.10 will have a new warning "Deprecated use of
my() in conditional" that went into blead just a few days ago.
Tassilo