in reply to Re^4: Filtering passwords from the output of a script
in thread Filtering passwords from the output of a script
One would need to add some synchronizing code so the parent process can wait until first sysread is in progress. That way Perl won't eat any of the parent's output into its buffers for <DATA>.
That doesn't appear to be needed, but my tests haven't been extensive.
The second would be to change next unless /\s/ to next unless /\s$/
Oops, you're right that there's a problem with my solution. However, your fix is no good (If it receives "abc def ghi", it should output "abc def " and only leave "ghi" in the buffer). At this point, I'm not going to fix it. Just stick to your getc solution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Filtering passwords from the output of a script
by quester (Vicar) on Nov 29, 2006 at 22:02 UTC |