0079デフォルトの名無しさん垢版 | 大砲2020/04/04(土) 00:40:59.23ID:oi+wB/l2 >>72 Perl5 for $a (qw{090 0080 123 0 000}) { ($b = $a) =~ s/^0*([\d])/$1/; print "$a → $b\n" } 実行結果 ~ $ perl 17_72_0dec.pl 090 → 90 0080 → 80 123 → 123 0 → 0 000 → 0