unless ($string =~ /%{0,10}/) { $string = undef; }
-----Ursprungliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 9. Juli 2004 13:21 An: [EMAIL PROTECTED] Betreff: Counting characters in a thread $string = "a%3A2%3A%7Bi%3A0%3Bs%3A3%3A%22489%22%3Bi%3A1%3Bs%3A32%3A%22a85a44c188152379 8bc155a5369e1226%22%3B%7D" How would I empty $string if it contained more than ten % characters? In other words $string = "a%3A2%3A%7Bi%3A0%3Bs%3A3%3A%22489%22%3Bi%3A1%3Bs%3A32%3A%22a85a44c188152379 8bc155a5369e1226%22%3B%7D" Would be emptied, while $string = "a%3A2%3A%7Bi%3A0%3Bs%3A3%3A%22489%22" would not. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>