$var = $line =~ /pattern/;