#!/usr/local/bin/perl -w use Email::Sender::Simple qw(sendmail); use Email::Simple; use Email::Simple::Creator; open (IN, 'top.log'); $input=; print $input; $lngth=length($input); print $lngth; $load = substr($input,16,4); print $load; $value=.1 if ($load > $value) { # print "$load greater than $value"; my $email = Email::Simple->create( header => [ To => '"Hardy Cherry" ', From => '"Hardy Cherry" ', Subject => "Load g", ], body => "$load greater than $value.\n", ); sendmail($email); } #### "my" variable $email masks earlier declaration in same scope at hcshort.pl line 26. syntax error at hcshort.pl line 15, near ") {" syntax error at hcshort.pl line 28, near "}" Execution of hcshort.pl aborted due to compilation errors. #### $value=.1 if ($load > $value)