> [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 (('January' ..... ); To understand why, perldoc -f print Here is an example of what that warning is trying to warn you about: ......................... BEGIN PERL PROGRAM ............................ #!/usr/bin/perl use strict; use warnings; my @list1 = qw / Red Green Yellow Blue / ; my @list2 = qw / Rojo Verde Amarillo Azul / ; { local($, = ' '); local($\ = "\n"); print @list1, @list2; # works print (@list1, @list2); # works print (@list1), (@list2); # gives warning and fails print STDOUT (@list1), (@list2); # works again } .......................... END PERL PROGRAM ............................. And upon running, we get: lawrence /tmp > perl test.pl print (...) interpreted as function at test.pl line 15. Useless use of private array in void context at test.pl line 15. Red Green Yellow Blue Rojo Verde Amarillo Azul Red Green Yellow Blue Rojo Verde Amarillo Azul Red Green Yellow Blue Red Green Yellow Blue Rojo Verde Amarillo Azul -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to sort them into the correct order. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>