another round of perl, bash and php