#! /usr/bin/env perl use strict; print "The troublesome entities, irksome to Monks:\n " , ( join " and ", map{ sprintf qq{"$_" is safe as }.q{&#}.qq{%d;}, ord ; } qw/[ ]/ ) , "\n"; __END__ =pod Or as a one-liner: perl -e' print "The troublesome entities, irksome to Monks:\n " , ( join " and ", map{ sprintf qq{$_ is safe as }.q{&#}.qq{%d;}, ord ; } qw([ ]) ) , "\n"; ' =cut