Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by graff (Chancellor)
on Sep 08, 2006 at 01:27 UTC ( [id://571843]=note: print w/replies, xml ) Need Help??


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

Maybe you want to use a hash to store your address values... that would tend to make things simpler overall:
my %address; while (<DATA>) { if ( /^(To|From|Contact):.*?(<.*?>)/ ) { $address{$1} = $2; } } for my $field ( qw/To From Contact/ ) { if ( exists( $address{$field} )) { print "The $field address is $address{$field}\n"; } }
(untested)

Replies are listed 'Best First'.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found