Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^3: Perl beginner here, needs a shove in the right direction.by aaron_baugher (Curate) |
on Jun 17, 2015 at 01:11 UTC ( [id://1130737]=note: print w/replies, xml ) | Need Help?? |
I'm talking about using the split function to split the line into an array of fields, like this:
that will put the fields in that array. Then you can check the first element of the array, $fields[0] , to see if it's in your hash of important keywords. If it is, you can grep the rest of the fields to see if any are the empty string or a dash. Here's an example with the sample line you gave:
Aaron B.
In Section
Seekers of Perl Wisdom
|
|