#!/usr/bin/perl -w use strict; while (<DATA>) { chomp; my ($time, $type) = split(/:>/,$_); if ($type =~ m/\s*FIND/) { print "I need to something with: $time\n"; } } #PRINTS: #I need to something with: 7/21/2009 5:49:20 PM #I need to something with: 7/21/2009 5:52:59 PM __DATA__ 7/21/2009 5:47:29 PM:> DATA 7/21/2009 5:48:49 PM:> DATA1 7/21/2009 5:49:20 PM:> FIND 7/21/2009 5:50:39 PM:> DATA3 7/21/2009 5:51:29 PM:> DATA4 7/21/2009 5:52:59 PM:> FIND 7/21/2009 5:53:19 PM:> DATA6
In reply to Re: Find the text
by Marshall
in thread Find the text
by Selvakumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |