echo 'FOO="bar"' | perl -pe '/^FOO=/ and s/"$/ baz"/;'