Hameed U. Khan wrote:
> print (('January', 'Fubruary', 'March', 'April', 'May ', 'June',
> 'July', 'August', 'September',
> 'Ooctber', 'November', 'December')[-1]);
> following is the warning and output i am getting.
>
> [EMAIL PROTECTED] ./backwards.pl
> print (...) interpreted as function at ./
> It's not a serious warning -- the program is doing what you coded it
> to do, and you can supress it by explicitly mentioning the filehandle in the
> print
>
> print STDOUT (('January' . );
Or you could force scalar context with "scalar", like:
print scalar (('Jan', ...)[-1]);
Or even:
Hameed U. Khan wrote:
Hi,
Hello,
i am new to perl and to this mailing list. My name is Hameed and I
am 20 years old.
I am doing BCS from Biztek (http://biztek.edu.pk). i have joined this
mailing list because i am learning perl. i am getting a warinig which
i can't understand so i am mailing you p
> [EMAIL PROTECTED] ./backwards.pl
> print (...) interpreted as function at ./backwards.pl line 14.
> December
> December
>
It's not a serious warning -- the program is doing what you coded it
to do, and you can supress it by explicitly mentioning the filehandle in the
print
print STDOUT (('Ja
HI,
I really didn't understand. can you give some more details.
On Sun, 5 Dec 2004 01:01:07 -0500, Felix Li <[EMAIL PROTECTED]> wrote:
> Note the ''. in front of the list
>
> print ''.('January', 'February, 'March', 'April', 'May ', 'June','July',
>
>
> 'August', 'September','October, 'Novemb
Note the ''. in front of the list
print ''.('January', 'February, 'March', 'April', 'May ', 'June','July',
'August', 'September','October, 'November', 'December')[-1];
- Original Message -
From: "Hameed U. Khan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 05, 2004