in reply to Return value in ternary

Yes. And you can prove it to yourself by adding a couple of strategically-placed prints to your code:
print "$return_value\n";

On a side note, use strict and warnings, and clean up the warnings you get:

sub test {