my $fh; my %x; open($fh, ...) $x{handle} = $fh print $x{handle} "Wow!\n";
I get the error "String found where operator expected" at the print. I can use a temporary variable as a workaround, but that should be unnecessary:
my $z = $x{handle} print $z "Wow!\n";
Perl hashes work just about everywhere else I've used them, so why don't they work with print?
In reply to Nonsense error from Perl by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |