perl and memory

Discussion in 'Perl Misc' started by Marcus, Aug 29, 2004.

  1. Marcus

    Marcus Guest

    Im sitting with fairly big perl scripts that I now need to optimize to
    make them less resource intensive for the server.

    If someone could provide some general guidelines in this, that would
    be much appreciated.

    Also, could someone give a proper explanation on the differences
    between assigning values like:

    $something="kskskdjj";

    and

    my $something="kskskdjj";

    and other alternatives.

    I have a feeling this could be a potential memory drain.

    Thanks
    M
    Marcus, Aug 29, 2004
    #1
    1. Advertising

  2. (Marcus) wrote:

    > Also, could someone give a proper explanation on the differences
    > between assigning values like:
    >
    > $something="kskskdjj";
    >
    > and
    >
    > my $something="kskskdjj";
    >
    > and other alternatives.


    See "Coping with Scoping": http://perl.plover.com/FAQs/Namespaces.html
    David K. Wall, Aug 30, 2004
    #2
    1. Advertising

  3. Marcus

    Anno Siegel Guest

    Marcus <> wrote in comp.lang.perl.misc:
    > Im sitting with fairly big perl scripts that I now need to optimize to
    > make them less resource intensive for the server.
    >
    > If someone could provide some general guidelines in this, that would
    > be much appreciated.


    You ask for advice and you're not even saying *what* resources you
    want to optimize. That is ridiculous.

    What is the program doing, and in what way is it tasking the server's
    resources? That is the minimum info needed to even begin answering
    your question.

    Anno
    Anno Siegel, Aug 30, 2004
    #3
  4. Marcus

    Guest

    (Marcus) wrote:
    > Im sitting with fairly big perl scripts that I now need to optimize to
    > make them less resource intensive for the server.


    Make them smaller.

    > If someone could provide some general guidelines in this, that would
    > be much appreciated.


    1) don't slurp large files.

    2) figure out where the memory is going. Don't spend time optimizing
    things that are only a drop in the bucket.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
    , Aug 30, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,772
  2. Matt Oefinger
    Replies:
    0
    Views:
    207
    Matt Oefinger
    Jun 25, 2003
  3. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Jan 23, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    288
    PerlFAQ Server
    Jan 23, 2011
  4. PerlFAQ Server
    Replies:
    0
    Views:
    658
    PerlFAQ Server
    Feb 3, 2011
  5. Dilbert
    Replies:
    0
    Views:
    831
    Dilbert
    Nov 10, 2011
Loading...

Share This Page