Multiline find / replace

I need to configure Jenkins jobs, which are currently configured to run anywhere to work on a specific label. Sure I could do it via the gui but in a SOA, I don’t want to manually do this in 100+ jobs.
So the files currently has in it:

   </scm>
   <canRoam>true</canRoam>
   <disabled>false</disabled>

I want it to be:

   </scm>
   <canRoam>false</canRoam>
   <disabled>false</disabled>

I run:

server:~/jenkins/jobs> perl -pi -e 'BEGIN{undef $/;} s/<\/scm>.+?true<\/canRoam>/<\/scm>\nbuild<\/assignedNode>\nfalse<\/canRoam>/smg' app*/config.xml

Many thanks to aks and StackOverflow for the help