[24780] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 6933 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 30 14:06:07 2004

Date: Mon, 30 Aug 2004 11:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 30 Aug 2004     Volume: 10 Number: 6933

Today's topics:
        Can't write to a text file through CGI-Perl (Kishore)
    Re: Can't write to a text file through CGI-Perl jgilber@yahoo.com
    Re: Can't write to a text file through CGI-Perl <jurgenex@hotmail.com>
    Re: Execute Windows program from Perl script (??) (Randal L. Schwartz)
        N00b to PERL... help!! (ft4bredn)
    Re: N00b to PERL... help!! <jurgenex@hotmail.com>
    Re: N00b to PERL... help!! <noreply@gunnar.cc>
    Re: N00b to PERL... help!! $_@_.%_
        Net::SSH::Perl to connect to a remote server via a web  <nospam@nospam.org>
        newbie question <mij@soulshiiek.com>
    Re: newbie question <jurgenex@hotmail.com>
    Re: newbie question <matternc@comcast.net>
    Re: newbie question (Anno Siegel)
    Re: OS/2 port of Perl 5.8 not adding CR to \n (Seymour J.)
    Re: Parsing a text file into an array <bernard.el-haginDODGE_THIS@lido-tech.net>
    Re: passing arguments to subroutines <jurgenex@hotmail.com>
    Re: perl and memory ctcgag@hotmail.com
    Re: Removing entries in array based on another array <jurgenex@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 30 Aug 2004 08:52:20 -0700
From: krishnakishore.r.challa.lzi1@statefarm.com (Kishore)
Subject: Can't write to a text file through CGI-Perl
Message-Id: <e1c7fb54.0408300752.33936253@posting.google.com>

Hi,

I have perl program and it writes some data to a text file that is in
cgi-bin/log. And this file does not exist. So the program creates it
and then writes to it.

When I run the perl program from shell it creates and writes to the
text file fine.

But when I run the same program from http as a cgi, it gives me an
error saying that I do not have permission to create or write to this
file.

The cgi-bin has 0755 and log directory in cgi-bin also has 0755
permission settings.

Is there anything else I should do.

When I run from shell, I login as root.

Thanks for your help in advance.

Kishore.


------------------------------

Date: 30 Aug 2004 09:01:09 -0700
From: jgilber@yahoo.com
Subject: Re: Can't write to a text file through CGI-Perl
Message-Id: <cgvj05$g0a@odah37.prod.google.com>

"When I run from shell, I login as root"

There's your answer.  root has permission to write to any directory.
I doubt that the owner of the http process has the same permissions
unless (forbid) you're running as root.

Change ownership of the log directory to the same user as is running
the webserver.



------------------------------

Date: Mon, 30 Aug 2004 16:11:52 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Can't write to a text file through CGI-Perl
Message-Id: <clIYc.3237$bD5.2558@trnddc03>

Kishore wrote:
> I have perl program and it writes some data to a text file that is in
> cgi-bin/log. [...]
> When I run the perl program from shell it creates and writes to the
> text file fine.

Then it is extremely unlikely that you have a Perl issue.

[...]
> Is there anything else I should do.

You should read the FAQ, in particular "perldoc -q 500"

jue 




------------------------------

Date: 30 Aug 2004 09:31:21 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Execute Windows program from Perl script (??)
Message-Id: <86pt58d1uu.fsf@blue.stonehenge.com>

*** post for FREE via your newsreader at post.newsfeed.com ***

>>>>> "Zebee" == Zebee Johnstone <zebee@zip.com.au> writes:

Zebee> I think that attitude of many perlprogs is why learn.perl.org was
Zebee> started.  The people there *want* folk to program in perl and are
Zebee> willing to help them learn to do so.  

And here too.  I dare you to show me one posting where a well-reasoned
question is posted with relevant info that isn't answered in a FAQ, that
doesn't get a serious answer in response.

The problem is that 90% of the posts here are the kind that wouldn't
even be tolerated by a paid-for help desk, which CLPM clearly is not.

