Mariano Loza Coll wrote:
Hi John,
Hello,
I'm trying to learn a little bit more of Perl everyday, and I was intrigued about your earlier suggestion in a thread.my $bad_chromosomes = qr/^(?:6|8|14|16|18|Y)\t/; while (<$IN> ) { print $OUT $_ if !/$bad_chromosomes/; }I get the spirit of what you suggested, but I was curious about the use of "?:"
() are capturing parentheses and (?:) are non-capturing parentheses.
If I got it right, the "?" will make the search non-greedy. But what is the ":" for?
perldoc perlre John -- Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. -- Albert Einstein -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
