[13702] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1112 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 18 23:07:31 1999

Date: Mon, 18 Oct 1999 20:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <940302309-v9-i1112@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 18 Oct 1999     Volume: 9 Number: 1112

Today's topics:
        =?iso-8859-1?Q?Re=3A_Unix_command_=B4tree=B4_in_Perl=3F <flavell@mail.cern.ch>
        creating a list of unique records <poser@syspac.com>
        drop down menus <louise@oe-pages.com>
    Re: drop down menus <makkulka@cisco.com>
    Re: encryption and crypt() ? (Martien Verbruggen)
    Re: encryption and crypt() ? (Kragen Sitaker)
    Re: Exact pattern match <paschal1@mindspring.com>
    Re: Exact pattern match (Martien Verbruggen)
    Re: fork (????) <rootbeer@redcat.com>
    Re: Fuser Unix Command in Perl (Martien Verbruggen)
    Re: Fuser Unix Command in Perl (Kragen Sitaker)
    Re: Fuser Unix Command in Perl <rra@stanford.edu>
        How to print password by "crypt" ? <hmaster@factory.co.kr>
    Re: Ignore the idiots (Martien Verbruggen)
    Re: in the array or not? <jeff@vpservices.com>
        making a directory (Jimtaylor5)
    Re: OT: Din paper sizes (was Re: PDFlib size settings) (Sam Holden)
    Re: OT: Din paper sizes (was Re: PDFlib size settings) (Kragen Sitaker)
        Out of memory error & Online DB gives a blank page. <webmaster@realmbbs.com>
    Re: Out of memory error & Online DB gives a blank page. (Martien Verbruggen)
    Re: perl and encrypted cookies (Kragen Sitaker)
    Re: Q: Truncate string length? (Ilya Zakharevich)
    Re: regsetsecurity query for perl32 (Kragen Sitaker)
    Re: Script result to Browser problem! <rootbeer@redcat.com>
    Re: shifting a hash (Kragen Sitaker)
    Re: shifting a hash <uri@sysarch.com>
        System Requirement <ltienheo@starnet.gov.sg>
    Re: Unix command =?iso-8859-1?Q?=B4tree=B4?= in Perl? <makkulka@cisco.com>
    Re: Uses of # (Damian Conway)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 19 Oct 1999 02:19:42 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: =?iso-8859-1?Q?Re=3A_Unix_command_=B4tree=B4_in_Perl=3F?=
Message-Id: <Pine.HPP.3.95a.991019021802.13381B-100000@hpplus01.cern.ch>

On Mon, 18 Oct 1999, Daniel Apolinario wrote:

>     I would like to know if anybody knows how to implement the unix
> command ´tree´ in PERL language.

On a statistic of two different postings from the same site, it 
would appear that they use nonstandard quotation marks in your
country when asking to have their assignments written for them.




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

Date: Mon, 18 Oct 1999 19:55:50 -0700
From: Steve Kirby <poser@syspac.com>
Subject: creating a list of unique records
Message-Id: <380BDDB6.F7C59A69@syspac.com>

creating a list of unique records:

I'm looking for the most efficient way to go through a sorted list and
print only one case of each unique record to a file.

I know it is somewhat simple, but I have a huge list and want it so be
somewhat speedy as I will run it quite often. 

thanks,
 .poser


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

Date: Tue, 19 Oct 1999 00:14:45 GMT
From: "Louise O" <louise@oe-pages.com>
Subject: drop down menus
Message-Id: <01bf19c7$566c7d00$451c1ad8@mpolmo>

Does anyone know how to develop a drop down menu on the fly?  Something
the users could input into?


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

Date: Mon, 18 Oct 1999 17:42:06 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: drop down menus
Message-Id: <380BBE5D.45B190B0@cisco.com>

Louise O wrote:

> Does anyone know how to develop a drop down menu on the fly?  Something
> the users could input into?

popup_menu ( ) in CGI.pm.
--




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

Date: Tue, 19 Oct 1999 00:21:42 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: encryption and crypt() ?
Message-Id: <qQOO3.121$W51.2854@nsw.nnrp.telstra.net>

