in reply to Transforming only parts of input
     It uses part of Aristotle's idea with the reference to the first grouped part of the regular expression ($1).my @values; while (<>) { my $line = $_; my @elements = split( /\s/, $line ); for ( @elements ) { if ( /(-I.:.*)/ ) { push (@values, $1) }; } } for ( @values ) { print "$_\n" };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Transforming only parts of input
by flounder99 (Friar) on Jun 26, 2002 at 18:54 UTC | |
|
Re^2: Transforming only parts of input
by Aristotle (Chancellor) on Jun 26, 2002 at 19:07 UTC |