[9408] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3003 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jun 27 13:12:45 1998

Date: Sat, 27 Jun 98 10:00:35 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 27 Jun 1998     Volume: 8 Number: 3003

Today's topics:
        [-Mail2Html-] <margus@coolbars.ee>
    Re: [-Mail2Html-] (Jonathan Stowe)
    Re: [Q] Hash set in recursion, lost in caller <jdf@pobox.com>
    Re: A kind of TAR with perl (Jonathan Stowe)
    Re: Array Elements (Jonathan Stowe)
    Re: Catching divide-by-zero (M.J.T. Guy)
        CGI Question In Regards To & Char (Ralph Freshour)
    Re: Download file to browser via application/x-compress (Jonathan Stowe)
    Re: Field Sort without modules? <jdf@pobox.com>
    Re: Flames.... birgitt@my-dejanews.com
    Re: Flames.... <jdf@pobox.com>
    Re: Flames.... <tchrist@mox.perl.com>
    Re: How to check variables exists in a string (Larry Rosler)
    Re: Linked list and a code challenge (Snowhare)
    Re: Linked list and a code challenge (Mark-Jason Dominus)
    Re: new2perl - stuck at square 1 (GoldenEYE)
    Re: new2perl - stuck at square 1 (Jonathan Stowe)
        test <ptrainor@bbn.com>
    Re: test (Jonathan Stowe)
        Web Hosting (DCD)
    Re: What a Crappy World (Jonathan Stowe)
    Re: What module to download a gif? <reden@concentric.net>
    Re: What module to download a gif? (Larry Rosler)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sat, 27 Jun 1998 17:16:04 +0300
From: Margus Kohv <margus@coolbars.ee>
Subject: [-Mail2Html-]
Message-Id: <3594FEA4.41A41117@coolbars.ee>

<HTML>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
Hi!
<BR>I have a problem. I have an e-mail address, which's new e-mail I would
like to convert into a html page. I know, that there is a program called
MHonArc which acts like a bbs. But that is not quite what I want. Can anyone
help me. In return I am willing to give help on Flash3, html scripting,
photoshop, javascript.

<P>Koff &lt;<A HREF="mailto:margus@cv.anet.ee?subject=I can help">margus@cv.anet.ee</A>>
</BODY>
</HTML>



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

Date: Sat, 27 Jun 1998 15:25:34 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: [-Mail2Html-]
Message-Id: <359508d2.10728719@news.btinternet.com>

On Sat, 27 Jun 1998 17:16:04 +0300, Margus Kohv wrote :

><HTML>
><BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
>Hi!
><BR>I have a problem. 

Yep, your browser has sent this post with all this HTML crud round and
worse it didnt even have the decency to announce the fact with a
"Content-type" header field.  Thats *very* broken.

>                      I have an e-mail address, which's new e-mail I would
>like to convert into a html page. I know, that there is a program called
>MHonArc which acts like a bbs. But that is not quite what I want. 

This newsgroup is not the place for this kind of thing really is it -
after all such a program could be written in virtually any language.
But as this raised my curiosity and I did *THE SEARCH YOU SHOULD HAVE
DONE BEFORE POSTING* I came up with:

http://caligari.dartmouth.edu/help/2html/mail2html.doc.html

Now this doesnt retrieve mail but it does do the formatting -
retrieval is left as an exercise for the reader. 
>                                                                   Can anyone
>help me. In return I am willing to give help on Flash3, html scripting,
>photoshop, javascript.
>

Oh please.

><P>Koff &lt;<A HREF="mailto:margus@cv.anet.ee?subject=I can help">margus@cv.anet.ee</A>>
></BODY>
></HTML>
>
This seems to indicate that my earlier comments about the browser may
have been premature and that infact this HTML is deliberate. Dont do
it - most newsreaders do not know or care about HTML and most readers
of newsgroups rightly get upset to see it in posts.

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: 27 Jun 1998 11:50:04 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: kissel@kissel.spicerack.ibm.com
Subject: Re: [Q] Hash set in recursion, lost in caller
Message-Id: <n2ayssar.fsf@mailhost.panix.com>

