Keep It Simple, Stupid | |
PerlMonks |
Re: print list element from function syntaxby Hofmator (Curate) |
on Jun 25, 2004 at 13:05 UTC ( [id://369612]=note: print w/replies, xml ) | Need Help?? |
What happens is that perl interprets this as
and then perl doesn't know what to do with the [2] after the print statement. To fix this, simply write print +(localtime)[2]."\n"; -- Hofmator
In Section
Seekers of Perl Wisdom
|
|