Just a nit, unless one is concerned that this $x should be out of scope after the end of the if block. The outer scope could have its own $x, for example.
In reply to Re^4: scope of my $x in if statements
by ig
in thread scope of my $x in if statements
by perl5ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |