Perl help??

Hi
I'm newbie in perl programming..hope to get some help on perl.how can i filter line below
Connected to 179.1.1.134. to only 179.1.1.134 without the (.) at the end

$ echo "179.1.1.134." | perl -pi -e 's/.$//'
179.1.1.134

Hi my script is like this
Connected to 192.168.1.13..HOWTO filter out the . at the end.thanks if someone could be me

#!/usr/local/bin/perl
foreach $line(@lines){
   if ($line =~ /connected to (.*?)/i) {
      $ip=$1;
   }
}

Try:

$line =~ /connected to (.*).$/i

yes it works..thanks