in reply to Re: elementary hash
in thread elementary hash, STDIN questions

The final working version I came up with was:
#!/usr/local/bin/perl -w -p -i.bak use strict; my $kill = join "|", qw{ wahwah blahblah yadayada }; s/$kill//go; # remove unwanted strings s/^\s+//g; # blank lines
Without the -p option the working version was:
#!/usr/local/bin/perl -w -i.bak use strict; my $kill = join "|", qw{ wahwah blahblah yadayada }; while (<>) { s/$kill//go; # remove unwanted strings s/^\s+//g; # blank lines print; }
I've not used the -p option before, but -p forces printing at the end, while -n explicitly disables printing. -p will override -n, if both are present. 'perldoc perlrun' talks about these.

--Chris

e-mail jcwren