in reply to Extract field from pipe delimited flat file
Greetings peppiv,
If all you want to do is take data from one file and dump it into another, just setup your filehandles and perform the following:
print OUTPUT join "\n", grep /\S+@\S+\.\S+/, map { split(/\|/) } <INPUT>;The regex on the grep isn't all that great. merlyn has a few that work much better for finding all sorts of valid email addresses. However, for your example data, this works just fine.
So here's how it works (starting right, moving left):
-gryphon
code('Perl') || die;
|
|---|