[lug] Print warnings from Perl...
Timothy C. Klein
teece at silverklein.net
Tue Jan 21 14:38:53 MST 2003
* Chip Atkinson (chip at rmpg.org) wrote:
> Greetings,
>
> I'm trying to print a close parenthesis ()) in perl and get warnings when
> trying to do so when using the -w option. Any ideas on how to stop the
> warnings?
>
> Here's the program and output:
>
> chip 17> perl -w syn.pl
> print (...) interpreted as function at syn.pl line 4.
> print (...) interpreted as function at syn.pl line 5.
> print (...) interpreted as function at syn.pl line 6.
> X
> )
> \))
>
> chip 18> cat syn.pl
> #!/usr/bin/perl
>
> print ("X\n");
> print ("\)\n");
> print ('\)');
> print (")\n");
>
>
I don't think it is complaing about the parenthesis, but rather the
space between print and the functional parens:
print "foo"
uses print as a built in. You can also call print as a function:
print("foo").
You are giving:
print ("foo").
The warning is just saying, hey I assumed you meant that as a function.
Take away the space, and the warning will go away. At least it did for
me.
Tim
--
==============================================
== Timothy Klein || teece at silverklein.net ==
== http://i148.denver.dsl.forethought.net ==
== ---------------------------------------- ==
== "Hello, World" 17 Errors, 31 Warnings... ==
==============================================
More information about the LUG
mailing list