On Mon, 18 Oct 1999 18:09:45 GMT,
	Kragen Sitaker <kragen@dnaco.net> wrote:
> In article <Pine.GSO.4.10.9910171157310.25558-100000@user2.teleport.com>,
> Tom Phoenix  <rootbeer@redcat.com> wrote:
> >On Sun, 17 Oct 1999, Martin Vorlaender wrote:
> >
> >> Should one just warn against such violations of the calling standard,
> >> or try to do something about it?
> >
> >I'd say: Don't sweat it too much. I was thinking of checking only that
> >there are actually two args, and maybe that the salt is at least two chars
                                                           ^^^^^^^^
> >long.
> 
> Checking the second will probably break most scripts that call crypt(),
> because most of them pass the whole password entry.

If you're commenting on passing the whole password entry for the salt,
the above specification wouldn't break that :)

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Freudian slip: when you say one thing but
Commercial Dynamics Pty. Ltd.   | mean your mother.
NSW, Australia                  | 


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

Date: Tue, 19 Oct 1999 00:23:08 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: encryption and crypt() ?
Message-Id: <MROO3.15838$E_1.917752@typ11.nn.bcandid.com>

In article <MPG.12750deb490f435198a0b9@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>In article <JnJO3.14697$E_1.861761@typ11.nn.bcandid.com> on Mon, 18 Oct 
>1999 18:09:45 GMT, Kragen Sitaker <kragen@dnaco.net> says...
>> In article <Pine.GSO.4.10.9910171157310.25558-100000@user2.teleport.com>,
>> Tom Phoenix  <rootbeer@redcat.com> wrote:
>> >there are actually two args, and maybe that the salt is at least two chars
>> Checking the second will probably break most scripts that call crypt(),
>> because most of them pass the whole password entry.
>
>As they should, because why waste a useless substr?  But you overlooked 
>the 'at least' in TomP's response, which is of course correct.  Nothing 
>should break.

Of course you're right.  I should have known that he wouldn't post what
I thought he'd posted!
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Mon Oct 18 1999
22 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Mon, 18 Oct 1999 20:22:07 -0400
From: David Paschal <paschal1@mindspring.com>
To: abigail@delanet.com
Subject: Re: Exact pattern match
Message-Id: <380BB9AF.2C341C52@mindspring.com>

Abigail wrote:

> Then the operands contain something else than you think they contain.
> I suggest you print them out, and watch for any leading/trailing
> whitespace. Perhaps one of them has a trailing newline?
> 
> Abigail

Doh! The cursed LF .... the field was the last in the record.
I hate it when that happens! I win a bruised forehead for that one.

 Chop ($user)

Thanks Abigail

also thanks to the other guys, I learned from the suggestions

Dave


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

Date: Tue, 19 Oct 1999 01:16:17 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Exact pattern match
Message-Id: <BDPO3.166$W51.3315@nsw.nnrp.telstra.net>

On Mon, 18 Oct 1999 20:22:07 -0400,
	David Paschal <paschal1@mindspring.com> wrote:
> Abigail wrote:
> 
> > Then the operands contain something else than you think they contain.
> > I suggest you print them out, and watch for any leading/trailing
> > whitespace. Perhaps one of them has a trailing newline?
> > 
> > Abigail
> 
> Doh! The cursed LF .... the field was the last in the record.
> I hate it when that happens! I win a bruised forehead for that one.
> 
>  Chop ($user)

While you're changing your code, I would probably make that a chomp.

# perldoc -f chomp

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | +++ Out of Cheese Error +++ Reinstall
Commercial Dynamics Pty. Ltd.   | Universe and Reboot +++
NSW, Australia                  | 


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

Date: Mon, 18 Oct 1999 19:53:21 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: fork (????)
Message-Id: <Pine.GSO.4.10.9910181952240.19476-100000@user2.teleport.com>

On Mon, 18 Oct 1999, Dimitrios Kremmydas wrote:

> I know how to make FTP or SMTP (Net::*) through Perl, but I don't know
> how to make child processes (that means ... make something
> simultaneously) ...
> I know it has something to do with fork and pid and etc. 

