in reply to Re: changing data
in thread changing data

I tried it with this but the regular expression part isnt working and it seems to only cover one directory.
@files = glob('c:\perl\bin\newer\*'); foreach $db (@files) { open(DATA, "$db") or die "File does not open: $!"; @data = (<DATA>); close (DATA); open(DATA, ">$db") or die "File not open: $!"; foreach $line (@data) { $line =~ s/<meta name\=\AA\.\"/<meta name\=\\./gi; print DATA $line; } close(DATA); }

Replies are listed 'Best First'.
Re: Re: Re: changing data
by AidanLee (Chaplain) on Feb 25, 2002 at 21:28 UTC
    Well, my post did not address traversing directories. I'd encourage you to try substituting everything but the first line of your outer foreach loop with what I suggested. If you would like further explanation of what I've done, I'll gladly provide it.