in reply to Re^3: grep confusion
in thread grep confusion

I caught that LanX, I didn't mean to leave you out of the credits, sorry, everyone here (when I can catch em) help me alot in my ventures, I didn't forget to give the both of you ++ votes though! I think part of my issues here are that I'm running perl in an oracle virtualbox (to protect my main system) and I get arbitrary errors once in a while, my latest 'sometimes' error (which I'm investigating right now) is 'Modification of non-creatable array value attempted' (that just started on a previously fine, executable line before) is starting to get annoying, quite possibly because my script may not have enough memory available, it's up to about 1300 lines @ 52k and the irronious errors are showing up more and more, I'll email you an extra twinkie Lanx, thanx to everyone again...

I tried re-inventing the wheel again, but everytime I push it, it still falls flat on it's side...

Replies are listed 'Best First'.
Re^5: grep confusion
by kcott (Archbishop) on Sep 04, 2017 at 01:22 UTC
    "... 'Modification of non-creatable array value attempted' ..."

    I doubt that has anything to do with VirtualBox. I typically see that when I've used an expression for the array index which evaluates to an invalid value for the index.

    $ perl -e 'my @x; $x[0] = 1' $ perl -e 'my @x; $x[-1] = 1' Modification of non-creatable array value attempted ...

    You can also search for that error in perldiag.

    I'd look for something like '$ary[$i-$n]'. Also check for off-by-one errors: as an entirely contrived example, perhaps you have 'for my $i (0 .. $x)', which should really be 'for my $i (1 .. $x)'.

    — Ken