echo foo | perl -e '$x=`stty -a --file=/dev/stdin`; print "\$x=$x\n";'