So I have a file test.txt, that contains,
home -> range
If I edit the file in vim and run the command
%s/^\(.*\)->\(.*\)$/\2 ::= \1 ;/g it converts the file to
range ::= home ;
which is what I want. However if I run
perl -pi -e 's/^\(.*\)->\(.*\)$/\2 ::= \1 ;/g' test.txt
which I think should do the same, I get no change - can someone tell me what's gone wrong? I suspect that something needs escaping but I've thrown all manner of combinations of escape at it... plus I'd like some general rules about the conversion between the two formats...