Yes. Find a good book on programming on Unix systems. I'd recommend one,
but I've never read any. :-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 19 Oct 1999 00:19:46 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Fuser Unix Command in Perl
Message-Id: <COOO3.120$W51.2854@nsw.nnrp.telstra.net>

On Mon, 18 Oct 1999 20:46:38 -0200,
	Felipe Guilherme Prata Brito <970680@dcc.unicamp.br> wrote:
> Does anyone have a source code of the Unix command  ´fuser´  in Perl??
> Does anyone kwon where can I find it??

- From: Felipe Guilherme Prata Brito <970680@dcc.unicamp.br>
- Newsgroups: comp.lang.perl.misc
- Subject: Fuser Unix Command in Perl
- Date: Mon, 18 Oct 1999 20:46:38 -0200

- From: Daniel Apolinario <970493@dcc.unicamp.br>
- Newsgroups: comp.lang.perl.misc
- Subject: Unix command ´tree´ in Perl?
- Date: Mon, 18 Oct 1999 20:51:35 -0200

Hmmm.. Interesting. Is there a course in Perl at your uni at the
moment? And did the class finish about 15 minutes before you guys
posted these questions?

Don't you, and your esteemed collegue believe in learning through
experience? 

In clc, for example, there is a long established history of
recognising posts about homework, and declining to help. I sincerely
hope we don't have to become as adept at this process as they are over
there. And I hope you will figure out that having someone else do your
homework is not exactly an enriching experience.

At least you didn't ask to be emailed.

Martien

PS. It's not that hard to find out who the person responsible for your
course is. It's also not that hard to send them an email. If they've
got any sense, they'll be monitoring this group anyway.
-- 
Martien Verbruggen              | 
Interactive Media Division      | Make it idiot proof and someone will make a
Commercial Dynamics Pty. Ltd.   | better idiot.
NSW, Australia                  | 


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

Date: Tue, 19 Oct 1999 00:39:54 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Fuser Unix Command in Perl
Message-Id: <u5PO3.15868$E_1.911754@typ11.nn.bcandid.com>

In article <yld7ucl0ab.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
>fuser generally requires doing some degree of kernel or /proc file system
>grovelling and is therefore very non-portable and may be extremely
>difficult to implement in a language other than C.  You can probably do it
>on Linux using Perl since Linux has a very extensive /proc file system
>with plain-text files, but on any other system it could be tricky.

Almost always, things that are possible in C on Unix are possible in
Perl.  The worst part would probably be converting struct definitions
to format strings for unpack, which would have to be done anew for each
version of the ABI.

As long as you can do arbitrary system calls in Perl, and they aren't
too hideous -- e.g. poll() might be kinda tough -- this should present
no obstacle.

>I don't know of anyone who's done fuser in Perl even on Linux; you should
>be able to get the C source easily though.

A project for ppt :)
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Mon Oct 18 1999
22 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: 18 Oct 1999 17:48:42 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Fuser Unix Command in Perl
Message-Id: <yl4sfojhud.fsf@windlord.stanford.edu>

Kragen Sitaker <kragen@dnaco.net> writes:
> Russ Allbery  <rra@stanford.edu> wrote:

>> fuser generally requires doing some degree of kernel or /proc file
>> system grovelling and is therefore very non-portable and may be
>> extremely difficult to implement in a language other than C.  You can
>> probably do it on Linux using Perl since Linux has a very extensive
>> /proc file system with plain-text files, but on any other system it
>> could be tricky.

> Almost always, things that are possible in C on Unix are possible in
> Perl.

Which is why I used the phrase "extremely difficult" and not the word
"impossible."  :)

> The worst part would probably be converting struct definitions to format
> strings for unpack, which would have to be done anew for each version of
> the ABI.

This, I think, qualifies as extremely difficult.

