Hey ChaoZ,

> my $var="
> GET http://us.a1.yimg.com/us.yimg.com/i/mntl/lnch/britney.jpg HTTP/1.0
> Host: us.a1.yimg.com
> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 
> Netscape6/6.2.1
> Accept: text/xml, application/xml, application/xhtml+xml, text/html;q=0.9, 
> image/png, image/jpeg, image/gif;q=0.2, text/plain;q=0.8, text/css, 
> */*;q=0.1
> Accept-Language: en-us
> Accept-Encoding: gzip, deflate, compress;q=0.9
> Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
> Connection: Close
> Proxy-Authorization: Basic 893263JHGjhgjhggjghgjh
> Referer: http://www.yahoo.com/";;
> 
> I would like to retrieve the line of Proxy Authorization:  Basic and 
> truncate it to only:-

To get just the Auth...

(my $var2=$var)=~s/^.*Proxy-Authorization: Basic //ms;
$var2=~s/\n.*$//ms;

This is unetested...

Shawn

> my $var = m/Proxy-Authorization:.+/; #should return true
> 
> But how do i truncated to only the line? and if possible, work to the below?
> 
> my $var2 = "893263JHGjhgjhggjghgjh";



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to