[13701] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1111 Volume: 9

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

Date: Mon, 18 Oct 1999 17:05:12 -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: <940291512-v9-i1111@ruby.oce.orst.edu>
Content-Type: text

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

Today's topics:
        Fuser Unix Command in Perl <970680@dcc.unicamp.br>
    Re: Fuser Unix Command in Perl <rra@stanford.edu>
    Re: got it working, thx :) <flavell@mail.cern.ch>
    Re: Ignore the idiots (Craig Berry)
        in the array or not? (Joe Zelwietro)
    Re: OT: Din paper sizes (was Re: PDFlib size settings) <flavell@mail.cern.ch>
    Re: OT: Din paper sizes (was Re: PDFlib size settings) (Sam Holden)
    Re: OT: Din paper sizes (was Re: PDFlib size settings) (Kragen Sitaker)
    Re: perl and encrypted cookies rwentwor@advent.com
    Re: Printing to STDERR -> Console AND filelog? <mshiltonj@yahoo.com>
    Re: Printing to STDERR -> Console AND filelog? <laurensmith@sprynet.com>
    Re: Q: Truncate string length? (Ilya Zakharevich)
    Re: Q: Truncate string length? (Craig Berry)
    Re: Range checking (Henry Penninkilampi)
    Re: Range checking (Sam Holden)
        Unix command ´tree´ in Perl? <970493@dcc.unicamp.br>
    Re: Unix command =?iso-8859-1?Q?=B4tree=B4?= in Perl? (Sam Holden)
    Re: Unix command =?iso-8859-1?Q?=B4tree=B4?= in Perl? (Martien Verbruggen)
    Re: Uses of # (Kragen Sitaker)
    Re: what is SHTML ? (Martien Verbruggen)
    Re: WHATS WRONG WITH THIS CODE? <u2orange@bigfoot.com>
    Re: WHATS WRONG WITH THIS CODE? <boatrite@infi.net>
    Re: WHATS WRONG WITH THIS CODE? <laurensmith@sprynet.com>
    Re: Your quoting strategy and the Jeopardy game (Kragen Sitaker)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 18 Oct 1999 20:46:38 -0200
From: Felipe Guilherme Prata Brito <970680@dcc.unicamp.br>
Subject: Fuser Unix Command in Perl
Message-Id: <380BA34E.5CE448FF@dcc.unicamp.br>

Does anyone have a source code of the Unix command  ´fuser´  in Perl??
Does anyone kwon where can I find it??

Thanks...
Felipe Brito



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

Date: 18 Oct 1999 16:25:00 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Fuser Unix Command in Perl
Message-Id: <yld7ucl0ab.fsf@windlord.stanford.edu>

Felipe Guilherme Prata Brito <970680@dcc.unicamp.br> writes:

> Does anyone have a source code of the Unix command "fuser" in Perl??
> Does anyone kwon where can I find it??

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.

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.

-- 
#!/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 00:50:32 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: got it working, thx :)
Message-Id: <Pine.HPP.3.95a.991019002107.23358K-100000@hpplus01.cern.ch>

On Mon, 18 Oct 1999, dane wrote:

> only one problem now:

Yes, you're on the wrong group for your immediate problem...
c.i.w.authoring.cgi for that.

> $ENV{'REMOTE_HOST'} returns a blank 

Yup, quite common, that.  Whether the name gets looked up in the DNS is
a server configuration issue.  Even if it _is_ looked up, of course, 
it might be an address that doesn't have a name. 

> Any clues?

Take REMOTE_ADDR, convert it to network format and feed it to
gethostbyaddr to get it looked up in the DNS.  You may or may not get an
answer, of course, for the reason just mentioned.

[Shudder: the last time I coded that, I wrote:
$host = gethostbyaddr(pack('C4',split(/\./,$addr)),2);
 - I know better now, thanks to this group!]

perldoc -f gethostbyaddr

shows pretty much how it should be done (with use Socket;, inet_aton and
all that).   This doesn't quite seem to feature in FAQ9 as one might
have anticipated...?

