sub process_match { my($consumption)=@_; return $consumption > 98.0; } if (process_match($consumption)) { do something; }