in reply to excluding special characters when trying to print

The best approach to removing unwanted stuff in your program output is not to have it in the data in the first place. Depending on how you acquire the input data, you might want to sanitize it, by only keeping the printable stuff:

s/[\x00-\x1f]/_/g; # replace all unprintables with _

... or you might want to find out why you're getting unprintable characters in your input data.

As to deleting nodes, this is not possible here. Also see (tye)Re: why a nodelet can be kept against author wish?.

Replies are listed 'Best First'.
Re^2: excluding special characters when trying to print
by repellent (Priest) on Jan 09, 2009 at 18:44 UTC
    I would recommend this instead:
    s/[[:^print:]]/_/g; # replace all unprintables with _
Re^2: excluding special characters when trying to print
by Spooky (Beadle) on Jan 09, 2009 at 14:10 UTC
    ..thanks Corion - I'll give that a try.