changed perl invocation to #!/usr/bin/env perl