Help for this page

Select Code to Download


  1. or download this
        push @array, ('@', '@') if scalar(@array) < 10;
        splice @array, -2, 2 if scalar(@array) >= 10;
    
  2. or download this
    use strict;
    use warnings;
    ...
        $str .= "@@" if length ($str) < 10;
        substr $str, -2, 2, '' if length ($str) > 10;
    }
    
  3. or download this
        my $newStr = autoformat ($str, { justify => 'center' });
        print "$newStr\n";