Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Sample Code:
I've exhausted my imagination trying to reduce the lowercase function to a single line. But surely this problem has been solved by better minds than mine. Monks? Thanks! -Jim UPDATED I've posted several clarifications based on the replies so far. My original question is whether there's an equivalent function to first that is context sensitive.
tye's solution below, which uses a separate function named context, is elegant and concise and pretty close to what I'm looking for. To restate my question one final time: What is the right way to get perl to do the right thing? I assumed there'd be an obvious answer. Although no consensus, I *did* get a lively conversation. In reply to wantarray alternative by tqisjim
|
|