> $coment="hogeではれほれなhogeみたいなhogeたちよ 
> 今日もhogeしよう。"; 
>  
> $i = '01'; 
> while (&change($coment)) { 
>     $i = sprintf("%02d",$i+1); 
> } 
>  
> sub change{ 
>     $_[0]=~ s/hoge/harehore$i/; 
> } 
>  
ありがとうございました。ちなみに 
 
&change($coment); 
 
sub change{ 
 my $i = '01'; 
 while ($_[0]) { 
        $i = sprintf("%02d",$i+1); 
        $_[0]=~ s/hoge/harehore$i/; 
 } 
  
ではだめでしょうか。 
      
 
 |