develooper Front page | perl.beginners | Postings from February 2002

What's up with STDOUT in a function call?

Thread Next
Steven M. Klass
February 28, 2002 07:43
What's up with STDOUT in a function call?
Message ID:
Hi all,

	Heres a simple one

&PrintSummary ("STDOUT", /%runset);

sub PrintSummary {
   $prtout = shift;
   print $prtout "This is a test"

Why doesn't this work?

I get the error 
Can't use string ("STDOUT") as a symbol ref while "strict refs" is in use at line 5.

How can I get around this?

 Steven M. Klass
 Physical Design Manager

 National Semiconductor Corp
 7400 W. Detroit Street
 Suite 170
 Chandler AZ 85226


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About