Roiy Zysman wrote:
> Hi All
> Why does the command 'print (localtime(time))[4];' does not work
> And the following 2 lines do work
> '[my $temp = (localtime(time))[4];
> Print $temp;'

It pretty much tells you why when you compile it:

    print (...) interpreted as function at E:\Perl\source\xx.pl line 1.
    syntax error at E:\Perl\source\xx.pl line 1, near ")["

Essentially the parentheses following 'print' are assumed to contain its
parameter list. The array subscript is illegal after that.

Cheers,

Rob





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to