#!/usr/bin/perl use warnings; use strict; #my $fh; # Reading one line from "test.json": #open($fh, "<", "/opt/habridge/data/habridge.config") or die; #my $JSON_DATA = <$fh>; #chomp($JSON_DATA); #close($fh); #my $WEBADDRESS; #my $ip = "5.5.5.5"; my $JSON_DATA = ""; if ($JSON_DATA -ne "") { #$WEBADDRESS="webaddress:jq.webaddress" . $JSON_DATA; #$JSON_DATA =~ s/$WEBADDRESS/webaddress\:$ip/g; # Writing to "test.json": #open($fh, ">", "/opt/habridge/data/habridge.config") or die; #print $fh $JSON_DATA; #close($fh); }