Help for this page

Select Code to Download


  1. or download this
    for(1 .. 31){
      print $_ . suffix($_) . "/n";
    }
    
  2. or download this
        @suffixes = ( undef, 'st','nd','rd' ... etc);
        return $suffixes[$_[0]];
    
  3. or download this
        $_[0]=~/(\b|[^1])(\d)$/;qw(0 st nd rd)[$2]or'th'