
dws
Deleted
Jun 8, 2000, 10:31 AM
Post #2 of 2
(155 views)
|
|
Re: I need help with a "simple" code formatter
[In reply to]
|
Can't Post
|
|
Try some variation on the following: <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> s/^(\s*)(if\s*?\(.+?\)\s*?){$/"$1$2\n" . pad(length($1)) . "{"/e; sub pad { my $width = shift; " " x $width; } </pre><HR></BLOCKQUOTE> [This message has been edited by dws (edited 06-08-2000).]
|