I have a line: i.like.donuts.but.only.with.tea
now I want to remove everything that follows the last "." including the last ".".
in this case ".tea"
Use Regex
To read the manual perldoc perlre
Of course In your case you could simply do something like this $line =~s/\.[^.]+$//;
Thanks Ram
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>