in reply to Re^2: number comparison with a twist
in thread number comparison with a twist

BTW, aside from logic issues, I don't know how you came across the idea of using "," a comma as the separator?
Yes, this is "legal and allowed", but the difference between a . and a , can be hard to see.

I would use the default of "/" unless there is a reason not to.
My second choice would be vertical bar.
My 3rd choice would be curly braces - almost never.
I have not ever been tempted to use "," for the separator.

$from_api =~ s,^(\d+)\.(\d{2}).*$,${1}${2},; $from_api =~ s/^(\d+)\.(\d{2}).*$/$1$2/; $from_api =~ s|^(\d+)\.(\d{2}).*$|$1$2|; $from_api =~ s{^(\d+)\.(\d{2}).*$}{$1$2};

Replies are listed 'Best First'.
Re^4: number comparison with a twist
by anotherguest (Novice) on Mar 05, 2020 at 13:32 UTC
    That was just copied from parv's earlier post. While I tend to use / as a separator when writing my own regex I usually don't care too much when copying and just leave it what it was.