#!/usr/bin/perl # http://perlmonks.org/?node_id=1177915 use strict; use warnings; while(<DATA>) { s#.*?:# $& =~ tr/-/_/r #e; # /r is your friend :) print; } __DATA__ session-redis-hosts-fault-tolerant: "tyk-redis-1.gateways.svc.cluster. +local,tyk-redis-2..." message-center-db: "http://message-center-db-1b.message-center-db.svc. +cluster.local"
In reply to Re: Repeated substitution on 1 side of a line only
by tybalt89
in thread Repeated substitution on 1 side of a line only
by dspivey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |