sorry i found the root cause and it works.
it should be
$line = s/\.\.\// ..\//;