#!/usr/bin/perl # Get files and skip "." in the selected strings. # jeffa is right. killlastdot.pl :) # Usage: ./killlastdot <ENTER> file word my $FILE = <STDIN> ; chop $FILE ; my $VAR = <STDIN> ; chop $VAR ; open(GETARQ, "$FILE") ; my @ARQ = <GETARQ> ; close(GETARQ) ; foreach (@ARQ) { if ($_=~/$VAR/) { my $x = $_ ; chop($x) ; chop($x) ; print "$x\n" ; } else { print $_ ; } }
In reply to killlastdot.pl by hash
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |