#!/bin/bash PARENTHESIS="-pt=2" # No space around parentheses SQRBRACKET="-sbt=2" # No space around square brackets FORMAT="-ole=unix" # Make line endings unixoid MAXLEN="-l=120" # Maximum length for lines CURLY="-bl" # Start curly bracket after newline APPROACH="-b" # Replace in file and make backup COMMENT="-ibc" # Comments are intented to same level as code BREAKS="-iob" # Ignore old logic linebreaks LISTS="-mft=1" # Rewrite lists into a vertical fashion VERTICAL="-lp -vt=2 -vtc=2" # Keep nestled statements as tight as possible vertically ARGUMENTS="$PARENTHESIS $SQRBRACKET $FORMAT $MAXLEN $CURLY" ARGUMENTS="$ARGUMENTS $APPROACH $COMMENT $LISTS $BREAKS $VERTICAL" find . -name "*.pm" -exec "perltidy" $ARGUMENTS {} ";" find . -name "*.pl" -exec "perltidy" $ARGUMENTS {} ";"