It looks like there is no '\r\n' at the end of $line.
-----Original Message----- From: Balaji Thoguluva [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 11:45 AM To: [EMAIL PROTECTED] Subject: Reg. string matching using reg-exp #!/usr/bin/perl -w my $line= 'INVITE sip:[EMAIL PROTECTED] SIP/2.0'; if($line =~ /^\s*(\w+)\s*(.*)\s+(sip\/\d+\.\d+)\s*\r\n/i) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>