The reason why I wouldn't recommend doing this in Perl is because it
frequently involves calls into weird system C libraries.  And while one
can wrap those calls into an XS module, one is no longer just writing Perl
when that point is reached.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Tue, 19 Oct 1999 12:05:13 +0900
From: "Yeong Mo/Director Hana co." <hmaster@factory.co.kr>
Subject: How to print password by "crypt" ?
Message-Id: <BGrHa0dG$GA.235@news.thrunet.com>

Hi,

I'm trying to make  .htpasswd and .htaccess files through webbrowser.


 .htaccess can be made by cgi script as "print file..."
That's I can do.

Now, I have problem to print .htpasswd.
Since I have tried to make password file using "crypt", I meet errors.

Would someone please help me how to print this file.

Thanks in advance.




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

Date: Tue, 19 Oct 1999 00:27:27 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Ignore the idiots
Message-Id: <PVOO3.126$W51.2854@nsw.nnrp.telstra.net>

On Mon, 18 Oct 1999 13:29:59 -0400,
	Kenneth Bandes <kbandes@home.com> wrote:

> But right now, my news reader tells me I've 785 unread posts in clpm.
> That's a lot of dirt to root through to get to the few truffles of
> really intelligent, thoughtful posts (and by the way, many of those
> come from Abigail among others).  Just taking the time to figure out 
> which posts are worthwhile and which are not would probably lose me
> my job or my marriage.  A little more homework and self-editing by
> people with simple Perl questions would make this a much more
> useful group.

Get some good newsreading software that can do article scoring. Score
some people positively, others negatively. Kill others totally. Set up
a list of subjects to kill or score negatively. Sort by score.

About 75% of the posts in this group reach my screen. The bottom half of
those almost never get read by me.

Since I started doing that, my clpm experience has improved a lot. It
was definitely worth the change of news reader.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Freudian slip: when you say one thing but
Commercial Dynamics Pty. Ltd.   | mean your mother.
NSW, Australia                  | 


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

Date: 18 Oct 1999 23:34:07 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: in the array or not?
Message-Id: <380BAE4F.12CB614E@vpservices.com>

Joe Zelwietro wrote:
> 
> I want the program to find the numbers at the end of any line which contains
> the text checkouts and place those and ONLY those numbers in the array
> @allCheckouts.

You're pretty close, but you have a few problems.

> #!/usr/bin/perl

That line is better with a "-w" at the end of it to turn on warnings and
a "use strict;" after it to make sure your variables are doing what you
think they are.

> open (INPUT, "<oct5.log") or die "Error opening file: $!\n";

Yay! way to go with the error checking!

> open (OUTPUT,">gathered.txt");

Aw, except you forgot the error checking here.