You _do_ understand that this could be the address of a proxy server,
rather than the actual client, yes?




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

Date: Mon, 18 Oct 1999 23:57:41 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Ignore the idiots
Message-Id: <s0ncvl8sr0164@corp.supernews.com>

Nolen Johnson (nolenj@worldnet.att.net) wrote:
: Is Abigail a "he"?
: if so, why a woman's name?
: just wondering.....

To quote the now-famous New Yorker cartoon of several years ago, "On the
Internet, nobody knows you're a dog."  A third of the contributors could
be hermaphroditic three-toed sloths and we'd never know, except perhaps
that the number of FAQs posted might be...um...hmmm. 

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Mon, 18 Oct 99 22:16:20 GMT
From: deplib@citytel.net (Joe Zelwietro)
Subject: in the array or not?
Message-Id: <380b9d30@rsl2.rslnet.net>

Hello All:

I'm trying to do what the perl books say is easy, but not for me presently.

I am trying to get a program (countGatherer) to read in particular values from 
an input file and place them in an array so I can do different things with 
them later. The following code 'kinda' does what I want, but not really.

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.

The programs returns a list of the numbers but I don't believe they're in the 
array I thought they were (See section XXX below) 

-------------------------code below------------------------
#!/usr/bin/perl

#first attempt at countGatherer
#a program which reads a text file and gathers all the various
#counts included within that file

#oct5.log is the file to be searched
open (INPUT, "<oct5.log") or die "Error opening file: $!\n";

open (OUTPUT,">gathered.txt");
@allCheckouts = ();


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

#this section identifies the number of checkouts at each hour
$target = "checkouts";

     if (/$target/) 
        {
        
       s/^\W+//;               #Regex which finds the lines 
       s/\W+$//;               #with checkouts in it
       s/checkouts//;

# I only want the the numbers, nothing else.  So, knowing that the number was 
# the last thing in the line I chose the substr command.  But it doesn't help 
me if the number on the line is ONLY 1 digit.
       print OUTPUT substr($_, -2)."\n";

        }
        }

# section XXX
# I put this following line in to see if the program was doing 
# what I thought, ie. PUTTING THE VALUES AT THE END OF THE LINE
# CONTAINING checkouts INTO THE ARRAY @allCheckouts.
# But upon looking at the file this program generates I see it does NOT.
# @allCeckouts prints out 423
# Where does the 423 come from?

print OUTPUT @allCheckouts." hi there\n";

close (INPUT);
close (OUTPUT);
-----------------------------code ends--------------------------

Thanks for the assistance,

Joe Zelwietro


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

Date: Tue, 19 Oct 1999 00:19:03 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: OT: Din paper sizes (was Re: PDFlib size settings)
Message-Id: <Pine.HPP.3.95a.991019001023.23358J-100000@hpplus01.cern.ch>

On 18 Oct 1999, Sam Holden wrote:

> >>> Do someone know how to encode the german DIN A4-norm ?
> >> 
> >> I don't know what DIN 

It's the German for "German Industry Standard"

> >> stands for,

Well, it probably stands until the next tram comes along...

> >> but the dimensions for A4 are 595x842
> >> points, if that helps.
> >> 
> >
> >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?

Well, it obviously cannot be at one and the same time an exact number of
units each way _and_ have an aspect ratio of sqrt(2), but the principle
is that it's based on an "A0" sheet that has an area of 1 sq.m. and an
aspect ratio of sqrt(2).  Cut it in half and you get two A1 sheets.  Cut
an A1 sheet in half to get two A2 sheets, and so on.  Rather neat.

Obviously in practical terms there are going to be trimming allowances
and such.

Or is this just common knowledge, and I've fallen for a troll?

-- 

     Why is it that most WWW authoring questions begin like this:
        "Here's my problem:  I've got two frames ...".
     And what solution would the panel recommend?  ;-)



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

Date: 18 Oct 1999 23:22:11 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: OT: Din paper sizes (was Re: PDFlib size settings)
Message-Id: <slrn80nat2.nbs.sholden@pgrad.cs.usyd.edu.au>

