On Friday 09 July 2004 04:31, Bastian Angerstein wrote: > > unless ($string =~ /%{0,10}/) { > $string = undef; > }
That will only work if the % characters are all next to each other. perldoc -q "How can I count the number of occurrences of a substring within a string" John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>