> while (<INPUT>) {
>         chomp;
>         push (@allCheckouts, $_);

You are putting everything into the array since you haven't yet checked
to see if the keyword is in the line yet, you should check first, then
push.

> $target = "checkouts";
>      if (/$target/)

No need to put the word in double quotes, single quote marks would do. 
No need to define this really since you are only using it once, better
to forget the variable $target and just say if(/checkouts/)

>        s/^\W+//;               #Regex which finds the lines
>        s/\W+$//;               #with checkouts in it
>        s/checkouts//;

No need to remove those things, since you remove them later with the
substr anyway.

> # @allCeckouts prints out 423
> # Where does the 423 come from?

Gee, I dunno, you didn't show us what data was used with the script :-).

Here's the script re-written without the file i/o but with the array
doing what you want, it prints "12", "34", "56" on three separate
lines.   This snippet makes use of a very handy thing you can use for
checking your scripts -- everything after the line __END__ is treated as
though it were a file and you can read it in with <DATA> just as though
you had loaded that file into the filehandle DATA.

#!/usr/bin/perl -w
use strict;
my @allCheckouts = ();
while (<DATA>) {
    chomp;
    if (/checkouts/) {
       push (@allCheckouts, substr($_, -2) . "\n" );
    }
}
print @allCheckouts;
__END__
this line does not contain the keyword 00
this line does have checkouts: 12
this line also has checkouts: 34
this line has checkouts too: 56


--
Jeff


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

Date: 19 Oct 1999 02:47:53 GMT
From: jimtaylor5@aol.com (Jimtaylor5)
Subject: making a directory
Message-Id: <19991018224753.05326.00000300@ng-ck1.aol.com>

I've been trying to make a directory with perl to no avail. I've read the perl
FAQ and tried all these variations but no directory is created. Anyone know
what I am doing wrong?

#While in dir I tried this way
mkdir (newone,077);


`mkdir /home/myplace/ftp/dir/newone`;
    chmod 0777, "/home/myplace/ftp/dir/newone";


system "mkdir $Destination" || print "All is not OK\n";

system("mkdir newone,0777") || print "All is not OK\n";

mkdir (  "/home/myplace/ftp/dir/newone", 0777 ) ;

None of these creates a directory. I can create a directory by hand, or agent,
but not by perl.
Anyone know what could be the problem? 


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

Date: 19 Oct 1999 00:07:50 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: OT: Din paper sizes (was Re: PDFlib size settings)
Message-Id: <slrn80ndil.r9t.sholden@pgrad.cs.usyd.edu.au>

On Mon, 18 Oct 1999 23:55:47 GMT, Kragen Sitaker <kragen@dnaco.net> wrote:
>In article <slrn80n3hl.eht.sholden@pgrad.cs.usyd.edu.au>,
>Sam Holden <sholden@cs.usyd.edu.au> wrote:
>>On 18 Oct 1999 20:03:46 -0000, Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>>>Is that right ? I do know that the ratio of the sides is exactly 1:sqrt(2)
>>
>>Since sqrt(2) is irrational, how can that be possible?
>
>A4 paper is an abstraction.  Its sides have exactly a 1:sqrt(2) ratio.
>A4 paper does not exist in the real world, because real-world objects
>do not have exact sizes.  The same is true of US letter paper, which is
>8.5" x 11".

Those Americans are so boring. Rational dimensions, how old fashioned.
I mean 17:22, they aren't even both prime or something. ;)

(Good I remembered the smiley).

>
>However, in both cases, we manufacture close approximations to the
>abstraction in great quantitities.
>
>I am curious about which part of this you did not understand.  Did you
>think Jonathan was saying that the actual paper had infinitely precise
>dimensions?

I found it funny that someone could say that there is a ratio which is
'exactly' 1:sqrt(2). Since the whole idea of irrational numbers is that
they can not be expressed as ratios.

Of course if one side of the ratio is irrational then it is a whole
new ballgame.

I also haven't had any sleep for too long.

I forgot the smiley...

-- 
Sam

Basically, avoid comments. If your code needs a comment to be
understood, it would be better to rewrite it so it's easier to
understand.	--Rob Pike


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

Date: Tue, 19 Oct 1999 00:27:28 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: OT: Din paper sizes (was Re: PDFlib size settings)
Message-Id: <QVOO3.15844$E_1.918410@typ11.nn.bcandid.com>

In article <slrn80ndil.r9t.sholden@pgrad.cs.usyd.edu.au>,
Sam Holden <sholden@cs.usyd.edu.au> wrote:
>I found it funny that someone could say that there is a ratio which is
>'exactly' 1:sqrt(2). Since the whole idea of irrational numbers is that
>they can not be expressed as ratios.

Well, they cannot be expressed as ratios of integers.  You can have
ratios of integers, irrationals, polynomials, whatever you want.

>Of course if one side of the ratio is irrational then it is a whole
>new ballgame.

Right.

>Basically, avoid comments. If your code needs a comment to be
>understood, it would be better to rewrite it so it's easier to
>understand.	--Rob Pike

I agree with this to some extent; I think most of my code is readable
by somebody who knows the language I'm writing in, but only at a low
level.  I think it's hard to make things like, "this is the
authentication protocol found on page 330 of Applied Cryptography 2nd
Edition" and "we have to pass a valid pointer here even though the
system documentation says we can pass a null because the implementation
is broken" obvious from the code.

In general, I generally can tell what code is doing without comments,
if it's well written.  But I can't tell why unless I'm intimately
familiar with the code's specification.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Mon Oct 18 1999
22 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Mon, 18 Oct 1999 21:04:50 -0400
From: Symian <webmaster@realmbbs.com>
Subject: Out of memory error & Online DB gives a blank page.
Message-Id: <VMILOC6fyVmK0SN9QJyaifkRI7Gm@4ax.com>

I have an online database program writen in Perl. Basically, it has
three delimited files (Actors, Movies, Scenes). All three are under
160K each. 

On the screen where users can search by movie title (it shows the name
of the movie, and a list of the stars in it). it gives a blank screen.
If I cut down about 100 records in the Actors file the DB loads the
page fine. 

There are under 4500 movies, 3400 actors, and  7000 scenes listed in
those files. This should not be a problem, should it?

Anyone have any clues about this type of issue?





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

Date: Tue, 19 Oct 1999 01:15:06 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Out of memory error & Online DB gives a blank page.
Message-Id: <uCPO3.165$W51.3315@nsw.nnrp.telstra.net>

On Mon, 18 Oct 1999 21:04:50 -0400,
	Symian <webmaster@realmbbs.com> wrote:
> I have an online database program writen in Perl. Basically, it has
> three delimited files (Actors, Movies, Scenes). All three are under
> 160K each. 
> 
> On the screen where users can search by movie title (it shows the name
> of the movie, and a list of the stars in it). it gives a blank screen.

'It gives a blank screen'. What does that mean? Does your program
deliberately 'give a blank screen'? Are there error messages,
anywhere? Server logs?

> If I cut down about 100 records in the Actors file the DB loads the
> page fine. 
> 
> There are under 4500 movies, 3400 actors, and  7000 scenes listed in
> those files. This should not be a problem, should it?
> 
> Anyone have any clues about this type of issue?

Yep, but we can't tell you what might be wrong unless you show us some
code, preferrably trimmed down to the absolute minumum that shows the
problem.

Since you're running out of memory, it may also be useful to give us
some information about the system you're running this on (perl
version, OS and version, hardware specs).

