#!/usr/bin/perl # Get files and skip "." in the selected strings. # jeffa is right. killlastdot.pl :) # Usage: ./killlastdot file word my $FILE = ; chop $FILE ; my $VAR = ; chop $VAR ; open(GETARQ, "$FILE") ; my @ARQ = ; close(GETARQ) ; foreach (@ARQ) { if ($_=~/$VAR/) { my $x = $_ ; chop($x) ; chop($x) ; print "$x\n" ; } else { print $_ ; } }