kissel@kissel.spicerack.ibm.com writes:

> I found that, unbeknownst to myself, I WAS scoping that hash with a
> "my" that was carefully hidden from myself, which explains everything.

[Mouth over hand] Wai wold woo wo.

> This shows, conclusively, that I've been at I.B.M. too long, and am
> starting to think less.  Or I need glasses.

THIBMNK!

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: Sat, 27 Jun 1998 14:52:29 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: A kind of TAR with perl
Message-Id: <3594e4c1.1635336@news.btinternet.com>

On Sat, 27 Jun 1998 21:25:45 +1000, David Coldrick wrote :
>Abigail wrote:
>> 
>> There is of course a module on CPAN, but what is wrong with
>> 
>>       system "tar", @options; ?
>> 
>
>Could it be that Jean-Paul is not on a UNIX system? 
>
Not necessarily a problem:

C:\>ver

Caldera OpenDOS 7.01
Copyright (c) 1976, 1997 Caldera, Inc.
All rights reserved.

C:\>tar --version
tar (GNU tar) 1.12

Copyright (C) 1988, 92, 93, 94, 95, 96, 97 Free Software Foundation,
Inc.
This is free software; see the source for copying conditions.  There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

Written by John Gilmore and Jay Fenlason.

The djgpp gnu ports for DOS/Win16 are available at 
http://www.delorie.com/
The Cygwin32 gnu ports for Win32 are available at 
http://www.cygnus.com/

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 27 Jun 1998 15:53:47 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Array Elements
Message-Id: <359514e7.13706368@news.btinternet.com>

On Sat, 27 Jun 1998 12:09:15 GMT, GILLY wrote :

>Tom Phoenix <rootbeer@teleport.com> wrote:
>
>>    sub col_counts {
>>	# Given a reference to an array of (references to) arrays,
>>	# this returns an array giving the sizes of the referenced
>>	# arrays. 
>>	map { scalar @$_ } @{ +shift };
>>    }
>..
>
>what's the meaning of "+" before "shift"?
>where can i find the man page about that?
>perlop?

Yep,

    Unary "+" has no effect whatsoever, even on strings. It is
    useful syntactically for separating a function name from a
    parenthesized expression that would otherwise be interpreted as
    the complete list of function arguments. 

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: 27 Jun 1998 14:48:41 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Catching divide-by-zero
Message-Id: <6n30o9$f87$1@pegasus.csx.cam.ac.uk>

In article <kgcra0dysig.fsf@dervish.cray.com>,  <justinb@cray.com> wrote:
>
>You need to re-read the perlfunc manpage. Short answer is that you're 
>mis-using the $SIG{whatever} statement, but you should probably take a 
>look at eval() as well.

I don't see any "mis-use" of $SIG{whatever}.   And Michael Scott's
example prints out

   Done a div0!!!

as I would expect.   So his non-printing problems lie elsewhere.

But you (and other respondents) are right that eval {} ( *not* eval() )
is a better way to go.


Mike Guy


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

Date: Sat, 27 Jun 1998 15:48:24 GMT
From: ralph@primemail.com (Ralph Freshour)
Subject: CGI Question In Regards To & Char
Message-Id: <3595137c.9339973@news.earthlink.net>

I have a perl cgi script that has been working for many months passing
data from the browser to the unix server to write text data to disk -
I recently discovered that if one of the characters in the text lines
contains an & char, the cgi transfer truncates all of the data
starting from the & char and everything else!!!  In other words, I
only get the data up to the & and not the rest of the data.

What can I do to transfer the & char and not have this happen?

Thank you...

Ralph Freshour



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

Date: Sat, 27 Jun 1998 15:53:41 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Download file to browser via application/x-compress
Message-Id: <359510c1.12758693@news.btinternet.com>

On Sat, 27 Jun 1998 13:37:17 GMT, RHooD wrote :

