If the name VALUE in files always the same and you using right OS(*nix like) you can do what you need just using sh, like this very simple example:
#!/bin/sh
cat file | sed ``/VALUE/s//$1/'' > file.`date "+%s"`
Otherwise, try this code:
use strict;
use warnings;
my $user_input = shift || die "I need input";
my $file = "file";
open FH, $file or die "can't open $file for reading $!";
my @arr = <FH>;
close FH;
foreach(@arr){
s/VALUE/$user_input/g;
}
open FH, ">$file" or die "can't open $file for writing $!";
print FH @arr;
close FH;
rename $file, $file.time;