The back ticks don't set $? (see perlop). That is the correct behavior. If you want the return value, look at system() instead. It turns out that I'm wrong about that. According to perlvar it is indeed supposed to set $?, but it's not the return value, it's more.