fork download
  1. use strict;
  2. use warnings;
  3.  
  4. # answer: http://o...content-available-to-author-only...e.jp/qa/q7095814.html
  5.  
  6. my $doc = "(L)12×(H)34×(W)56\n";
  7. $doc =~ s/(\([LHW]\)\d+)/$1cm/ig;
  8.  
  9. print $doc;
Success #stdin #stdout 0s 4728KB
stdin
Standard input is empty
stdout
(L)12cm×(H)34cm×(W)56cm