in reply to Replace all . with _ in a string
See. the perlop manpage for more info.$_ = 'foo.bar(baz.quux)'; print "was: $_\n"; tr[.][_]; print "now: $_\n"; __output__ was: foo.bar(baz.quux) now: foo_bar(baz_quux)
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Replace all . with _ in a string
by exussum0 (Vicar) on Dec 23, 2003 at 15:41 UTC |