Q:

How to rename the word from anywhere under my .html files without using File::Find in perl?

Here is my query the following is my directory structure .
`-- ka
    |-- ka.html
    `-- ka_tal
        |-- tal_cation
        |   |-- tal_cation.html
        |   `-- ev1
        |       `--ka_ka_tal_tal_cation_v1.html
        |
        `-- ka_tal.html

Here every .html files have the word named as tevision i want to rename all words tevision to ev.so i had tried the  following code.But it not works for me.
 finddepth(sub {

  return unless -d;

  (my $new = $_) =~ s/tevision/ev/ or return;
  rename $_, $new or warn "Err renaming $_ to $new in $File::Find::dir: $!";
}, ".");

How can i rename all words inside .html files using perl?

A:

Try this
my $path = "ka/";
find($path);
sub find{
    my ($s) = @_;
    foreach my $ma (glob "\Q$s\E/*")
    {
      if(-f $ma && $ma =~ m/\.html\z/)
      {
        system('perl', '-i', '-pe', 's/tevision/ev/', '--', $ma);
      }
      elsif(-d $ma)
      {
        find($ma)
      }

    }
}

