in reply to elseif syntax error

You haven't closed the block before starting the "elsif(){}", your code skeleton in the subroutine should've probably looked like the following pseudo:
sub rename_texts{ if(){ }elsif(){ } }
Consider perltidy for proper indentation, here is an introduction


Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.

Replies are listed 'Best First'.
Re^2: elseif syntax error
by wfsp (Abbot) on Oct 27, 2009 at 15:32 UTC
    I think I'd prefer
    sub rename_texts{ if(){ } elsif(){ } }