in reply to Re: Filtering passwords from the output of a script
in thread Filtering passwords from the output of a script

Three issues:

See Re^3: Filtering passwords from the output of a script.

By the way, binmode might be required. I remember having problems when attempting to read characters (as opposed to bytes) using sysread, but the details escape me.

Replies are listed 'Best First'.
Re^3: Filtering passwords from the output of a script
by quester (Vicar) on Nov 29, 2006 at 08:02 UTC
    Good points, although /\s/ actually also matches newline and carriage return. As a sheer stroke of fortune, in my current application a restriction against using spaces or non-ASCII characters in passwords is appropriate. Also, I don't have to worry too much about efficiency, my logs only arrive at a few hundred bytes per second typically. Thanks again!