in reply to Keeping all valid characters when untainting

$input = join '', $input =~ /([a-zA-Z]+)/g;

Edited by Chady -- added code tags.

Replies are listed 'Best First'.
Re: Re: Keeping all valid characters when untainting
by Wally Hartshorn (Hermit) on Dec 22, 2003 at 19:14 UTC

    Posting a question and getting an answer almost immediately is a mixed blessing. On the one hand, I'm glad to have an answer quickly. Other the other hand, I really wish someone had said "gee, that's a tough one". :-)

    Thanks for the quick reply!

    By the way, after correcting the small typo, the correct answer is:

    $input = join '', $input =~ /([a-zA-Z]+)/g;

    Wally Hartshorn

    (Plug: Visit JavaJunkies, PerlMonks for Java)