Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: do $n exist in grep?

by Marshall (Canon)
on May 12, 2021 at 20:46 UTC ( #11132520=note: print w/replies, xml ) Need Help??


in reply to Re^3: do $n exist in grep?
in thread do $n exist in grep?

Interesting:
return { status => $s, ($optional_field ? (optional_field => $optional_field) : ()), };
I personally would not make a hash key optional like that.
I would always return the hash key and then an undef value for that key if it is not valid.
But as is often said "there is more than one way to do it".
It could also be that I haven't thought this completely through and haven't considered what
the calling code looks like and how it processes this returned info.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2021-08-04 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)








    Results (41 votes). Check out past polls.

    Notices?