[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Perl Question





> 
> 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.