Short commandline for changing [ and ] into [ and ].
perl -ple '%r=qw([ 1 ] 3);s/([][])/&#9$r{$1};/g'

Replies are listed 'Best First'.
Re: monkify
by RMGir (Prior) on Jul 25, 2002 at 17:45 UTC
    Wow, I love that trick with /[][]/ to match []. I always wind up escaping the "squares" in character classes.

    BTW, I had to use your script to type this post, so it's already useful :)
    --
    Mike