>Hi !
>
>I have a big problem !!!
>
>I have written a script who download a file from a remote server,
>but when i click in a browser on the href, in the savebox ,
>the name of the perlscript are standing !!!!
>
>how can i tell the browser that the filename is xxx.zip ?????
>

This is unfortunately not anything to do with Perl. It is probably
something to do with your browser, your server or both. You might be
better served taking it to one of the comp.infosystems.www.* groups as
appropriate.

>please answer fast !!! THX
>
Usenet is not a particularly fast medium, I'm afraid and this is after
all Saturday and all self-respecting individuals should be down the
pub or watching the football or something.  The traffic here appears
to reduce to about a fifth at the weekend.

>My ICQ - UIN is 385902 !!!

Gee thanks ;-}

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: 27 Jun 1998 11:56:12 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Trent Hare <trent@jps.net>
Subject: Re: Field Sort without modules?
Message-Id: <k962ss0j.fsf@mailhost.panix.com>

Trent Hare <trent@jps.net> writes:

> Oh, I'm sorry to have disturbed you Abigail. I've been reluctant to post
> a message (question) just for this reason. I have been reading FAQ's and
> tutorials for 3 days trying to find an answer to this question.

Then the onus is on you to *say so* when you first post, so that
people don't lead you to resources you've already exhausted.  It's
part of the etiquette of posting a question here.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: Sat, 27 Jun 1998 15:28:09 GMT
From: birgitt@my-dejanews.com
Subject: Re: Flames....
Message-Id: <6n3329$16l$1@nnrp1.dejanews.com>

In article <1db9b7l.1q7cs1v1656x4mN@roxboro0-022.dyn.interpath.net>,
  phenix@interpath.com (John Moreno) wrote:
>
> <birgitt@my-dejanews.com> wrote:
>
> >   phenix@interpath.com (John Moreno) wrote:
>
> Hmn, I take the "painful" to mean all of the mean spirited response's
> saying "That's in the faq idiot, besides you're stupid and give lousy
> head" (not that I think they are like that, but he seems to).

I have never seen one like that, so they *are* not like it and if they
do *seem* like that it is mostly a matter of your own perception,
of which one has some control over.


> And I
> can't figure out why that would be painful - it right away points out
> that there is something called a "faq" and that it has a whole bunch of
> answers.

It's you who interpreted that I consider this part being painful,
I didn't say it.

