Help for this page

Select Code to Download


  1. or download this
    "Use of uninitialized value in subtraction (-) at ./test3.pl line 30.
    Use of uninitialized value in subtraction (-) at ./test3.pl line 31.
    Month '-1' out of range 0..11 at ./test3.pl line 35"
    
  2. or download this
    #!/usr/bin/perl
    
    ...
    my $strings;
    
    for my $date (@lines) {
    
  3. or download this
     ($yyyy, $mm, $dd) = ($date =~ /(\d+)-(\d+)-(\d+)/);
     $epoch_seconds = timelocal(0, 0, 0, $dd, $mm, $yyyy-1900);
     $strings = localtime($epoch_seconds);
    
  4. or download this
     print "$date : $epoch_seconds\n" if $date lt $cutoff;
    }