Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: I can crash perl

by mark4 (Acolyte)
on Apr 07, 2015 at 09:26 UTC ( [id://1122682]=note: print w/replies, xml ) Need Help??


in reply to Re^2: I can crash perl
in thread I can crash perl

tmp_7 seems to be a typo. It should have been declared with the others.

I am putting on my thinking cap. I am going to re-write this to be more efficient with memory. I have already made it more memory efficient (A little more) and now it doesn't crash (i.e. run out of memory, if that is in fact what's happening). I need to learn how to use hash tables (if that's even the correct term). I think it's time.

Just so ya-all know where I was coming from, I thought using temp variables would allow me to get memory back after I was done with them. (i.e. undef @tmp_1). Yes I know, peek memory would still be an issue. If anyone wants to give me some guidance on how to go about re-writing this I would accept it.

Replies are listed 'Best First'.
Re^4: I can crash perl
by Anonymous Monk on Apr 07, 2015 at 10:13 UTC
      map  { [ $_, expensive($_) } @unsorted

      Note that this expression should be
          map { [ $_, expensive($_) ] } @unsorted
      (missing right-square-bracket) or even
          map [ $_, expensive($_) ], @unsorted
      (needs extra comma).


      Give a man a fish:  <%-(-(-(-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found