in reply to Increment Letter on a Command Line

You can avoid the many escapes by using single quotes and reading the letter from STDIN:
$ echo 'a' | perl -pe 'chomp; $_++; $_.=$/' b

This uses the magic increment, not by ascii values - but you get the picture.

Replies are listed 'Best First'.
Re^2: Increment Letter on a Command Line
by graff (Chancellor) on Feb 07, 2008 at 04:49 UTC
    Don't forget "-l" (for chomping on input and adding $/ on output). It really helps keep your one-liners slim and trim:
    $ echo 'a' | perl -lpe '$_++;' b