added perl rewrite of shpp.in.sh (mostly incomplete)