On Tue, 19 Oct 1999 00:19:03 +0200,
	Alan J. Flavell <flavell@mail.cern.ch> wrote:
>On 18 Oct 1999, Sam Holden wrote:
>
>> >>> Do someone know how to encode the german DIN A4-norm ?
>> >> 
>> >> I don't know what DIN 
>
>It's the German for "German Industry Standard"
>
>> >> stands for,
>
>Well, it probably stands until the next tram comes along...
>
>> >> but the dimensions for A4 are 595x842
>> >> points, if that helps.
>> >> 
>> >
>> >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?
>
>Well, it obviously cannot be at one and the same time an exact number of
>units each way _and_ have an aspect ratio of sqrt(2), but the principle
>is that it's based on an "A0" sheet that has an area of 1 sq.m. and an
>aspect ratio of sqrt(2).  Cut it in half and you get two A1 sheets.  Cut
>an A1 sheet in half to get two A2 sheets, and so on.  Rather neat.

Being Australian the only paper sizes I know are A[0-5] (I've never used
A6 and have no idea if it exists or how far these things go... A10 must be
getting towards a postage stamp ;). I have a vague recollection of foolscap
and also of a B(\d) (maybe they were envelopes for A$1).

Does that count as perl content for this amazingly of topic post?

>
>Obviously in practical terms there are going to be trimming allowances
>and such.
>
>Or is this just common knowledge, and I've fallen for a troll?

I wasn't trolling (not intentionally anyway) I just thought the word 
'exactly' was strange. 'the ratio of the sides is exactly 1:sqrt(2)', the maths
side of me just finds that humourous...

It's almost worth a .sig entry... excpt I'll have to find the original post
again.

-- 
Sam

compiling kernels is what I do most, so they do tend to stick to the
cache ;)	--Linus Torvalds


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

Date: Mon, 18 Oct 1999 23:55:47 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: OT: Din paper sizes (was Re: PDFlib size settings)
Message-Id: <7sOO3.15758$E_1.910711@typ11.nn.bcandid.com>

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

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?
-- 
<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 23:29:36 GMT
From: rwentwor@advent.com
Subject: Re: perl and encrypted cookies
Message-Id: <7ugagm$94j$1@nnrp1.deja.com>



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


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 18 Oct 1999 23:04:34 GMT
From: M Steven Hilton Jr <mshiltonj@yahoo.com>
Subject: Re: Printing to STDERR -> Console AND filelog?
Message-Id: <7ug91t$81v$1@nnrp1.deja.com>

Okay, this is a lame question. FAQ 8 isn't exactly what I'm looking for.

When my script dies because of a die statement, I want that final
output, as well as 'warn' statements written to both the console /and/
the log file. This is not the same as "capturing STDERR from an
external command."

If this is a FAQ, I'm sorry. Really.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 18 Oct 1999 16:28:41 -0700
From: "Lauren Smith" <laurensmith@sprynet.com>
Subject: Re: Printing to STDERR -> Console AND filelog?
Message-Id: <7ugaf8$pid$1@brokaw.wa.com>


M Steven Hilton Jr wrote in message <7ug91t$81v$1@nnrp1.deja.com>...
>Okay, this is a lame question. FAQ 8 isn't exactly what I'm looking
for.
>
>When my script dies because of a die statement, I want that final
>output, as well as 'warn' statements written to both the console /and/
>the log file. This is not the same as "capturing STDERR from an
>external command."
>
>If this is a FAQ, I'm sorry. Really.
You just gotta know where to look

perlfaq5:"How do I print to more than one file at once?"

Lauren




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

Date: 18 Oct 1999 22:08:36 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Q: Truncate string length?
Message-Id: <7ug5p4$7p6$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 <s0mn8aur0186@corp.supernews.com>:
> : I would think it is *ways* better do it the other way around:
> : 
> :    substr($TheField, 500) = "";
> 
> Seemed plausible, but Benchmark disagrees with you:

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

#!/usr/bin/perl -w
# trunc - benchmark different ways of truncating a string
# Craig Berry (19991018)

use strict;
use Benchmark;
use vars '$sample';

