#! /usr/bin/perl use strict; use warnings; use Chart::Plot; my @infos; my $result = qx{snmpwalk -v 1 -c public ifLastChange}; my @lines = split(/\n/,$result); for my $line(@lines){   my ($port) = $line =~ /ifLastChange\.(\d+)/;   my ($time) = $line =~ /Timeticks:\s\((\d+)\)/;   push(@infos,$port,$time); } #-- #  create a chart #-- my $chart = Chart::Plot->new(); $chart->setData(\@infos); my $output = '/sandia/vol0/home/cheggler/test.gif'; open(GIF,">$output") or die $!; binmode GIF; print GIF $chart->draw('gif'); close GIF;