dogmeat
public text v1 · immutablewhile($input = <STDIN>) {
chomp($input);
if ($input =~ m/^(\+ \()([1234]\.[0-9])(.*)/) {
$tally = $2 - 1.7;
print "$1_$tally_$3\n";
} else {
print "$input\n";
}
}
while($input = <STDIN>) {
chomp($input);
if ($input =~ m/^(\+ \()([1234]\.[0-9])(.*)/) {
$tally = $2 - 1.7;
print "$1_$tally_$3\n";
} else {
print "$input\n";
}
}