$sample = 'a' x 1000;

timethese(100000, {
  substr_rv     => q{
                     $_ = $sample;
                     $_ = substr($_, 0, 500);
                   },
  substr_lv     => q{
                     $_ = $sample;
                     substr($_, 500) = '';
                   },
  substr_4      => q{
                     $_ = $sample;
                     substr($_, 500, 1000000, '');
                   },
  match         => q {
                     $_ = $sample;
                     ($_) = m/(.{0,500})/;
                   },
  none          => q {
                     $_ = $sample;
                   },
});

__END__

Benchmark: timing 100000 iterations of match, none, substr_4,
				       substr_lv, substr_rv...
     match:  5 wallclock secs ( 4.58 usr +  0.00 sys =  4.58 CPU)
      none:  2 wallclock secs ( 1.35 usr +  0.00 sys =  1.35 CPU)
  substr_4:  3 wallclock secs ( 1.92 usr +  0.00 sys =  1.92 CPU)
 substr_lv:  3 wallclock secs ( 2.37 usr +  0.00 sys =  2.37 CPU)
 substr_rv:  3 wallclock secs ( 2.26 usr +  0.00 sys =  2.26 CPU)

Ilya


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

Date: Mon, 18 Oct 1999 22:35:34 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Q: Truncate string length?
Message-Id: <s0n85mmgr0183@corp.supernews.com>

Ilya Zakharevich (ilya@math.ohio-state.edu) wrote:
: 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.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Tue, 19 Oct 1999 09:09:26 +0930
From: spamfree@metropolis.net.au (Henry Penninkilampi)
Subject: Re: Range checking
Message-Id: <spamfree-1910990909270001@d4.metropolis.net.au>

In article <MPG.1273ba093f436e2698a0ad@nntp.hpl.hp.com>, lr@hpl.hp.com
(Larry Rosler) wrote:

> > I'm currently testing for:
> > 
> >   $min < $x <= $max
> > 
> > ....in the predictable manner:
> > 
> > if (($min < $x) and ($x <= $max))
> > 
> > I was just wondering if anyone knows of a more succinct approach?
> 
>   if ($min < $x && $x <= $max)
> 
> Short of the seven superfluous spaces, no one will beat par on this 
> hole.

Exploiting operator precendence to sink four birdies...

Hmmm...

No way to coax the range operator out to play?  (Assuming integers all
round and $min <= $x <= $max this time?)

ala:  if (grep/$x/,$min..$max)

Nowhere near as efficient, but my goal is for something which is short and
*reads easily*, speed is not really an issue - such as this form, for
example:

  if ($x is in <this..range>)

Any magic that can be done with an inclusive range and integer values?

Henry.


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

Date: 18 Oct 1999 23:45:38 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Range checking
Message-Id: <slrn80nc92.nbs.sholden@pgrad.cs.usyd.edu.au>

On Tue, 19 Oct 1999 09:09:26 +0930,
	Henry Penninkilampi <spamfree@metropolis.net.au> wrote:
>In article <MPG.1273ba093f436e2698a0ad@nntp.hpl.hp.com>, lr@hpl.hp.com
>(Larry Rosler) wrote:
>
>> > I'm currently testing for:
>> > 
>> >   $min < $x <= $max
>> > 
>> > ....in the predictable manner:
>> > 
>> > if (($min < $x) and ($x <= $max))
>> > 
>> > I was just wondering if anyone knows of a more succinct approach?
>> 
>>   if ($min < $x && $x <= $max)
>> 
>> Short of the seven superfluous spaces, no one will beat par on this 
>> hole.
>
>Exploiting operator precendence to sink four birdies...
>
>Hmmm...
>
>No way to coax the range operator out to play?  (Assuming integers all
>round and $min <= $x <= $max this time?)
>
>ala:  if (grep/$x/,$min..$max)

You'll need ^ and $ to avoid cases like : $x=12,$min=111,$max=113.

Or you could use == in the grep...

-- 
Sam

these days you're allowed to patent natural laws, and even other people's
genomes.
	-- Tom Christiansen in <374b0ddd@cs.colorado.edu>


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

