#!/usr/bin/perl $input = "koti.txt"; open IN, "+< $input" or die "Unable to open $input for reading, $!,stopped"; while ( ) { s/remote_be_address/192.168.106.60/g; print IN; } close IN;