in reply to Out of memory Error

While im not so sure that this is relevent your code isnt valid.
string2 = $account."{".$time."{".$dept."{".$dimset."{"."SchHeadCnt"."{ +".$emp."{".$ty +pe."{".$val;
So if you arent running under strict and warnings this probably isnt doing what you think its doing. Whether this has anything to do with your problem is a different question....

Yves / DeMerphq
---
Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)

Replies are listed 'Best First'.
Re: Re: Out of memory Error
by treebeard (Acolyte) on Aug 15, 2002 at 18:33 UTC
    Your right. I didn't declare string2 and once I did no more errors. I should run with string/warnings but I would ask if anyone can point me to a good std way of declaring all these variables. Thanks for all your help, monks. This issue threw me for a loop as my real issue was sorting these 700k rows while fixing that one field of data (E1 -> E001).
      use the my keyword.
      use strict; use warnings; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); # or our ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
      Note that my is lexical and declarative like a variable declaration in C. There is also our which is used for allowing access to a dynamic variable within a scope without rasing strict/warnings. The statement is scoped but not declarative (the variable exists regardless, but strict will complain anyway.)

      Also it looks like you have picked up some sloppy habits, like not quoting things that should be quoted. These will bite you under strict. But pain is good. Especially when you make it go away. ;-)

      Yves / DeMerphq
      ---
      Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)