Zebee> That said...  one useful thing a forum like this does is make you thnk
Zebee> about what you ask, and that act of thinking can mean you get the
Zebee> answer.

Zebee> I've pondered a couple of questions, started writing them, realised I
Zebee> needed more info or to test something, and found a workable solution.

Hooray for you!  Best use of shared resources!  That's what is
*supposed* to happen.

Zebee> It's made me work, not take the easy way out.

Zebee> I suspect most folk starting out would be better off at learn.perl.org

No, most folk starting out should get tutorial books or take training
classes, not ask their first question in the first two hours on here
or any other free resource.

Programming is not trivial.  It takes study and discipline, and not
running to mommy every time something doesn't work.  Unless you're
paying mommy to stand there. :)

print "Just another Perl hacker,"; # the original

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


 -----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----
                  


------------------------------

Date: Mon, 30 Aug 2004 15:49:54 GMT
From: none@anytime.net (ft4bredn)
Subject: N00b to PERL... help!!
Message-Id: <C0IYc.21795$nk.16149@okepread05>

I have recently become interested in PERL, after trying to figure 
out how MRTG works. I found out I knew nothing about SNMP or PERL, 
and I want to... I have gotten ahold of a few resource on the web, 
and am now looking to buy a book to teach myself PERL, but what do 
you guys think is the best way to learn PERL? From a book, otr 
looking at source? I learn well by doing both. I have browsed books 
at stores, but none grabbed me as the best to learn from.. Anyway, 
any help you can provide will be greatly appreciated. Thanks!!
Joe

----------------------------------------------
Posted with NewsLeecher v1.0 beta 26
 * Binary Usenet Leeching Made Easy
 * http://www.newsleecher.com/?usenet
----------------------------------------------



------------------------------

Date: Mon, 30 Aug 2004 16:01:18 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: N00b to PERL... help!!
Message-Id: <ibIYc.3233$bD5.2269@trnddc03>

ft4bredn wrote:
> I have recently become interested in PERL, after trying to figure

Please note, the programming language you are probably talking about is 
called Perl, the interpreter for Perl is called perl.
If you really want to discuss PERL (whatever that may be), then you came to 
the wrong place.
Some people are very particular about the proper spelling.

> out how MRTG works. I found out I knew nothing about SNMP or PERL,
> and I want to... I have gotten ahold of a few resource on the web,
> and am now looking to buy a book to teach myself PERL, but what do
> you guys think is the best way to learn PERL? From a book, otr
> looking at source?

Yes ;-)

> I learn well by doing both. I have browsed books
> at stores, but none grabbed me as the best to learn from.. Anyway,
> any help you can provide will be greatly appreciated. Thanks!!

Perl comes with an extensive online documentation. You should become 
familiar with it asap.
Once you've installed the Perl system just do a "perldoc -q <SubjectMatter>" 
to search the FAQ for "SubjectMatter".
A quick search for "book" ("perldoc -q book") reveals:

