if ($fraction =~ /^((-) ?)?((\d+) )?(\d+) ?\/ ?(\d+)$/ && $2) { #run if negative... }