Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    
    say $t->ymd; # Prints as normal
    say $t->strftime($ymd); # Segmentation fault
    
  2. or download this
    sub formatTime {
        my ($date, $in_format, $out_format) = @_;
        $t = Time::Piece->strptime($date,$in_format);
        return $t->strftime($out_format);
    }