Help for this page

Select Code to Download


  1. or download this
    my $ts_fmt = 'MMM DD HH:MM:SS ';
    my $line = 'Feb 18 00:12:14 foo bar bat baz fwa';
    ...
    # $time is the time part.
    # $line holds the part after the time is removed.
    
  2. or download this
    my $match = 'fwa';
    if ( -1 != index($line,$match)) {
      # matched!
      $seen_lines{$line}++;
    }