EscapeCharacter
01-26-2002, 02:27 AM
if i had the following text
HTTP/1.1 200 OK
Date: Sat, 26 Jan 2002 05:29:07 GMT
Server: Apache/1.3.22 (Unix) PHP/4.0.6
X-Powered-By: PHP/4.0.6
Connection: close
Content-Type: text/html
what would be the perl equiv to grep Server:|awk '{print $2}'? i suppose i could just put that in backticks in the perl code but thats taking the easy way out.
ive been working on it for about an hour and i see myself any close than i was an hour ago, any help would be appreciated.
EDIT:
just my luck five minutes after i post this i figure out the first part so ive got this so far.
@stuff = grep(/Server:/, split(/\n/, $line));
p.s. no Python is better comments(you know who you are)
[ 26 January 2002: Message edited by: EscapeCharacter ]
[ 26 January 2002: Message edited by: EscapeCharacter ]
HTTP/1.1 200 OK
Date: Sat, 26 Jan 2002 05:29:07 GMT
Server: Apache/1.3.22 (Unix) PHP/4.0.6
X-Powered-By: PHP/4.0.6
Connection: close
Content-Type: text/html
what would be the perl equiv to grep Server:|awk '{print $2}'? i suppose i could just put that in backticks in the perl code but thats taking the easy way out.
ive been working on it for about an hour and i see myself any close than i was an hour ago, any help would be appreciated.
EDIT:
just my luck five minutes after i post this i figure out the first part so ive got this so far.
@stuff = grep(/Server:/, split(/\n/, $line));
p.s. no Python is better comments(you know who you are)
[ 26 January 2002: Message edited by: EscapeCharacter ]
[ 26 January 2002: Message edited by: EscapeCharacter ]