in reply to File handle problems

Consider this
#!/usr/bin/perl -w use strict; ( $2, $66 ) = ( 1, 2 ); __END__ Modification of a read-only value attempted at - line 4.
Then read `perldoc perlvar' and `perldoc perlre' to see why $N is special.

Also, error checking++ open FOO, $bar or die "whooops $!";

Also, you may wish to use diagnostics as it gives more wordy error messages, like:

Modification of a read-only value attempted at - line 4 (#1) (F) You tried, directly or indirectly, to change the value of a constant. You didn't, of course, try "2 = 1", because the compile +r catches that. But an easy way to do the same thing is: sub mod { $_[0] = 1 } mod(2); Another way is to assign to a substr() that's off the end of the s +tring. Yet another way is to assign to a foreach loop VAR when VAR is aliased to a constant in the look LIST: $x = 1; foreach my $n ($x, 2) { $n *= 2; # modifies the $x, but fails on attempt to mo +dify the 2 } Uncaught exception from user code: Modification of a read-only value attempted at - line 4.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.