[CS-FSLUG] Sed and other tools

Ed Hurst ehurst at soulkiln.org
Fri Jul 8 09:12:08 CDT 2011


On Thu, 7 Jul 2011, Robert Wohlfarth wrote:

> You could try this little Perl script:
>
> foreach my $file (@ARGV) {
> open my $in, "<$file";
> my @slurp = <$in>;
> close $in;
> my $all = join( "\n", @slurp );
> $all =~ s/softedges\s*at\s*softhome\s*dot\s*net/eddie at soulkiln dot org/m;
> open my $out, ">$file.new";
> print $out $all;
> close $out;
> }

Having never messed with Perl, I can scarcely begin to parse this. What
I need now is how to tell this script to check all the HTML files in a
given directory. I saved it as change.pl and learned how to check the
syntax. It's fine, but it does nothing as it stands.

Ed Hurst
--------
Open for Business - http://ofb.biz/
Kiln of the Soul - http://soulkiln.org/
blog - http://soulkiln.myopera.com/




More information about the Christiansource mailing list