sgifford has asked for the wisdom of the Perl Monks concerning the following question:
But this doesn't work under use strict; it generates:sub print { printto(select,@_); }
Here's a short example program that gives the same error:Can't use string ("main::STDOUT") as a symbol ref while "strict refs" +in use...
Anybody have a better way of doing this? Or should I juse use no strict 'refs'?#!/usr/bin/perl -w use strict; my $fh = select; print $fh "Hello\n";
Thanks!
Edit by tye, change PRE to CODE around long line
|
|---|