perl -pe '$f=1 if(/\[Section B\]/);s/^\$param2=value2$/\$param2=new_value2/ if($f);'
[Section B] $param1=value1 $param2=value2 $param3=value3 [Section A] $param1=value1 $param2=value2
[Section B] $param1=value1 $param2=new_value2 $param3=value3 [Section A] $param1=value1 $param2=new_value2