The files do get created. I tried IO::File to create the handle but it is the same deal; I've used scalars this way before so way not a hash element?#!/usr/bin/perl -w use strict; my %files; while (<DATA>) { $_=~/^(\w+): (\d) (\w+)/; unless ($files{$1}) { open $files{$1}, ">$1.tmp" || die "Couldn't +open $1.txt...\n"; } print $files{$1} "$2 $3\n"; # No dice! (syntax error) }
In reply to hash element as file handle by halfcountplus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |