The first expands the scope of $x.
In reply to Re^2: scope of my $x in if statements by ig in thread scope of my $x in if statements by perl5ever