Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my @converted = map {$_ =~ /^0/ ? oct($_) : $_ }  @arr;
    print "@arr\n";
    print "@converted\n";
    
  2. or download this
    C:\>perl practice.pl
    10 20 0b1101 0xF 023
    10 20 13 15 19