Thanks for every one who tried to help me. but all were unsuccessful and I 
would like to submit my tries for your consideration. 

This is how its done.
$ip = substr($ip, 0, (length($ip)-2));





----- Original Message ----
From: Gunnar Hjalmarsson <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Wednesday, July 9, 2008 20:33:45
Subject: Re: Filtering contetn in a variable

[ Please stop top-posting!!! ]

luke devon wrote:
> Li, Jialin wrote:
>> luke devon wrote:
>>> I am storing IP in to a varable ,  $ip="172.22.8.10 \-";
>>> but i wanted to filter out only the ip .
>> 
>> i am not so sure what the input is, this simple regex should solve your
>> problem:
>> 
>> ($ip_filtered) = /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/
> 
> Thnks for the reply,
> I am receiving IP value as 192.168.10.5/ -
> From here , i wanted to filtered out the exact ip. i tried your 
> example , but it didnt work.

How would we be able to correct your code if you don't show it to us???

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/

Send instant messages to your online friends http://uk.messenger.yahoo.com 

Reply via email to