Date: Mon, 18 Oct 1999 20:51:35 -0200
From: Daniel Apolinario <970493@dcc.unicamp.br>
Subject: Unix command ´tree´ in Perl?
Message-Id: <380BA477.C1B5ECD6@dcc.unicamp.br>

    I would like to know if anybody knows how to implement the unix
command ´tree´ in PERL language.
    Please, mail me if you know how to do it.

Thanks
    Fernando Fatureto



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

Date: 18 Oct 1999 23:24:25 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Unix command =?iso-8859-1?Q?=B4tree=B4?= in Perl?
Message-Id: <slrn80nb19.nbs.sholden@pgrad.cs.usyd.edu.au>

On Mon, 18 Oct 1999 20:51:35 -0200,
	Daniel Apolinario <970493@dcc.unicamp.br> wrote:
>    I would like to know if anybody knows how to implement the unix
>command ´tree´ in PERL language.
>    Please, mail me if you know how to do it.

Did an 'implement a unix command in perl' assignment just approach the due date
or something?

-- 
Sam

We prefer English to remain a rich language, quirky, sloppy, and full
of redundancy. Same for Perl. 
	--Larry Wall


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

Date: Mon, 18 Oct 1999 23:59:33 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Unix command =?iso-8859-1?Q?=B4tree=B4?= in Perl?
Message-Id: <FvOO3.103$W51.2082@nsw.nnrp.telstra.net>

On Mon, 18 Oct 1999 20:51:35 -0200,
	Daniel Apolinario <970493@dcc.unicamp.br> wrote:
>     I would like to know if anybody knows how to implement the unix
> command ´tree´ in PERL language.


wobbie:~> uname -a
Linux wobbie 2.2.5-15 #3 Mon Aug 23 15:48:49 EST 1999 i486 unknown
wobbie:~> tree
tree: Command not found.
wobbie:~> man tree
No manual entry for tree
wobbie:~> 

yukon:~> uname -a
SunOS yukon 5.6 Generic_105181-13 sun4u sparc SUNW,Ultra-5_10
yukon:~> tree
tree: Command not found.
yukon:~> man tree
No manual entry for tree.
yukon:~> 

which general and totally available 'unix' command are you talking about?

Are you doing a couse in Perl?

>     Please, mail me if you know how to do it.

Not a chance. You post here, you read here. It's selfish and rude to
expect anything else.

> Thanks

HTH
Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | You can't have everything, where would you
Commercial Dynamics Pty. Ltd.   | put it?
NSW, Australia                  | 


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

Date: Mon, 18 Oct 1999 23:56:59 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Uses of #
Message-Id: <ftOO3.15769$E_1.913120@typ11.nn.bcandid.com>

In article <7ufug7$e7b$1@towncrier.cc.monash.edu.au>,
Damian Conway <damian@cs.monash.edu.au> wrote:
>Three when it's at home.
>For gaijin, only two.
>So the Oxford says.

Your middle line has either six or eight syllables.
-- 
<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 23:55:41 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: what is SHTML ?
Message-Id: <1sOO3.94$W51.2082@nsw.nnrp.telstra.net>

On Mon, 18 Oct 1999 19:48:42 GMT,
	Brett W. McCoy <bmccoy@foiservices.com> wrote:
> Also Sprach David Christensen <dchristensen@california.com>:
> 
> >>i know what HTML is, but what is SHTML ?
> >
> >I think it is an acronym for "scripted HTML" -- e.g. an html page
> >that contains scripting code.  You name your file foo.shtml to
> >alert your web server that it needs to interpret the page and not
> >just send it.
> 
> SHTML typically means the page contains a server-side include
> (SSI) or some other kind of server directive.

Please do not encourage people to ask off-topic questions in clp.misc.
There are other newsgroups specifically devoted to the subject at
hand. Rather than allowing an endless proliferation of off-topic
posts here, please refer these people to the appropriate forum.

Thank you,

Martien
-- 
Martien Verbruggen                      |
Interactive Media Division              | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


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

