From 1245bcd6f7ffd75751343b5c8c9d2f3908fa8f0c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 5 Feb 2016 18:27:42 +0000 Subject: [PATCH] commitid.scad.pl: Use m//g to split up for S --- commitid.scad.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++; } -- 2.30.2