in reply to Writing regexes, think ahead just a bit.

You could be even safer and anchor it to the end of the string.

s/\.pl$//

Replies are listed 'Best First'.
Re^2: Writing regexes, think ahead just a bit.
by Lady_Aleena (Priest) on Mar 23, 2011 at 07:26 UTC

    You're right. :)

    Have a cookie and a very nice day!
    Lady Aleena