[ale] Perl Question

Tommie M. Jones tj at atlantageek.com
Mon Oct 16 16:02:39 EDT 2000




> 
> while( <> ) {
>   if( /somepattern/ ) {
>     my $nextline = <>;
>     print $_, $nextline;
>   }
> }

Here is my contribution
Ithis shold work

$/=undef;
$input=<>;

my @arr;

# Grepping for the word 'is'
if (@arr = $txt =~ /\n?.*?is.*?\n.*?\n/g)
{
  print  @arr;
}


--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list