In my hands the perl autoindent code almost works perfectly. But it doesn’t properly handle elsif statement. Anyone gotten that to work? For example, the current code indents as below:
if ( $x == 1 ) { print "Hello World\n"; } elsif ( $x == 2 ) { print "Something else\n"; }
but naturally we would like:
I’ve banged my head against those regular expression several times, but I just can’t figure out a way to get this to indent correctly.
More information about formatting options
perl autoindent and elsif statements
In my hands the perl autoindent code almost works perfectly. But it doesn’t properly handle elsif statement. Anyone gotten that to work? For example, the current code indents as below:
but naturally we would like:
I’ve banged my head against those regular expression several times, but I just can’t figure out a way to get this to indent correctly.