Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
    ...
    my $str = '123456789012';
    $str =~ s/(\S{$max})(?=\S)/$1 /g;
    print $str;
    
  2. or download this
    use strict;
    use warnings;
    
    ...
    sub ceil {
        return $_[0] == int $_[0] ? $_[0] : int ($_[0] + 1);
    }