> So if somebody starts out lurking they will quickly (very
> quickly) run into a reference to the faq.  I use a offline newsreader
> and have 1,812 articles from the past 5 days - the FAQ is mentioned in
> 267 of those articles (that's not including RTFM responses).

Exactly and that is the part which is also to the newcomer painful.
Realizing that there are 1,812 articles, 267 mention the FAQ, and (I
am too lazy to count how many) hundreds more just about complaining
the current state of affairs.

It will all sort itsself out by creating a moderated group, I assume,
and then it will quiet down, still leaving in .misc enough space to
discuss things which are not strictly Perl language related.

Birgitt Funk


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 27 Jun 1998 11:47:06 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: ws97-868@wsrz1.wiso.uni-erlangen.de
Subject: Re: Flames....
Message-Id: <pvfussfp.fsf@mailhost.panix.com>

ws97-868@wsrz1.wiso.uni-erlangen.de (Franz Kaufmann) writes:

> Of course there are FAQ4s a.s.o but the amount of text,as useful
> it may be for every aspect of perl programming,is often too
> comprehensive.

That's why the information is organized as answers to specific
questions, so that you don't have to read the entire document.  How
could you possibly support the notion that the answers in the FAQs are
"too comprehensive"?

It takes so much less time to find the answer to a question in the FAQ
docs than it does to post and wait for an answer here.  The answers in
the FAQs are correct, and often lead you to the other relevant
sections of the documentation.  They are often amusing.  What is the
frigging problem?

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: 27 Jun 1998 16:10:25 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Flames....
Message-Id: <6n35hh$d7c$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    ws97-868@wsrz1.wiso.uni-erlangen.de writes:
:Of course there are FAQ\xb4s a.s.o but the amount of text,as useful it may 
:be for every aspect of perl programming,is often too comprehensive.

Oh my goodness -- I never realized!  I'll be glad to remove, say,
every second or third FAQ from the next release so that they can be less
comprehensive and easier for the non-programming crowd not to find their
answers in.  The expurgated overly comprehensive bits I guess I'll just
see through Microsoft so that these people intimated by free technical
information can pay for it like they're used it.  Far be it from me to
try to produce something that answers people's questions!  This is very 
easy to fix now that you've pointed out how wrong I was.

BTW, you have a bogotic character in your input: you've used
an acute accent mark rather than an apostrophe.  Something's
screwed up with your keyboard.  I'll bet Microsoft would be happy
to fix it for you for a few hundred bucks.

Thanks for your help.

--tom
-- 
    X-Windows: Live the nightmare.
	--Jamie Zawinski


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

Date: Sat, 27 Jun 1998 07:11:21 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to check variables exists in a string
Message-Id: <MPG.ffe9d5fb5512aac9896fa@nntp.hpl.hp.com>

In article <ltogvfotc7.fsf@asfast.com> on 27 Jun 1998 09:41:12 -0400, 
Lloyd Zusman <ljz@asfast.com> says...
 ...
>   $xxx = "Result: ${\eval{defined($var)?$var:'UNDEFINED'}}";  
 ...
> And I'm confident that there are other variations on this general,
> interpolation-based approach which also would work.

Why not just the following (without the eval):

    $xxx = "Result: ${\(defined($var) ? $var : 'UNDEFINED')}";  

And if one is sure that if $var is defined, it is neither "" nor 0,

    $xxx = "Result: ${\($var || 'UNDEFINED')}";  

Spaces within the expression help in readability and don't get into the 
output.

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 27 Jun 1998 15:59:04 GMT
From: snowhare@devilbunnies.org (Snowhare)
Subject: Re: Linked list and a code challenge
Message-Id: <6n34s8$32k$1@supernews.com>



Nothing above this line is part of the signed message.

In article <6n2ko4$795$1@pegasus.csx.cam.ac.uk>,
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
>Snowhare <snowhare@devilbunnies.org> wrote:
>>Given a finite linked list similiar the one I drew above, determine
>>if a *loop* exists in the linked list with the smallest possible
>>use of memory (scratch variables) and CPU (in other words the
>>lowest order computational complexity). You should return the
>>list element where the loop occurs ('b' in the example above) or
>>null if no loop is present. The linked list is in the form
>>of a hash ($hsh{'1022'} => '3421'; $hsh{'3421'} => '54532';, and
>>so on). The loop may be any size up to and including the entire
>>linked list or as small as 2 elements linked together at the tail.
>
>The standard algorithm to find whether or not there is a loop is O(1)
>space and O(N) time, which is clearly best possible:

Modulo the size of the constants, of course.

>     Set p1 and p2 pointing to the start of the list.
>     At each step, advance p1 by one step, and p2 by two.
>     If we fall off the end, there is no loop.
>     If we find p1 = p2 at any stage, we have a loop.

I created my own O(1) space O(N) time solution many years ago that 
is slightly different (although strongly related) and can 
determine the size of the loop at the time of detection (at
the time I created it about 13 years ago, I had never heard of 
the standard algorithm or anything like it).  

     Set p1 and p2 pointing to the start of the list. Initialize
     a scale counter to '1' and a step counter to '1'. Advance
     p2 by up to scale counter steps, incrementing the step counter
     with each step. If we reach the limit of scale counter steps,
     set p1 equal to p2, double the scale counter, reset the 
     step counter to 1, and repeat the stepping loop. If we fall off the
     end, there is no loop in the list. If we find p1 == p2 at any 
     stage, we have a loop of size step counter.

>But that doesn't identify the start of the loop.   We need to be a bit
>more elaborate:
>
>     When p1 = p2, step p2 until it is again equal to p1.
>     Then the number of steps x is the size of the loop.
>     Now set p1 to the start of the list and p2 x steps along.
>     Step p1 and p2 together until they are equal.   This is the
>     first element of the loop.  (Note p1 and p2 may be equal
>     initially, if the list is all loop.)
>
>That's still O(1) space and O(N) time.

Now all you have to do is code it up into working Perl (hint, hint).

Here is the test harness code to check if the code works correctly:

use Benchmark;

sub do_it { 
  my $routine_ref = shift;
  my %llist=();
  my ($count) = 1;
  while ($count<1000) {
   $llist{$count}=$count+1;
   $count++;
  }

  my ($matched_at);
  for (my $count=1;$count<=1000;$count++) {
    if ($count == 1000) { 
      $llist{999} = undef;
    } else {
      $llist{999} = $count; 
    }
    if (! ($matched_at=$routine_ref->(\%llist,1))) {
      print "No loop for $count\n"; 
    } elsif ($matched_at != $count) {
      print "Incorrectly identified $matched_at as start of loop (should have been $count)\n";
    }
  }
 }

timethese (1, {
 CHRIS    => sub { &do_it(\&chris_berry_findloop) },
 KEVIN    => sub { &do_it(\&kevin_reid_hasloop) },
 #JOHN     => sub { &do_it(\&john_porter_has_loop) },
 #BENJAMIN => sub { &do_it(\&benjamin_franz_has_loop) },
 #STANDARD => sub { &do_it(\&standard_has_loop) },
 });

A correct run should print 'No loop for 1000' and the timing information.

Benjamin Franz



Version: 2.6.2

iQCVAwUBNZUdUejpikN3V52xAQFqQQQAnEGCy9Zk4YVE/zg6BEFBWA9f08fOYX8S
NHAGmra7KZEhC71pFBSgIqEnUZ69pshk3avoy2XJ7hQfLWngznSPIDUNwKVXGpRa
8N4PNFVeXDUH6quD4QmpnjymxtSvmrDOtgTxOHWYr4xkxBr0PkSrXAJtFjgWFDYS
zgh8qlbjfY0=
=FFbS
-----END PGP SIGNATURE-----


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

Date: 27 Jun 1998 12:52:24 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Linked list and a code challenge
Message-Id: <6n3808$2df$1@monet.op.net>

In article <6n0fk9$8d0$1@supernews.com>,
Snowhare <snowhare@devilbunnies.org> wrote:
>I agree that *most* of the usages you would see in 'C' of the simplest
>a->b->c->d type are not necessary in Perl - that does not mean that 
>there are no good uses for them in Perl. 


Then we are in complete agreement, since what I said was ``Linked
lists in Perl are nearly always a very bad design choice.''  And I was
very careful to say `nearly always' instead of `always'.  My article
in TPJ #7, now at http://www.plover.com/~mjd/perl/Streams/ shows a
useful application of linked lists in Perl.

>You can't express more
>complex relationships like   c->a->b->e->f
>                                   ^     |
>                                   |     |
>			           d<----
>
>without the use of the concepts of linked lists. 

Yes, it can.  

  %follower = (
               'a' => 'b',
               'b' => 'e',
	       'c' => 'a', 
               'd' => 'b',
               'e' => 'f',
               'f' => 'b',
	     );

In fact, in your puzzle below, you chose this representation rather
than a linked list representation, which does not do much to support
your contention that the list form is useful.

I would agree with you here.  The hash makes much more sense than the
linked list form.

In contrast, the author of the original article to which I was
objecting might have constructed this data structure with code
something like this:

	sub newnode {
	  my $data = shift; my $next = shift;
	  { DATA => $data, NEXT => $next };
	}

	sub list {
          return undef unless @_;
	  my ($h, @t) = @_;
	  newnode($h, list(@t));
	}

	sub find {
	  my $item = shift;  
	  my $list = shift;
	  return undef unless defined $list;
	  return $list if $list->{DATA} eq $item;
	  find($item, $list->{NEXT});
	}

	$ls = list(qw(c a b e f d));
	$b = find('b', $ls);
	$d = find('d', $b);
	$d->{NEXT} = $b;       # Make loop


>And when writing maximally portable code to manage things like
>b-trees or free space chains for file record storage allocation 
>management, they are unavoidable.

I have implemented B-Tree packages in Perl, and found no use for
linked lists; you are mistaken whan you say they are `unavoidable'.

As for the free space chains, I don't believe you, and I challenge you
to find an example where I would prefer a linked list to an array.

>Linked lists are not a 'C' feature - they are a fundamental
>data structure.

I did not say that they were a C feature; I said that they were
useful to C programmers, in contrast with Perl programmers.

Fundamental or not, linked lists are not usually useful in Perl.

I run into this problem a lot.  It is tempting to discuss all sorts of
fundamental data structures in terms of Perl, but on further
examination I find that the discussion is not really useful.  For
example, I've considered for some time that it might be interesting to
write an article for TPJ about how hash tables work, and to show an
implementation of hash tables in Perl, perhaps something like this:

	sub fetch {
	  my $table = shift;
	  my $key = shift;
	  my $hv = hashval($key);
	  my $bucket = $table->[$hv];
	  my $i;
	  for ($i=0; $i < @$bucket; $i+=2) {
	    if ($bucket->[$i] eq $key) {
	      return $bucket->[$i+1];
	    }
          }
          return undef;
	}

	# and soforth

But the problem with this is that such an implementation would be
useless, because Perl already has built-in hash tables.  The only
purpose that a hash table implementation could serve would be
pedagogical.  It might be a good way to teach about hash tables to
someone who knew Perl, but a Perl programmer has very few reasons for
caring how the hash tables work on the inside.  (Avoiding pathological
hashing behaviors is one possible reason.)

Does this mean that hash tables are always useless?  No.  Does it mean
that hash tables are not a fundamental algorithm?  Of course not.  It
just means that hash tables are not useful *in Perl* because the
language has features that make them unnecessary.  

My argument about the linked lists is similar.  I am not saying that
linked lists are not a fundamental algorithm.  I am saying that for
the things that linked lists are traditionally used for, in Perl there
is nearly always a better choice.





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

Date: Sat, 27 Jun 1998 15:00:31 GMT
From: chat-world@gmx.net (GoldenEYE)
Subject: Re: new2perl - stuck at square 1
Message-Id: <359508cf.15288203@news.infopool.com>

On Sat, 27 Jun 1998 12:50:19 GMT, sowmaster@juicepigs.com (Bob
Trieger) wrote:

>[ posted and mailed ]
>
>"bunyip" <bunyip@bit.net.au> wrote:
>-> When trying to invoke a PERL script either from a hyperlink or as the ACTION
>-> for a form, I'm simply returned an empty HTML page. This seems to happen
>-> with any script I use so I expect its not related to the scripts themselves
>-> but more likely the environment.
>-> 
>-> It would seem my ISP (running NT server) has setup the extension .pl to be
>-> associated with something because I don't just get the file bounced back at
>-> me as would happen by default for an unknown file extension.
>-> 
>-> ISP swears his own scripts work ok on the NT server but wondered whether
>-> anyone could spot my problem from these symptoms?
>
>Do your scripts work from the command line? If so, this isn't a perl problem 
>and you'd have much better luck consulting the documentation or a newsgroup 
>devoted to cgi or your webserver.
>
>news:comp.infosystems.www.authoring.cgi
>news:comp.infosystems.www.servers.ms-windows
>news:microsoft.public.inetserver.iis
>
>HTH
>
>Bob Trieger
>sowmaster@juicepigs.com
>" Cost a spammer some cash: Call 1-800-286-0591
>  and let the jerk that answers know that his
>  toll free number was sent as spam. "

perhaps you lost this line !!!

print "HTTP/1.0 200 OK\n";

if your ISP worked with a dll version of Perl is 's nessasary !


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

Date: Sat, 27 Jun 1998 15:53:43 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: new2perl - stuck at square 1
Message-Id: <35951380.13461952@news.btinternet.com>

On Sat, 27 Jun 1998 15:00:31 GMT, GoldenEYE wrote :

>
>perhaps you lost this line !!!
>
>print "HTTP/1.0 200 OK\n";
>
>if your ISP worked with a dll version of Perl is 's nessasary !

Except of course if one uses CGI.pm ("as recommended by 9 out of 10 of
top Perl breeders") which makes an attempt to do that for you if
necessary.

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 27 Jun 1998 10:15:47 -0400
From: Pat Trainor <ptrainor@bbn.com>
Subject: test
Message-Id: <Pine.LNX.3.95.980627101529.14371D-100000@aura>


 .



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

Date: Sat, 27 Jun 1998 15:53:42 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: test
Message-Id: <359512bf.13268287@news.btinternet.com>

On Sat, 27 Jun 1998 10:15:47 -0400, Pat Trainor wrote :

>
>.
>

Is this some kind of Rohrschach Newsgroup-post test or what ?
The dot operator is documented in the perlop manpage :-O

(alt.test please)

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 27 Jun 1998 11:41:42 -0400
From: sean@SSPPAAMMdcd.net (DCD)
Subject: Web Hosting
Message-Id: <sean-2706981141420001@ts9port10.port.net>

Our Standard Package for virtual servers includes free domain
name registration and free DNS mapping, and features...

    * 5Mb server space 
    * Full HTTP and FTP 
    * Unlimited mail aliasing 
    * Full support for CGIs (Perl5 and C++)

More info: http://www.dcd.net/web/


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

Date: Sat, 27 Jun 1998 14:52:31 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: What a Crappy World
Message-Id: <359502b0.9158908@news.btinternet.com>

On Sat, 27 Jun 98 14:45:53 gmt, Franz Kaufmann wrote :

>
>And ,being as impolite as you are yourself at times,don4t give me any rap 
>about a wrong tone of voice I have struck in this message.
>
What a wonderful thought : " MC Christiansen and the PerlHackers"

or possibly "Public Enemy feat. tchrist":

Dont tell me you cant search that FAQ
With just a little knowledge you can take a crack
At using grep or using find
you can even try out edlin if you're so inclined
But dont whine at me you aint got no tools
I may have the answer but I dont truck with fools

<etc>

But dont tell Tipper Gore

;-}

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: 27 Jun 1998 12:12:25 EDT
From: "Robert Eden" <reden@concentric.net>
Subject: Re: What module to download a gif?
Message-Id: <6n35l9$cgt@examiner.concentric.net>

>I never use die and I never check the return value.  The reason I
>don't is because I mostly use perl for web applications (cgi), and
>because my first and primary purpose in writing CGIs is to produce
>output to the user.

why not add:
$SIG{__DIE__} = sub {
                      open(DIEFILE,"webdie.txt");
                      print DIEFILE join(" ",@_)."\n";
                      close (DIEFILE);
                      exit;
                    }

This would allow *YOU* to see the errors... and use die 8-)
(btw... personally, I don't use die all the time)






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

Date: Sat, 27 Jun 1998 09:34:05 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: What module to download a gif?
Message-Id: <MPG.ffebedc9b0251049896fb@nntp.hpl.hp.com>

In article <6n35l9$cgt@examiner.concentric.net> on 27 Jun 1998 12:12:25 
EDT, Robert Eden <reden@concentric.net> says...
> >I never use die and I never check the return value.  The reason I
> >don't is because I mostly use perl for web applications (cgi), and
> >because my first and primary purpose in writing CGIs is to produce
> >output to the user.
> 
> why not add:
> $SIG{__DIE__} = sub {
>                       open(DIEFILE,"webdie.txt");
>                       print DIEFILE join(" ",@_)."\n";
>                       close (DIEFILE);
>                       exit;
>                     }
> 
> This would allow *YOU* to see the errors... and use die 8-)
> (btw... personally, I don't use die all the time)

                        open(DIEFILE, ">>webdie.txt") or exit;
                        print DIEFILE "@_\n";

No bug on the latter, just cleaner.

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 3003
**************************************

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