On May 10, Dave K said: >my $p1 = join('|', (512..520)); >my $p2 = join('|', (528..568)); >my $p3 = join('|', (576..578)); >my $p4 = join('|', (592..600)); >my $p5 = join('|', (608..622)); >my $p6 = join('|', (624..670)); >my $p7 = join('|', (672..685)); >my $p8 = join('|', (768..771));
Why not put all those number ranges together? >while (<IN>) { > if ( m/,$p1|$p2|$p3|$p4|$p5|$p6|$p7|$p8,/ ) { You need ()'s around the $p1|$p2|... part. The regex /,abc|def|ghi,/ is not the same as /,(abc|def|ghi),/ Do you see why? -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]