diff --git a/examples/4charts.pl.in b/examples/4charts.pl.in
index beeb6f4a2e6f218e10c24395aeb603269ff73a33..a11b944185db50684b70ed918863d793f0346072 100755 (executable)
--- a/examples/4charts.pl.in
+++ b/examples/4charts.pl.in
my $start=time;
my $rrd="randome.rrd";
my $name = $0;
+$name =~ s/.*\///g;
$name =~ s/\.pl.*//g;
RRDs::create ($rrd, "--start",$start-1, "--step",300,
;
if ($ERROR = RRDs::error) {
- print "ERROR: $ERROR\n";
+ die "ERROR: $ERROR\n";
};
print "This script has created $name.png in the current directory\n";