more useful options | |
PerlMonks |
(ar0n) Re: grep helpby ar0n (Priest) |
on Jan 22, 2002 at 04:19 UTC ( [id://140540]=note: print w/replies, xml ) | Need Help?? |
It's an okay way, but you don't really need regular expressions to match the haircolor or the firstname, since you're just matching string constants ("brown" and "j"). And since the keys are just indices, it's probably better to use an array:
The new line in the grep block, is, of course, only a style decision. Update: Yes, I have tried it, and it works for me. What error is it giving?
Update 2: You've changed the format of the input file. [ ar0n -- want job (boston) ]
In Section
Seekers of Perl Wisdom
|
|