From: Ian Jackson Date: Fri, 5 Feb 2016 18:27:42 +0000 (+0000) Subject: commitid.scad.pl: Use m//g to split up for S X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1245bcd6f7ffd75751343b5c8c9d2f3908fa8f0c;p=reprap-play.git commitid.scad.pl: Use m//g to split up for S --- diff --git a/commitid.scad.pl b/commitid.scad.pl index 5a61f41..c09ce6a 100755 --- a/commitid.scad.pl +++ b/commitid.scad.pl @@ -274,7 +274,8 @@ sub gentextmodule_plusq ($$) { my $l = length $s; gentextmodule($form, $s); if (!($l & 1) && $l>=4) { - gentextmodule("${form}S", substr($s,0,$l/2), substr($s,$l/2)); + my $e = $l/2; + gentextmodule("${form}S", $s =~ m/.{$e}/g); } else { $gtm_demo_j++; }