fork download
  1. #!/usr/bin/perl
  2.  
  3. my @buildno = ("I need to capture the word beginning with CSR1.1.2.BOI46 contained in the array within a string.");
  4. do {$_ = $1 if /(?:^|\s)(CSR\S*)/} foreach @buildno;
  5.  
  6. print $buildno[0];
  7.  
Success #stdin #stdout 0s 17496KB
stdin
Standard input is empty
stdout
CSR1.1.2.BOI46