Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How to retrieve the string after the space???

by rsriram (Hermit)
on Sep 07, 2006 at 13:03 UTC ( [id://571678]=note: print w/replies, xml ) Need Help??


in reply to How to retrieve the string after the space???

Hi, You just need to have a small correction in you if condition.

if ($line =~ m/To:/i) { if ($line =~ m/<([^>]+)>/i) {print "<$1>\n"} }

In the above statement, after checking whether the line contains To:, I am using a regex for searching the text within open and close delimiters and printing the searched text within < and >.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://571678]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-25 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found