Auch so scheint's nicht zu gehen:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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);
}
Meldung wieder gleich:
syntax error at test.pl line 18, near "-ne"
Execution of test.pl aborted due to compilation errors.
Freundliche GrĂ¼sse,
Jan