Help for this page

Select Code to Download


  1. or download this
    my ($current_date) = map { qr/$_/ } (scalar localtime) =~ /\w+ +(\w+ +
    +\d+)/;
    
  2. or download this
    my @errors = map {qr/$_/} qw( error4 error3 error2 error1 );
    
  3. or download this
    open my $LOGFILE, '<', $log_file
      or die "can not open $log_file for writing: $!\n";
    
  4. or download this
    $w = 1;
    while ($w <= @word_search) {
        # uses $w - 1 to get $word_search[$w - 1]
        $w++;
    }
    
  5. or download this
    foreach my $w ( 0 .. $#word_search ) {
        # uses $w to get $word_search[$w]
    }
    
  6. or download this
    if ($word_search[$w-1] eq $pattern_date && $word_search[$w-1] eq $arra
    +y[$count])
    
  7. or download this
    if ( $line =~ /$current_date/ ) {
        foreach my $error (@errors) {
    ...
            ++$error_count while ($line =~ /($error)/g);
        }
    }