Help for this page

Select Code to Download


  1. or download this
    my ($last_five) = map scalar reverse, 
                      map /^(?>0*)(\d{1,5})/,
                      map scalar reverse, 
                      $running_total;
    
  2. or download this
    my ($last_five) = $running_total =~ /(\d{0,4}[^0\D])0*$/;
    
  3. or download this
    my ($last_five) = $running_total =~ /(\d{1,5}(?<!0))0*$/;