Help for this page

Select Code to Download


  1. or download this
    sub get_cur_time {
        # Use a slice to get just the bits I need
    ...
        return sprintf '%0.2d/%0.2d/%0.4d %0.2d:%0.2d:%0.2d', $Month + 1, 
    +$Day,
          $Year + 1900, $Hour, $Minute, $Second;
    }
    
  2. or download this
    while( my $line = <FH> ) {
        if ( $line =~ /\Q$aDate\E/ ) {
            print $line;
        }
    }