#!/usr/bin/perl -w use strict; use Algorithm::Diff qw(diff); use File::Copy; use LWP::Simple; #Global variable declaration (if any used) my ($addprinter, $zebra, $file1, $file2, $diffs, $date, $subject, $address, @f1, @f2); #Printer script paths $addprinter = "/cachesys41/scripts/addprinter.plx"; $zebra = "/cachesys41/scripts/zebra.plx"; #Must chomp date or regexp substitution returns wrong value chomp ($date = `date`); $date =~ (s/ \d\d:\d\d:\d\d CDT//); #Get printers from CUPS (LWP / 'getstore()' method) my $rc = getstore ("http://my.fqdn.com/txt", "/tmp/txt"); die "error $rc";