in reply to regexp searches over array slices
Um, there's no difference between putting code into a program and typing it into perl's STDIN yourself. Both are the exact same thing and do the exact same things with your code. Basically the slice appears to be working like the comma operator in scalar context and you're really just doing $array[4] =~ /\S/.
At any rate, you might try something like:
if( 2 == grep /\S/, @array[3..4] ) { stuff(); }
|
|---|