On Jun 19, Richard Heintze said: > The following fragment of code retrieves an integer > from an array that is passed by reference. It was > working fine: > > my $t = @$curr_true[$ev_count];
That's ugly syntax. You shouldn't use an array slice when you're getting back ONE value. $foo = @bar[$ix]; is better written as $foo = $bar[$ix]; and Perl will tell you that if you have warnings turned on. Therefore, you should write either my $t = $$curr_true[$ev_count]; or my $t = $curr_true->[$ev_count]; > I made some changes else where in the program (from > which this fragment comes) and suddely both the web > server and (thank goodness) the debugger started > aborting on the above statement! I had not changed > this portion of the program! > > Finally, in dispare, I started randomly > experimenting > and found that this fixes the problem (at 3AM): > > my $t = @{$$curr_true}[$ev_count]; This sounds like $curr_true is not a reference to an array, but rather a reference TO a reference to an array. Find out where you added that layer of indirection. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]