P is for Practical | |
PerlMonks |
Re: Is typeglob feature really useful? (typeglob references)by eyepopslikeamosquito (Archbishop) |
on Jan 10, 2021 at 02:59 UTC ( [id://11126689]=note: print w/replies, xml ) | Need Help?? |
Please use typeglob not glob in future to avoid confusion with the glob function. Perl typeglobs have a notoriously obscure syntax. They are rarely used in high-level user code. They are often used in low level system code and when building tools. Some background and references:
Though I've used typeglobs occasionally, for example in an automated testing hack to verify a file being used by a module contained the expected content, their syntax always does my head in. That I'm no typeglob expert is proved by not finding Ton's famous winning typeglob hack, despite hacking away for a whole week in Christmas 2006. :)
References added later:
Updated: Changed title from glob to typeglob in step with xiaoyafeng. Added more examples of typeglobs long after original reply was made.
In Section
Meditations
|
|