Old Russian measure of length: Difference between revisions

Content deleted Content added
SqrtNegInf (talk | contribs)
Added Perl example
SqrtNegInf (talk | contribs)
m →‎{{header|Perl}}: fixed output
Line 949: Line 949:
my $prefix = $`;
my $prefix = $`;
my $match = $&;
my $match = $&;
my $digits = substr $match, 0, ++$sig;
$sig++ if $match =~ /\./;
my $digits = substr $match, 0, $sig;
my $nextd = substr $match, $sig, 1;
my $nextd = substr $match, $sig, 1;
$digits =~ s/(.)$/{1+$1}/e if $nextd > 5;
$digits =~ s/(.)$/{1+$1}/e if $nextd > 5;
Line 966: Line 967:
fut: 3.2808
fut: 3.2808
arshin: 1.4061
arshin: 1.4061
sazhen: 0.468691
sazhen: 0.46869
kilometer: 0.001
kilometer: 0.001
versta: 0.000937383
versta: 0.00093738
milia: 0.000133912
milia: 0.00013391


1 milia to:
1 milia to: