my $err_num = $? >> 8什么意思

my $err_num = $? >> 8什么意思
另一个问题,为什么要把执行后的状态值($?)右移8位?为什么与127?请大家帮忙,谢谢!

if (system("cp -ap $src $dest")) {
            my $err_num = $? >> 8;
             my $sig_num = $? & 127;
             print STDERR "Copy from $src to $dest failed: cp exited with e  rror code $err_num, signal $sig_num\n";
         }