Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
1st Question
Why can I say this:
What is going on with @{[ ]}? It seems like you are creating an anonymous array reference [] and dereferencing it with @{}. But how does this make since in that context? I am confused...print "Just another @{[ (localtime)[5] ]} Hacker"?
2nd Question
Look at this code:
What's confusing me in both lines are the parentheses (). Why have them here? What are they doing in this context?(caller 0)[3] (localtime)[5]+1900
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Questions about context
by Errto (Vicar) on Jan 30, 2005 at 01:14 UTC | |
by Anonymous Monk on Jan 30, 2005 at 01:48 UTC | |
by davido (Cardinal) on Jan 30, 2005 at 05:04 UTC | |
by qq (Hermit) on Jan 30, 2005 at 19:53 UTC | |
by borisz (Canon) on Jan 30, 2005 at 02:06 UTC | |
by ysth (Canon) on Jan 30, 2005 at 10:18 UTC | |
by nobull (Friar) on Jan 30, 2005 at 12:21 UTC | |
by ysth (Canon) on Feb 02, 2005 at 06:41 UTC | |
|
Re: Questions about context
by Revelation (Deacon) on Jan 30, 2005 at 20:15 UTC | |
by rir (Vicar) on Jan 31, 2005 at 22:34 UTC |