<FAQ>
  Perl Books

            A number of books on Perl and/or CGI programming are available.
            A few of these are good, some are OK, but many aren't worth your
            money. Tom Christiansen maintains a list of these books, some
            with extensive reviews, at
            http://www.perl.com/perl/critiques/index.html .

            The incontestably definitive reference book on Perl, written by
            the creator of Perl, is now (July 2000) in its third edition:

                Programming Perl (the "Camel Book"):
                    by Larry Wall, Tom Christiansen, and Jon Orwant
                    0-596-00027-8  [3rd edition July 2000]
                    http://www.oreilly.com/catalog/pperl3/
                (English, translations to several languages are also 
available)

            The companion volume to the Camel containing thousands of
            real-world examples, mini-tutorials, and complete programs is:

                The Perl Cookbook (the "Ram Book"):
                    by Tom Christiansen and Nathan Torkington,
                        with Foreword by Larry Wall
                    ISBN 1-56592-243-3 [1st Edition August 1998]
                    http://perl.oreilly.com/cookbook/

            If you're already a hard-core systems programmer, then the Camel
            Book might suffice for you to learn Perl from. If you're not,
            check out

                Learning Perl (the "Llama Book"):
                    by Randal Schwartz and Tom Christiansen
                                with Foreword by Larry Wall
                    ISBN 1-56592-284-0 [2nd Edition July 1997]
                    http://www.oreilly.com/catalog/lperl2/

            Despite the picture at the URL above, the second edition of
            "Llama Book" really has a blue cover and was updated for the
            5.004 release of Perl. Various foreign language editions are
            available, including *Learning Perl on Win32 Systems* (the
            "Gecko Book").

            If you're not an accidental programmer, but a more serious and
            possibly even degreed computer scientist who doesn't need as
            much hand-holding as we try to provide in the Llama or its
            defurred cousin the Gecko, please check out the delightful book,
            *Perl: The Programmer's Companion*, written by Nigel Chapman.

            Addison-Wesley (http://www.awlonline.com/) and Manning
            (http://www.manning.com/) are also publishers of some fine Perl
            books such as Object Oriented Programming with Perl by Damian
            Conway and Network Programming with Perl by Lincoln Stein.

            An excellent technical book discounter is Bookpool at
            http://www.bookpool.com/ where a 30% discount or more is not
            unusual.

            What follows is a list of the books that the FAQ authors found
            personally useful. Your mileage may (but, we hope, probably
            won't) vary.

            Recommended books on (or mostly on) Perl follow.

            References
                    Programming Perl
                        by Larry Wall, Tom Christiansen, and Jon Orwant
                        ISBN 0-596-00027-8 [3rd edition July 2000]
                        http://www.oreilly.com/catalog/pperl3/

                    Perl 5 Pocket Reference
                        by Johan Vromans
                        ISBN 0-596-00032-4 [3rd edition May 2000]
                        http://www.oreilly.com/catalog/perlpr3/

                    Perl in a Nutshell
                        by Ellen Siever, Stephan Spainhour, and Nathan 
Patwardh
n
                        ISBN 1-56592-286-7 [1st edition December 1998]
                        http://www.oreilly.com/catalog/perlnut/

            Tutorials
                    Elements of Programming with Perl
                        by Andrew L. Johnson
                        ISBN 1884777805 [1st edition October 1999]
                        http://www.manning.com/Johnson/

                    Learning Perl
                        by Randal L. Schwartz and Tom Christiansen
                            with foreword by Larry Wall
                        ISBN 1-56592-284-0 [2nd edition July 1997]
                        http://www.oreilly.com/catalog/lperl2/

                    Learning Perl on Win32 Systems
                        by Randal L. Schwartz, Erik Olson, and Tom 
Christiansen
                            with foreword by Larry Wall
                        ISBN 1-56592-324-3 [1st edition August 1997]
                        http://www.oreilly.com/catalog/lperlwin/

                    Perl: The Programmer's Companion
                        by Nigel Chapman
                        ISBN 0-471-97563-X  [1st edition October 1997]
                        http://catalog.wiley.com/title.cgi?isbn=047197563X

                    Cross-Platform Perl
                        by Eric Foster-Johnson
                        ISBN 1-55851-483-X [2nd edition September 2000]
                        http://www.pconline.com/~erc/perlbook.htm

                    MacPerl: Power and Ease
                        by Vicki Brown and Chris Nandor,
                            with foreword by Matthias Neeracher
                        ISBN 1-881957-32-2 [1st edition May 1998]
                        http://www.macperl.com/ptf_book/

            Task-Oriented
                    The Perl Cookbook
                        by Tom Christiansen and Nathan Torkington
                            with foreword by Larry Wall
                        ISBN 1-56592-243-3 [1st edition August 1998]
                        http://www.oreilly.com/catalog/cookbook/

                    Effective Perl Programming
                        by Joseph Hall
                        ISBN 0-201-41975-0 [1st edition 1998]
                        http://www.awl.com/

            Special Topics
                    Mastering Regular Expressions
                        by Jeffrey E. F. Friedl
                        ISBN 1-56592-257-3 [1st edition January 1997]
                        http://www.oreilly.com/catalog/regex/

                    Network Programming with Perl
                        by Lincoln Stein
                        ISBN 0-201-61571-1 [1st edition 2001]
                        http://www.awlonline.com/

                    Object Oriented Perl
                        Damian Conway
                            with foreword by Randal L. Schwartz
                        ISBN 1884777791 [1st edition August 1999]
                        http://www.manning.com/Conway/

                    Data Munging with Perl
                        Dave Cross
                        ISBN 1930110006 [1st edition 2001]
                        http://www.manning.com/cross

                    Learning Perl/Tk
                        by Nancy Walsh
                        ISBN 1-56592-314-6 [1st edition January 1999]
                        http://www.oreilly.com/catalog/lperltk/

</FAQ>

BTW: You would have found this and much more if you would have bothered to 
ask aunt Google first. After all you are not exactly the first person to ask 
this question.

jue 




------------------------------

Date: Mon, 30 Aug 2004 18:00:57 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: N00b to PERL... help!!
Message-Id: <2ph1b4Fl1tmhU1@uni-berlin.de>

ft4bredn wrote:
> what do you guys think is the best way to learn PERL? From a book,
> otr looking at source?

I for one like to combine those. And study the Perl (not PERL) docs,
of course.

> I have browsed books at stores, but none grabbed me as the best to
> learn from..

Start here:

     http://learn.perl.org/

Good luck!

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


------------------------------

Date: Mon, 30 Aug 2004 16:19:53 GMT
From: $_@_.%_
Subject: Re: N00b to PERL... help!!
Message-Id: <JsIYc.4735$B91.2594@trndny08>


none@anytime.net (ft4bredn) wrote in message-id:
<C0IYc.21795$nk.16149@okepread05>
>
>I have recently become interested in PERL, after trying to figure 
>out how MRTG works. I found out I knew nothing about SNMP or PERL, 
>and I want to... 

First learn how to parse MIB's (pretty simple).
Then learn RegEx's, after that you can use IO::Socket or one
of the SNMP modules on CPAN to issue SNMP commands.




------------------------------

Date: Mon, 30 Aug 2004 09:07:21 -0400
From: "Christian Caron" <nospam@nospam.org>
Subject: Net::SSH::Perl to connect to a remote server via a web page
Message-Id: <cgv8q9$7991@nrn2.NRCan.gc.ca>

Hi,

I'm trying to use Net::SSH::Perl to connect to a remote server via a web
page. The webserver is running as an unprivileged user (webserve).

This code does work fine from the command line (as user webserve), but when
I try the same code from the web interface, it prints everything up to the
$ssh->cmd() line...

Is this a security feature? Any solution for something like this to work?

Thanks!

=============================================

Code:

---------------------------------------------

#!/usr/local/bin/perl

use Net::SSH::Perl;

use strict;

my $server = 'server';

my $un = 'username';

my $pw = 'password';

print "Content-type: text/html\n\n";

print "<html><body>\n";

print "Testing Net::SSH::Perl\n";

my $ssh = Net::SSH::Perl->new("$server", port=>'22', protocol=>'1,2');

print "1...<br>";

$ssh->login($un, $pw);

print "2...<br>";

my ($stdout, $stderr, $exit) = $ssh->cmd("ls");

print "3...<br>";

print "stdout is $stdout<br>\n";

print "stderr is $stderr<br>\n";

print "exit is $exit\n";

print "</body></html>";

=============================================



=============================================

Output from command line:

---------------------------------------------

name# perl x.cgi

Content-type: text/html

<html><body>

Testing Net::SSH::Perl

1...<br>2...<br>3...<br>stdout is CSSdomain_01.sql

check_version_unix.cgi

list

manic

public_html

reindex

scripts

test

<br>

stderr is <br>

exit is 0

</body></html>

=============================================



=============================================

Output from web page (source):

---------------------------------------------

<html><body>

Testing Net::SSH::Perl

1...<br>2...<br>

=============================================




------------------------------

Date: Mon, 30 Aug 2004 16:08:46 GMT
From: soulshriek <mij@soulshiiek.com>
Subject: newbie question
Message-Id: <pan.2004.08.30.16.05.01.908438@soulshiiek.com>

hey

i just started learning perl 2 days ago.

and i have a little question and i can't find the answer on the net.

i tested this little script

#!/usr/bin/perl

use warnings;
use strict;

my $var = 0;

until ($var == 1.2) # 
{
	print "$var\n";
	$var += 0.1;
}

and it does what it's surposed to do

but when i change

until ($var == 1.2) into until ($var == 1.1)

something strange happens

my perl version is 5.8.3 btw

could someone please explain this to me, i like to know why stuff happens

because everything happens for a reason

greetz

Soulshriek



------------------------------

Date: Mon, 30 Aug 2004 16:21:55 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: newbie question
Message-Id: <DuIYc.3239$bD5.147@trnddc03>

soulshriek wrote:
> i just started learning perl 2 days ago.
> and i have a little question and i can't find the answer on the net.

You were looking at the wrong place. Your problem has nothing to do with 
Perl.

> i tested this little script
[...]
> until ($var == 1.2) #

You must have missed the first day of the "Basics of Computer Numerics" 
class.

    ==> Thou shalt not use equality tests for floating point numbers

Futher details see e.g. "perldoc -q 999" and google.com
Hint: instead of comparing for equality you can test if the numbers are 
within an epsilon distance of each other.

jue 




------------------------------

Date: Mon, 30 Aug 2004 13:00:22 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: newbie question
Message-Id: <2cudnWgdNrm1wK7cRVn-uQ@comcast.com>

soulshriek wrote:

> hey
> 
> i just started learning perl 2 days ago.
> 
> and i have a little question and i can't find the answer on the net.
> 
> i tested this little script
> 
> #!/usr/bin/perl
> 
> use warnings;
> use strict;
> 
> my $var = 0;
> 
> until ($var == 1.2) #
> {
> print "$var\n";
> $var += 0.1;
> }
> 
> and it does what it's surposed to do

By the grace of God and great good luck.  *Never* test a floating-point
number for equality; floating-point numbers are approximations, and
may not line up equal when they should
> 
> but when i change
> 
> until ($var == 1.2) into until ($var == 1.1)
> 
> something strange happens

You got an infinite loop, right?
> 
> my perl version is 5.8.3 btw
> 
> could someone please explain this to me, i like to know why stuff happens

Comparing floating-point numbers for equality does not work
reliably; don't do it.  In the above example, use "until ($var >= 1.2)"
(or 1.1).  Then your program will always come to halt.  In fact,
in the above example, you could use "until ($var >=1.15)" (or
1.05).  Now, not only will your program always come to a halt, it
will always come to a halt where you expect it to.  Always remember
to make allowances for the imprecision of float-point.
> 
> because everything happens for a reason
> 
> greetz
> 
> Soulshriek

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


------------------------------

Date: 30 Aug 2004 17:03:11 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: newbie question
Message-Id: <cgvmkf$euf$1@mamenchi.zrz.TU-Berlin.DE>

Jürgen Exner <jurgenex@hotmail.com> wrote in comp.lang.perl.misc:
> soulshriek wrote:
> > i just started learning perl 2 days ago.
> > and i have a little question and i can't find the answer on the net.
> 
> You were looking at the wrong place. Your problem has nothing to do with 
> Perl.
> 
> > i tested this little script
> [...]
> > until ($var == 1.2) #
> 
> You must have missed the first day of the "Basics of Computer Numerics" 
> class.
> 
>     ==> Thou shalt not use equality tests for floating point numbers
> 
> Futher details see e.g. "perldoc -q 999" and google.com
> Hint: instead of comparing for equality you can test if the numbers are 
> within an epsilon distance of each other.

To end a loop like that, I'd use

    until ( $var >= 1.1 )

That way you don't have to use and (the hard part) decide about an epsilon.
In fact, I tend to control loops with inequalities rather than equalities
even with integers, just in case an index is somehow skipped.

Anno


------------------------------

Date: Mon, 30 Aug 2004 13:34:14 -0300
From: "Shmuel (Seymour J.) Metz" <spamtrap@library.lspace.org.invalid>
Subject: Re: OS/2 port of Perl 5.8 not adding CR to \n
Message-Id: <41336516$2$fuzhry+tra$mr2ice@news.patriot.net>

In <cgteiq$21m4$1@agate.berkeley.edu>, on 08/29/2004
   at 08:33 PM, Ilya Zakharevich <nospam-abuse@ilyaz.org> said:

>Hint: a bug report

I wanted to first confirm that I had installed the correct version. I
had assumed that enough people were using the OS/2 port that this
could not be new. 

>But trying to read your mind: are you using syswrite()?

Print, with the default (STDOUT) file handle. Does that go through
syswrite?

If this is indeed the correcxt version, do I report the bug to CPAN?
If not, what is the proper URL?

Thanks.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org



------------------------------

Date: Mon, 30 Aug 2004 15:43:23 +0200
From: "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net>
Subject: Re: Parsing a text file into an array
Message-Id: <Xns9555A0730203elhber1lidotechnet@62.89.127.66>

genericax@hotmail.com (Sara) wrote:

> sroth1979@hotmail.com (Scott) wrote in message
> news:<26dbb845.0408160912.6a549090@posting.google.com>... 
>> I having a bit of trouble trying to parse...
>> 
>> 789798798       test,test      12/5/3005
>> 
>> with tabs between each column. Does any one have some
>> suggestions? 
> 
> Sho nuff scooter..

*groan*
 
>   open F, $myFile;


"You should always, yes *always*, check the result of open()."
         -- Tad

  open (F, $myFile) or die $!;


>   my @lines = <F>;
>   close F;
>   for (@lines)


You can substitute all three of the above lines with:


  while (<F>)


>     {my @line = split /\s+/; # assumes you have no whitespace in


split() defaults to splitting on whitespace if the pattern isn't 
provided so


  my @line = split;


[snipped rest of code]


-- 
Cheers,
Bernard


------------------------------

Date: Mon, 30 Aug 2004 13:51:48 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: passing arguments to subroutines
Message-Id: <UhGYc.864$O85.582@trnddc05>

Roman Rodriguez wrote:
> Can anyone tell me if you can pass scalars and list to subroutines?
> if so, what is the syntax?

perldoc perlsub

> what am I doing wrong in the following
> code?

perl is saying:
    Missing right curly or square bracket at C:\tmp\t.pl line 24, at end of 
line
That means your curly brackets are not balanced.

[code snipped]

jue 




------------------------------

Date: 30 Aug 2004 16:58:06 GMT
From: ctcgag@hotmail.com
Subject: Re: perl and memory
Message-Id: <20040830125806.931$7E@newsreader.com>

mygooglegroupsaccount@yahoo.com (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


------------------------------

Date: Mon, 30 Aug 2004 14:00:46 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Removing entries in array based on another array
Message-Id: <iqGYc.889$O85.477@trnddc05>

Leif Wessman wrote:
> my @names ("bob","barney","-","lisa","UNKNOWN");
> my @delete ("-","unknown","n/a");
>
> @names minus @delete ==> "bob", "barney", "lisa"
> @names diff @delete ==> "bob", "barney", "lisa", "n/a"

Hmmm, yes, and?
What do you mean to convey to us with this posting? Do you have a question? 
Is this the solution of some problem (which problem?)? Did you just make and 
earth-shattering discovery?

You may want to add some explanatory text. That is the usual way to 
communicate on Usenet because only very few people are mind readers.

jue 




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 6933
***************************************


home help back first fref pref prev next nref lref last post