#!/usr/local/bin/perl -w use strict; my $data = do { local($/); <> }; print qq{$1\n} if ( $data =~ /(Testnok =[^>]+>)/s )
Or all right on the command line. Prob a cleaner way to do this though,
but I dont have my Camel book with me. Bet this could be done better with a couple more switches.
perl -e 'print $1 if ( do{local $/; <>} =~ /(Testnok =[^>]+>)/s)' data +.txt
Wonko
In reply to Re: reading from a textfile
by Wonko the sane
in thread reading from a textfile
by bory
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |