#!/usr/bin/perl -i.bak

use English;

## get input
undef $INPUT_RECORD_SEPARATOR;
$file = <>;

## transform it

$file =~ s/(?<!\\)\.\.\./\\ldots /g;
$file =~ s/\\\.\.\./.../g;

# print output
print $file; 





