added perl and bash code