How do your read and store your files internally? Code! We need to see
code.

Nobody here, even though some claim they have written the magical ESP
modules, actually can read your mind, or can get that sort of
information out of the headers of your post. Be specific.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Think of the average person. Half of
Commercial Dynamics Pty. Ltd.   | the people out there are dumber.
NSW, Australia                  | 


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

Date: Tue, 19 Oct 1999 00:42:48 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: perl and encrypted cookies
Message-Id: <c8PO3.15877$E_1.920627@typ11.nn.bcandid.com>

In article <7ugagm$94j$1@nnrp1.deja.com>,  <rwentwor@advent.com> wrote:
>> I'd like to use perl to encrypt some data that I will store in a
>> cookie on a users machine.
>
>You mean you want to keep someone from looking at something on their own
>computer?
>
>You must be kidding.  You have a lot of f*cking nerve to suggest this.

That was my first reaction, too, and then I realized there might be a
legitimate reason to do this.  For example, he might want to create an
unforgeable cryptographic token.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Mon Oct 18 1999
22 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: 19 Oct 1999 00:58:45 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Q: Truncate string length?
Message-Id: <7ugfo5$99f$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Craig Berry
<cberry@cinenet.net>],
who wrote in article <s0n85mmgr0183@corp.supernews.com>:
> : Unordinary slowness of MAGIC access strikes again.  However, a simple
> : modification helps.  (Note also that I'm using ''-style benchmarking.
> : There is no hope in getting a trustworthy result from sub{}-style
> : benchmarking.)
> 
> I don't suppose you could explain both parts of that, please?  Sounds
> intriguing.

I already did.  In the thread where Tom tried to sell us the crap that
assess to a lexical is as slow as to a hash element.

Ilya


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

Date: Tue, 19 Oct 1999 02:47:11 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: regsetsecurity query for perl32
Message-Id: <PYQO3.16463$E_1.943692@typ11.nn.bcandid.com>

In article <7u6jmn$8ci$1@news.ses.cio.eds.com>, adm <asdf@clkj.com> wrote:
>However I do not understand this...can someone help me as this is very
>urgent.

