At first glance, it's appears to me as if it's working due to a side effect. chomp operates on $_ implicitly, which you are affecting in your example that works. I do not believe chomp is taking the LHS of the assignment and working with $_ like you think it is.
Update - I stand corrected -
You can actually chomp anything that's an lvalue, including an assignment:... in
chomp. I do think it's related to you using
$_ inconsistently when switching to
$selection.
For clarity you probably still want:
my $selection = <STDIN>;
chomp ($selection);
And your regex seems incorrect, as pointed out by
LanX. This may be where using
$_ originally got you.