http://qs321.pair.com?node_id=417806


in reply to creating an XML string

Quick & dirty:
sub encode { join '', map { /[\w\d ]/ ? $_ : '&#' . ord() . ';' } split //, shi +ft; }

Replies are listed 'Best First'.
Re^2: creating an XML string
by Joost (Canon) on Dec 28, 2004 at 18:10 UTC
      Well, they don't call it "quick and dirty" because it's elegant and complete.