[lug] Print warnings from Perl...
Chip Atkinson
chip at rmpg.org
Tue Jan 21 14:54:10 MST 2003
Ok, thanks. That was really wierd. I call print all the time with a
space before the parentheses. Taking either away works great.
Thanks again guys!
Chip
On Tue, 21 Jan 2003, Timothy C. Klein wrote:
> * 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... ==
> ==============================================
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
>
More information about the LUG
mailing list