my $spooler = `lpstat -r`; if ( $spooler = "scheduler is not running" ) #### if ( $spooler eq "scheduler is not running" ) ... if ( index($spooler, "scheduler is not running") >= 0 ) ... if ( $spooler =~ /scheduler is not running/ ) ...