If script ends up in shell, feed to perl