Date: Mon, 18 Oct 1999 22:34:22 GMT
From: Mat Tillett <u2orange@bigfoot.com>
Subject: Re: WHATS WRONG WITH THIS CODE?
Message-Id: <380BA203.DF84712A@bigfoot.com>



Jim wrote:
> 
> #!/usr/bin/perl
> 
> print "Content-Type: text/html\n\n";
> print "<HTML><HEAD>\n";
> print "<TITLE>CGI Test</TITLE>\n";
> print "</HEAD>\n";
> print "<BODY><A HREF=\"http://someplace.com\">Click Here</A>\n";
> print "</BODY></HTML>";
> 
> It gives me a 500 error. All I want to know is if there are any errors in
> this code. thanks

The code is fine..  I beleive (THINK) that a 500 error is to do with the
file permissions.  Make sure that when you upload your perl script that
the path to the perl.exe is correct (#!/usr/bin/perl), you upload the
file in ASCII mode and NOT binary, the file permissions are set to
read/write/execute (on the FTP command put CHMOD 755 filename).  with a
bit of luck this will cure your problem.

Mat
u2orange@bigfoot.com


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

Date: Mon, 18 Oct 1999 18:46:57 -0400
From: Brian King <boatrite@infi.net>
Subject: Re: WHATS WRONG WITH THIS CODE?
Message-Id: <380BA361.AB911411@infi.net>

Jim,
just to make sure that it wasnt my eyes missing something, I cut and pasted
the code into my cgi-bin on my apache server.  It worked fine.  It is
probably a permissions prob.  I would make sure that the script is
executable (chmod 755) and that your cgi-bin is set up correctly.  I would
also check to make sure that you are referencing the proper instance of
perl.  Do 'which perl' at the command line if you can and that will tell you
where to find perl.
Good luck!
Brian K.
me@nerdware.com

> #!/usr/bin/perl
>
> print "Content-Type: text/html\n\n";
> print "<HTML><HEAD>\n";
> print "<TITLE>CGI Test</TITLE>\n";
> print "</HEAD>\n";
> print "<BODY><A HREF=\"http://someplace.com\">Click Here</A>\n";
> print "</BODY></HTML>";
>
> It gives me a 500 error. All I want to know is if there are any errors in
> this code. thanks
> Jim



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

Date: Mon, 18 Oct 1999 15:38:16 -0700
From: "Lauren Smith" <laurensmith@sprynet.com>
Subject: Re: WHATS WRONG WITH THIS CODE?
Message-Id: <7ug7gq$ni7$1@brokaw.wa.com>


Jim wrote in message <7ug3f0$lvk$1@bgtnsc01.worldnet.att.net>...
>#!/usr/bin/perl

no '-w'
no 'use strict;'
no 'use CGI;'

>print "Content-Type: text/html\n\n";
>print "<HTML><HEAD>\n";
>print "<TITLE>CGI Test</TITLE>\n";
>print "</HEAD>\n";
>print "<BODY><A HREF=\"http://someplace.com\">Click Here</A>\n";
>print "</BODY></HTML>";
>
>It gives me a 500 error. All I want to know is if there are any errors
in
>this code. thanks
Hey, no sweat.

Lauren




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

Date: Tue, 19 Oct 1999 00:03:10 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Your quoting strategy and the Jeopardy game
Message-Id: <2zOO3.15793$E_1.914322@typ11.nn.bcandid.com>

In article <380b635f_5@news5.newsfeeds.com>,
David Christensen <dchristensen@california.com> wrote:
>I plead guilty, with the following explanation:  Sometimes when I'm
>searching through newsgroups and/or archives, I come across very
>interesting replies but can't find the original. Replies with the
>complete, unaltered original are far more useful in such cases.

I prefer not to wade through messages that consist mostly of copies of
older messages on the dubious theory that maybe I didn't receive some
of the older messages.  I recommend you get a better Usenet provider.

>Should I abandon the above considerations and always follow the
>guidelines?

I would certainly prefer that you do so, and I think a large majority
of other regular posters here feel the same way.
-- 
<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: 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 1111
**************************************


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