in reply to Fetching Only Month and Year From localtime()
The (LIST)[LIST] syntax others have shown is called a list slice. It allows you to have an arbitrary expression that generates a list in the () and extract arbitrary elements from it, by specifying the index/indicies in the [].
•Re^2: localtime
by merlyn (Sage) on Jan 05, 2005 at 20:21 UTC
|
Yup. List slice. One of the few bits of Perl that I can genuinely claim ownership of. One of the others is coderef arrow ($coderef->(@args)).
| [reply] [d/l] |
|