Urgent help is generally not available from Usenet, especially if you
haven't contributed anything.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Mon Oct 18 1999
22 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Mon, 18 Oct 1999 20:01:38 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Script result to Browser problem!
Message-Id: <Pine.GSO.4.10.9910182000370.19476-100000@user2.teleport.com>

On Mon, 18 Oct 1999, Tobias Byron Carlsson wrote:

> When testing the program with Netscape/MIE I get perfect results if I
> search for info that is in the beginning of the file, if searching for
> something that is somewhere in the middle of the file the results get
> shopped -the whole resulting html page isn't loaded. If I search for
> something that is in the end I get a 500 Internal Server Error...
> 
> When testing the program with telnet it works perfectly.

This seems to be a problem related to CGI, browsers, servers, or some
similar topic. Since it would be the same whether your program is written
in Perl or not, perhaps you should search for a newsgroup about, say, CGI
programming. Good luck!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 19 Oct 1999 00:33:01 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: shifting a hash
Message-Id: <1%OO3.15856$E_1.919196@typ11.nn.bcandid.com>

In article <x3yso38bm2i.fsf@tigre.matrox.com>,
Ala Qumsieh  <aqumsieh@matrox.com> wrote:
>Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca> writes:
>>  foreach (reverse sort keys %errorList)
>
>This sorts lexicographically. You don't want that since your keys are
>numbers. Sort numerically:
>
>	foreach (sort { $b <=> $a } keys %errorList) {
>
>Notice how I dropped the reverse() by interchanging $a and
>$b. Convenient (and probably faster too, but I didn't benchmark).

According to Larry and Uri's paper, reverse sort @x is faster than sort
{$b cmp $a} @x for large @x, by a factor of two or three, I think.

Larry and/or Uri can probably post how you could optimize the above
sort for speed using pack and substr.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Mon Oct 18 1999
22 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: 18 Oct 1999 23:04:26 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: shifting a hash
Message-Id: <x7iu44dpad.fsf@home.sysarch.com>

>>>>> "KS" == Kragen Sitaker <kragen@dnaco.net> writes:

  KS> According to Larry and Uri's paper, reverse sort @x is faster than sort
  KS> {$b cmp $a} @x for large @x, by a factor of two or three, I think.

this advantage may go away in 5.6. i gather from p5p that a simple
numeric sort will be optimized to not do any perl callbacks to the block
but do an internal c compare. i don't know if it will handle the
reversed $a/$b but it should.

  KS> Larry and/or Uri can probably post how you could optimize the above
  KS> sort for speed using pack and substr.

there are ways to make the a packed integers sort in reverse order. the
one we propose is to is to xor the bytes of the integer with 0xFF.

but remember, optimizing sorts is not something you should care about
unless you have profiled you program and found the sorts eat up too much
cpu. premature optimization is not cool.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Tue, 19 Oct 1999 10:39:32 +0800
From: "Willie Lui" <ltienheo@starnet.gov.sg>
Subject: System Requirement
Message-Id: <380bdae4.0@news.cyberway.com.sg>

Hi,
    Does anyone know what is the system requirement for me to install perl
to an Unix system?




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

Date: Mon, 18 Oct 1999 17:42:57 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: Unix command =?iso-8859-1?Q?=B4tree=B4?= in Perl?
Message-Id: <380BBE91.F43A4D67@cisco.com>

Daniel Apolinario wrote:

>     I would like to know if anybody knows how to implement the unix
> command ´tree´ in PERL language.

There is no tree command in Unix.
-



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

Date: 19 Oct 1999 02:50:45 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: Uses of #
Message-Id: <7ugma5$nh4$1@towncrier.cc.monash.edu.au>

kragen@dnaco.net (Kragen Sitaker) writes:

>>Three when it's at home.
>>For gaijin, only two.
>>So the Oxford says.

>Your middle line has either six or eight syllables.

In English it's "gai~jin", and those two syllables do leave the second
line one syllable short.

But if "hai~ku" is really "ha~i~ku" then "gai~jin" is really
"ga~i~jin".

Three syllables. Just like "ironic" ;-)

Damian


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 1112
**************************************


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