changed run commands from sh to perl