aboutsummaryrefslogtreecommitdiff
path: root/challenge-002/freddie-b/perl5/ch-1.pl
blob: 1b5917c792532ac51ebcaf7d558f446995123148 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl
use feature 'say';

# Write a script or one-liner to remove leading zeros from positive numbers.
# perl week2_01.pl 01 001.3 002 00005 .7 5 5.005 101 000.1 000010 -3 -003

for my $a (@ARGV) {
    if ($a > 0) {
        say 0 + $a;
    }
}