in reply to Re: There's Only One Way To Do It
in thread There's Only One Way To Do It
All I wanted to do was take the 2 comma separated values and switch them around, per line
And you needed chop() or chomp() or more than one line of code to do it? Get with the program dude - you need discover inplace editing :-) The supplementary backup file is nice when your brilliant solution turns out to have just destroyed 10,000 zone records, not that I would know :o)
perl -pi.bak -e "s/([^,]+),([^,\n]+)/$2,$1/" data
cheers
tachyon
|
---|