in reply to @ Regular Expression

Evaluate in list context:
my ($machine_class) = ($str =~ /MACHINE_CLASS=\s*(\w*)/);