in reply to Re: Out of memory Error
in thread Out of memory Error

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).

Replies are listed 'Best First'.
Re: Re: Re: Out of memory Error
by demerphq (Chancellor) on Aug 15, 2002 at 19:00 UTC
    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)