in reply to How scoping works in If statements?
my $x = (1) ? 5 : undef; [download]
use strict; use warnings; my $x = (0) ? 5 : undef; my $x = 42; __END__ "my" variable $x masks earlier declaration in same scope [download]