From e3496478575027810844994990fbc789f4387939 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 26 May 2022 17:03:27 +0200 Subject: incdec.pm: Remove single quotes for Bash inclusion The single quotes caused a syntax error in the Bash script when included because the Perl script is included in a Bash single-quoted string. Remove the single quotes to fix the Bash inclusion. --- incdec.bash | 2 +- incdec.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/incdec.bash b/incdec.bash index 666e3c3..2ceeb0c 100644 --- a/incdec.bash +++ b/incdec.bash @@ -30,7 +30,7 @@ sub incdec { $point_position ||= 0; $is_backward ||= 0; - my $number_regex = '-?([1-9]\d*|0\D|0$)'; + my $number_regex = q/-?([1-9]\d*|0\D|0$)/; my $start_position = 0; my $previous_match_start = 0; diff --git a/incdec.pm b/incdec.pm index 6e1d83f..76ac684 100644 --- a/incdec.pm +++ b/incdec.pm @@ -27,7 +27,7 @@ sub incdec { $point_position ||= 0; $is_backward ||= 0; - my $number_regex = '-?([1-9]\d*|0\D|0$)'; + my $number_regex = q/-?([1-9]\d*|0\D|0$)/; my $start_position = 0; my $previous_match_start = 0; -- cgit v1.2.3