Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: grep confusion

by LanX (Saint)
on Sep 01, 2017 at 08:09 UTC ( [id://1198500]=note: print w/replies, xml ) Need Help??


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

tybalt89 's and my solution are identical as far as I see.

The only difference is he included the provided data in his example, and you are most probably running my code against broken data.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^4: grep confusion
by PriNet (Monk) on Sep 03, 2017 at 00:20 UTC
    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...
      "... '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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1198500]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-23 07:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found