Sudhindra K S wrote: > > Hi Hello,
> I have a string (not a file ) which looks something like this : > > tools : Abcdef > abc: > all: > def: > all: > > Now i want to search the string for all occurances of "all:" and print that line > containing "all:" $ perl -e' my $string = <<STRING; tools : Abcdef abc: all: def: all: STRING print for $string =~ /^all:.*\n/gm; ' all: all: John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>