THuG has asked for the wisdom of the Perl Monks concerning the following question:
struct ( DEVICE => { datetime => '$', devicetype => '$', zip => '$', version => '$'});
my $$entry[3] = new DEVICE;
It didn't like the [], and it didn't like $$ in a my statement, so I wound up with...
struct ( DEVICE => { datetime => '$', devicetype => '$', zip => '$', version => '$'});
my $sn = $entry3;
$$sn = new DEVICE;
Now it doesn't like something. The error is "Modification of a read-only value attempted at verify.pl line 41, <LOG> chunk 1." LOG is a file handle I have open in read-only, and all of this action (save the struct() statement) is inside a while(<LOG>){}. Line 41 is the $$sn = new DEVICE; line.
No where in this script do I write to that file handle. I think the error is bogus, and that it somehow doesn't like the anon reference thingie.
Help?
Thanks,
Travis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Anon Struct Instance
by btrott (Parson) on Jul 11, 2000 at 19:20 UTC | |
|
Re: Anon Struct Instance
by THuG (Beadle) on Jul 11, 2000 at 19:34 UTC | |
by ferrency (Deacon) on Jul 11, 2000 at 20:13 UTC | |
|
RE: Anon Struct Instance
by ferrency (Deacon) on Jul 11, 2000 at 19:24 UTC | |
|
Re: Anon Struct Instance
by THuG (Beadle) on Jul 11, 2000 at 20:56 UTC | |
|
Re: Anon Struct Instance
by THuG (Beadle) on Jul 11, 2000 at 21:23 UTC | |
by ferrency (Deacon) on Jul 11, 2000 at 21:34 UTC |