Help for this page

Select Code to Download


  1. or download this
    #! /usr/bin/perl
    use warnings;
    ...
    print 'Please enter a number: ';
    chomp( my $limit = <> );
    say int(($limit + 1) / 2);
    
  2. or download this
    #! /usr/bin/perl
    use warnings;
    ...
    my $n = $limit + 10;
    print ' ' x ($n != $limit), $n while ($n -= 10) >= 0;
    print "\n";
    
  3. or download this
    #! /usr/bin/perl
    use warnings;
    ...
    push @numbers, scalar <> for 1 .. 4;
    chomp(@numbers);
    say join '-', grep $_ > 50, @numbers;
    
  4. or download this
    #! /usr/bin/perl
    use warnings;
    ...
    
    my $size = shift;
    say '*' x $_ for 1 .. $size;