Well the perl inplace editing is just a wrapper. In the background it will still do something similar to what is done with sed and then move. Anyway to do the inplace editing you can make the following script:
Code:
#!/usr/bin/perl -i
$search = "something";
$replace = "else";
while ( <> ) {
s/$search/$replace/;
print $_;
}
Just call the script with 'scriptname filetomodify'.
To do the same with sed is not that much harder it would just be one line. Something like:
sed -e 's/something/else/' file > file.bak && mv -f file.bak file
It would probably depend on what you are planning to use it for, which one of the two might be easier.