[13703] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1113 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 19 03:07:21 1999

Date: Tue, 19 Oct 1999 00:05:10 -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: <940316709-v9-i1113@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 19 Oct 1999     Volume: 9 Number: 1113

Today's topics:
    Re: =?ISO-8859-1?Q?isn=B4t?= there a newbies newsgroup? (J. Moreno)
    Re: creating a list of unique records (Michael Budash)
    Re: creating a list of unique records (Craig Berry)
    Re: creating a list of unique records (Michael Budash)
    Re: help for functioin fork under win98 <jtribbeck@argogroup.com>
    Re: how to install a pm on at a not my server (David Efflandt)
    Re: How to print password by "crypt" ? (David Efflandt)
        Importing symbols and memory usage - Apahce::Registry (Bill Moseley)
    Re: in the array or not? <jeff@vpservices.com>
    Re: in the array or not? (Craig Berry)
    Re: making a directory (David Efflandt)
        Monitoring the clicks of a banner (Kendar)
        newbie (Ran Shoham)
    Re: OT: Din paper sizes (was Re: PDFlib size settings) (Abigail)
    Re: OT: Din paper sizes (was Re: PDFlib size settings) (Abigail)
    Re: perl and encrypted cookies <JFedor@datacom-css.com>
    Re: send mail in perl <danda@hongkong.com>
    Re: send mail in perl (Michael Budash)
    Re: Uses of # <crdevilb@mtu.edu>
    Re: Uses of # (Craig Berry)
    Re: variables on the right side one Reg Exp (Tad McClellan)
        Verifying that it's an image (.jpg, .gif , etc) <bennycc@pacific.net.sg>
    Re: what is SHTML ? <flounder_pounder@telebot.com>
    Re: what is SHTML ? (Abigail)
        why doesn't my script work? mr_potato_head@my-deja.com
        Win32:How can I use my browser to read an external file <efhaynes@cityu.edu.hk>
    Re: Win32:How can I use my browser to read an external  <jeff@vpservices.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 18 Oct 1999 23:28:08 -0400
From: planb@newsreaders.com (J. Moreno)
Subject: Re: =?ISO-8859-1?Q?isn=B4t?= there a newbies newsgroup? where? (basic questions)
Message-Id: <1dzw94l.jeqgstv7etq9N%planb@newsreaders.com>

Matthew Bafford <*@dragons.duesouth.net> wrote:

> Sat, 16 Oct 1999 18:22:44 +0200, a great smashing of the head occured
> against Robert Freund" <r.freund@gmx.de>'s keyboard, causing
> comp.lang.perl.misc to receive this: 
> :Subject: Re: isnīt there a newbies newsgroup? where? (basic questions)
> 
> Yes.
> 
> news.newusers.questions
> news.announce.newusers

You forgot, news.answers, not a discussion group, but it does answer
basic questions...

-- 
John Moreno


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

Date: Mon, 18 Oct 1999 20:06:27 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: creating a list of unique records
Message-Id: <mbudash-1810992006270001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>

In article <380BDDB6.F7C59A69@syspac.com>, Steve Kirby <poser@syspac.com> wrote:

>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

any time i hear "unique list", i think "hash". is that enough of a clue?

hth!
-- 
Michael Budash ~~~~~~~~~~ mbudash@sonic.net


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

Date: Tue, 19 Oct 1999 04:54:03 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: creating a list of unique records
Message-Id: <s0nubbmcr0118@corp.supernews.com>

Michael Budash (mbudash@sonic.net) wrote:
: In article <380BDDB6.F7C59A69@syspac.com>, Steve Kirby <poser@syspac.com> wrote:
: >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. 
: 
: any time i hear "unique list", i think "hash". is that enough of a clue?

Given that the original poster already has a sorted list, which they
presumably want to stay sorted, a hash might not be the best approach.

I might suggest:

  my $prev = $sorted[0];
  print $prev;

  foreach (@sorted[1..$#sorted]) {
    next if $_ eq $prev;
    $prev = $_;
    print;
  }

-- 
   |   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 1999 22:24:18 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: creating a list of unique records
Message-Id: <mbudash-1810992224180001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>

In article <s0nubbmcr0118@corp.supernews.com>, cberry@cinenet.net (Craig
Berry) wrote:

>Michael Budash (mbudash@sonic.net) wrote:
>: In article <380BDDB6.F7C59A69@syspac.com>, Steve Kirby
<poser@syspac.com> wrote:
>: >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. 
>: 
>: any time i hear "unique list", i think "hash". is that enough of a clue?
>
>Given that the original poster already has a sorted list, which they
>presumably want to stay sorted, a hash might not be the best approach.
>

true. never said "best" ... TMTOWTDI ...

>I might suggest:
>
>  my $prev = $sorted[0];
>  print $prev;
>
>  foreach (@sorted[1..$#sorted]) {
>    next if $_ eq $prev;
>    $prev = $_;
>    print;
>  }

i'm damn sure no expert, but here's another way that could conceivably
take less resources than filling an array with acknowledged dupes,
assuming the 'list' is actually read in from a file, which they often are:

open (LIST, "list") or die ($!);
while (<LIST>) { $hash{$_} = 1; }
close LIST;

foreach (sort keys %hash) { print; }
-- 
Michael Budash ~~~~~~~~~~ mbudash@sonic.net


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

Date: Tue, 19 Oct 1999 08:46:54 +0100
From: Jason P Tribbeck <jtribbeck@argogroup.com>
Subject: Re: help for functioin fork under win98
Message-Id: <380C21EE.6E3CF401@argogroup.com>

Federico wrote:
> 
> .... when i try to use the fork function with the Win98 Perl 5 compiler this
> error message compares: "the Unsupported fork functioin is unimplemented at
> line...". Why? How can i do?

Windows (in all its guises) has no concept of forking - effectively
duplicating a processess at a particular execution point, so therefore
there is no way that Perl can fork. The command must still be
interpreted though, and throws up the above error.

Suggestions:

1) Wait until the Fork command is implemented (I've heard this is being
done, but timescales I don't know about);

2) Use a proper OS;

-- 
Jason Tribbeck                                     Argo Interactive ltd
Senior Design Engineer                        7 Dukes Court, Chichester
                                                  West Sussex, PO19 2FX
Tel: +44 1243 815 815 Fax: +44 1243 815 805                     England


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

Date: 19 Oct 1999 05:53:19 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: how to install a pm on at a not my server
Message-Id: <slrn80o1re.9r.efflandt@efflandt.xnet.com>

On Mon, 18 Oct 1999 19:02:54 +0200, Yuval Hamberg <yhm@inter.net.il> wrote:
>I have a free account at www.virtualave.net . I would like to use a pm file.
>is there a way I can install it without accessing the perl directory?
>I have only FTP not telnet or something else and they use Unix.
>
>I think I can't so what sould I do. take the part I need from the pm and
>post it in my perl file? will it work? and will it work good?
>
>thanks

Simple.  You just need to create a directory to keep your modules in, I
created 'site_perl' (you can call it whatever you want) in my home dir.
For MIME::Lite, I created a dir there called MIME and put Lite.pm in it.
The resulting path in my case is /z1/cgi4u/site_perl/MIME/Lite.pm

You have to know your system path to be able to point Perl to your
modules.  See http://cgi-help.virtualave.net/pub/pathtest.txt and put this
in your dir as pathtest.cgi (make sure you ftp upload scripts and modules
as ASCII).  Run pathtest.cgi to see what your path is.

For example to use MIME::Lite in my scripts:

use lib '/z1/cgi4u/site_perl';		# unshifts this path to @INC
use MIME::Lite;		# searches @INC paths for MIME/Lite.pm

-- 
David Efflandt  efflandt@xnet.com  http://www.xnet.com/~efflandt/
http://www.de-srv.com/  http://cgi-help.virtualave.net/
http://thunder.prohosting.com/~cv-elgin/


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

Date: 19 Oct 1999 05:58:32 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: How to print password by "crypt" ?
Message-Id: <slrn80o258.9r.efflandt@efflandt.xnet.com>

On Tue, 19 Oct 1999 12:05:13 +0900, Yeong Mo/Director Hana co.
<hmaster@factory.co.kr> wrote:
>
>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.

http://www.xnet.com/~efflandt/pub/htpasswd.pl

-- 
David Efflandt  efflandt@xnet.com  http://www.xnet.com/~efflandt/
http://www.de-srv.com/  http://cgi-help.virtualave.net/
http://thunder.prohosting.com/~cv-elgin/


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

Date: Mon, 18 Oct 1999 20:52:17 -0700
From: moseley@best.com (Bill Moseley)
Subject: Importing symbols and memory usage - Apahce::Registry
Message-Id: <MPG.12758aca1a43e24d98980e@nntp1.ba.best.com>

I'm looking at converting some scripts over to run under 
Apache::Registry.

One of the scripts uses CGI.pm's function interface, importing :standard 
& :html.  I've read that importing the symbols can add up to quite a bit 
of memory usage.  Should I a) not import any symbols and just use the 
package name in all the calls, or b) switch over to using the Object 
interface (and why, if you don't mind), or c) not worry about it?

Running 'top' show one script using 11MB, so it's hard to imagine how 
much effect not importing the symbols would have overall.

Speaking of 11MB -- this script also forks a bunch of children (at one 
point there are ten children running around.  Is there really 10 x 11MB 
memory usage happening?  I'd guess most of it is swapped out.  But I 
don't know enough about Unix to know what's happening.  Any other tools 
available to look (and understand) how my program's using memory?

Another question about running under Apache::Registry.  In a few 
programs I open STDERR to a log file.  Under mod_perl do I end up 
capturing all the STDERR from all the scripts running under that server 
process?



-- 
Clueless about mod_perl:
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: 19 Oct 1999 03:32:13 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: in the array or not?
Message-Id: <380BE61F.452770C8@vpservices.com>

Jeff Zucker (me) wrote:
> 
> Joe Zelwietro wrote:
> >        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.

I was too hasty there.  I really don't know what your data looks like,
so maybe you do need those lines to prep the data so that the substr
will catch the part you want.

-- 
Jeff


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

Date: Tue, 19 Oct 1999 04:31:55 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: in the array or not?
Message-Id: <s0nt1r81r0137@corp.supernews.com>

Joe Zelwietro (deplib@citytel.net) wrote:
: 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

No -w?  No 'use strict'?  Why go out of your way to stop perl from helping
you debug your code?

: #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");

Why check one open's success and not the other?  Checking all of them pays
off, believe me.

: @allCheckouts = ();

No need to initialize it empty.  The array springs into existence empty
when mentioned.

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

Given you want to keep a list of all lines, why not do

  @allCheckouts = <INPUT>;
  chomp @allCheckouts;

then iterate over that list below?

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

So you want any string of numbers "at the end of the line" -- which I'll
interpret as "followed only by possible whitespace and the end of the
line"?  Why not do

  if (/$target.*(\d+)\s*$/) {

 ...skip all the s///s above...

:        print OUTPUT substr($_, -2)."\n";

 ...and then do

    print OUTPUT "$1\n";

-- 
   |   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: 19 Oct 1999 06:14:34 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: making a directory
Message-Id: <slrn80o339.9r.efflandt@efflandt.xnet.com>

On 19 Oct 1999 02:47:53 GMT, Jimtaylor5 <jimtaylor5@aol.com> wrote:
>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?

Yes, you are failing to test why it failed as in:
mkdir newone,0777 || die "can't mkdir: $!\n";

or

unless (mkdir newone,0777) {
    # print some useful html that includes $! error msg
}

-- 
David Efflandt  efflandt@xnet.com  http://www.xnet.com/~efflandt/
http://www.de-srv.com/  http://cgi-help.virtualave.net/
http://thunder.prohosting.com/~cv-elgin/


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

Date: Tue, 19 Oct 1999 04:13:33 GMT
From: heron@hell.com (Kendar)
Subject: Monitoring the clicks of a banner
Message-Id: <380bef7e.75418546@news.supernews.com>

Does anyone know of any script that would monitor
the clicks on a given banner? I have CGI access.
Thank you in advance!

medusa@beaute.org



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

Date: 19 Oct 1999 04:13:23 GMT
From: rshoham@acs5.acs.ucalgary.ca (Ran Shoham)
Subject: newbie
Message-Id: <7ugr53$i4g$1@nserve1.acs.ucalgary.ca>

Hi there, I'm a Perl newbie.

I'm trying to figure out how to extract information from a file that I 
have already existing.

The file consists of lines of the following format:

<someword>: <number_of_files> <filename1.txt> <filename1.txt> .... 


I want to do something like the following:

while ($line = <FILE>) {
   ($word, $number, $array_of_files) = split(" ", $line);
   


but how would I get the array_of_files to work?
I can't figure that out.


any suggestions welcome.


Ran

--
           -----------------
           | Cat's Ass man!|
           -----------------


         ("`-''-/").___..--''"`-._
          `0_ 0  )   `-.  (     ).`-.__.`)
          (_Y_.)'  ._   )  `._ `. ``-..-'
        _..`--'_..-_/ /--'_.' ,'
       ((('   (((-(((''  (((( 


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

Date: 19 Oct 1999 01:32:48 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: OT: Din paper sizes (was Re: PDFlib size settings)
Message-Id: <slrn80o43o.e3k.abigail@alexandra.delanet.com>

Sam Holden (sholden@pgrad.cs.usyd.edu.au) wrote on MMCCXXXIX September
MCMXCIII in <URL:news:slrn80nat2.nbs.sholden@pgrad.cs.usyd.edu.au>:
:: 
:: 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).

A10 is about 26 x 37 mm. B sizes are between A sizes, such that A(n-1)
> Bn > An, and the scaling factor to go from An to Bn is the same as the
scaling factor to go from Bn to A(n-1). Similary, C size are between the
B and C sizes, following the same scaling factor argument. That makes
Cn size envelopes the appropriate envelop for An size paper. You don't
want to get mail in a C0 envelop, the monster is 917 x 1297mm.

This has been an ISO standard for more than 2 decades; the ISO standard
is an almost verbatim copy of the DIN standard, which dates, IIRC, from
the first part of the current century.

Too bad the US is about the only country left not using the standard.


Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 19 Oct 1999 01:35:40 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: OT: Din paper sizes (was Re: PDFlib size settings)
Message-Id: <slrn80o496.e3k.abigail@alexandra.delanet.com>

Kragen Sitaker (kragen@dnaco.net) wrote on MMCCXXXIX September MCMXCIII
in <URL:news:7sOO3.15758$E_1.910711@typ11.nn.bcandid.com>:
?? 
?? 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".

Uhm, 11/8.5 doesn't come anywhere near sqrt(2). 



Abigail
-- 
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 19 Oct 1999 02:28:44 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: perl and encrypted cookies
Message-Id: <7uh0n5$13k$1@plonk.apk.net>


rwentwor@advent.com wrote in message <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.


A very smart idea!  We encrypt our cookies too.  I wouldn't want any of
our customers lending their computers to someone and them being able to
extract Credit Card numbers, Expiration Dates and Credit Card type
from looking at their cookies!

Check CPAN for encryption routines.

Jody




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

Date: Tue, 19 Oct 1999 13:09:27 +0800
From: danny ho <danda@hongkong.com>
Subject: Re: send mail in perl
Message-Id: <380BFD06.C82A3F0A@hongkong.com>



Jonathan Stowe wrote:

> danny ho <dannyho@mail.com> wrote:
> > i would like to ask if i use perl script to send email, to be called
> > from a www html. i reference the mail programme path in perl
> > as /usr/bin/perl in unix.
> >

sorry, typing mistake. i mean invoking the mail programme path as
/usr/sbin/sendmail in perl

> No you dont that's perl.
>
> You might want to see the section on sending mail in perlfaq9.

where can i find perlfaq9?

danny




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

Date: Mon, 18 Oct 1999 22:28:07 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: send mail in perl
Message-Id: <mbudash-1810992228070001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>

In article <380BFD06.C82A3F0A@hongkong.com>, danny ho <danda@hongkong.com>
wrote:

>Jonathan Stowe wrote:
>
>> danny ho <dannyho@mail.com> wrote:
>> > i would like to ask if i use perl script to send email, to be called
>> > from a www html. i reference the mail programme path in perl
>> > as /usr/bin/perl in unix.
>> >
>
>sorry, typing mistake. i mean invoking the mail programme path as
>/usr/sbin/sendmail in perl
>
>> No you dont that's perl.
>>
>> You might want to see the section on sending mail in perlfaq9.
>
>where can i find perlfaq9?
>
>danny

if unix, type 'perldoc perlfaq9' at the prompt.

if nt, my condolences...
-- 
Michael Budash ~~~~~~~~~~ mbudash@sonic.net


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

Date: 19 Oct 1999 03:19:57 GMT
From: Colin R. DeVilbiss <crdevilb@mtu.edu>
Subject: Re: Uses of #
Message-Id: <7ugo0t$p4p$1@campus3.mtu.edu>

Damian Conway <damian@cs.monash.edu.au> wrote:
> 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" ;-)

 ...or maybe even ``ga~i~ji~n'', as kragen's ``or eight'' was implying. :)
by the way, are japanese syllables and their pronunciation sufficiently OT?

just wondering. :)
enjoying this thread thorougly anyway. :)

Colin DeVilbiss
crdevilb@mtu.edu


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

Date: Tue, 19 Oct 1999 04:46:40 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Uses of #
Message-Id: <s0nttg5or0115@corp.supernews.com>

Colin R. DeVilbiss (crdevilb@mtu.edu) wrote:
: ...or maybe even ``ga~i~ji~n'', as kragen's ``or eight'' was implying. :)
: by the way, are japanese syllables and their pronunciation sufficiently OT?
: 
: just wondering. :)
: enjoying this thread thorougly anyway. :)

  Five brief syllables
  Or seven; Perl wizards
  Miscount either way.

And yes, this does depend on a two-syllable reading of 'Perl' (PURR-uhl),
but that's how it's commonly pronounced at least in my corner of geekdom.

-- 
   |   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 1999 19:50:50 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: variables on the right side one Reg Exp
Message-Id: <qobgu7.i9b.ln@magna.metronet.com>

Garrett Walker (cuz@remus.rutgers.edu) wrote:


   Uhhh, well putting them on the wrong side would be, ...
   well ... wrong.

   So by all means, put them on the right side.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 19 Oct 1999 12:33:03 +0800
From: Benny Chee <bennycc@pacific.net.sg>
Subject: Verifying that it's an image (.jpg, .gif , etc)
Message-Id: <380BF47E.70E8BBF7@pacific.net.sg>

Hi,

    Is there a module for win32(acitveperl win95) perl that can read
    the headers of an image and detect that it is an image file?

Benny
bennycc@pacific.net.sg



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

Date: Tue, 19 Oct 1999 03:50:16 +0000
From: Flounder <flounder_pounder@telebot.com>
Subject: Re: what is SHTML ?
Message-Id: <380BEA78.7F6E3FD2@telebot.com>

> .shtml is not a markup language or anthing it is just the ending most
> servers are set to use as a clue that there are SSI in that file and
> to parse them. So .shtml files are just plain HTML files with SSI
> (Server Side Includes) in them.



> >i know what HTML is, but what is SHTML ?
> >how is it different from HTML ?



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

Date: 19 Oct 1999 01:16:24 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: what is SHTML ?
Message-Id: <slrn80o352.e3k.abigail@alexandra.delanet.com>

Ally Kwon (ewha95@shinbiro.com) wrote on MMCCXL September MCMXCIII in
<URL:news:380BF886.71538C91@shinbiro.com>:
~~ i know what HTML is, but what is SHTML ?
~~ how is it different from HTML ?


A lot. It has nothing at all to do with HTML. SHTML stands for

   Standford High Throwing Midget League.

Not to be confused with SFTML, the 

   Standford Far Throwing Midget League.



HTH. HAND.



Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 19 Oct 1999 06:33:47 GMT
From: mr_potato_head@my-deja.com
Subject: why doesn't my script work?
Message-Id: <7uh3cb$oss$1@nnrp1.deja.com>

Hi,
  I have a small part of my script here and it works great when I run it
from the command line.  But when I call this exact same script from my
browser via cgi, then it get the wrong answer everytime.  If my
$uptime_array[12] = say 5, then the red ball is picked if I run this at
the command line.  If I run this in the cgi, then it picks the green
ball.  I have no clue why it does this.    If I put the results of
$uptime_array[12] into a variable and do the if statement "if ( $a >= 3)
{"  then I still have the same problem.  I tried to
int($uptime_array[12]) and it still doesn't work.  If I hard code the
$uptime_array[12] to say 5 then the red ball is pick and the cgi picks
the red ball as well.  I don't understand why I get these results.
Help, Help, Help.  Thanks in advance...

@host_list = ("othermachine");
foreach $host ( @host_list ) {
   $uptime{$host} = `rsh othermachine uptime`;
}
foreach $host ( @host_list ) {
   @uptime_array = split(/ +/, $uptime{$host});
   chop $uptime_array[12];
   if ($uptime_array[12] > 3 ) {
      $load{$host} = "http://my.computer.com/icons/red_ball.gif";
   }else{
      $load{$host} = "http://my.computer.com/icons/green_ball.gif";
   }
}


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


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

Date: Tue, 19 Oct 1999 11:44:39 +0800
From: Haynes <efhaynes@cityu.edu.hk>
Subject: Win32:How can I use my browser to read an external file
Message-Id: <380BE927.96031B8E@cityu.edu.hk>

I just start using perl, definitively a beginner.

Question 1:
I try to use netscape communicator/IE to open a file TEST1.cgi

print "Content-type: text/html\n\n";
print "<HTML>\n<BODY BGCOLOR=\"#FFFFFF\">\n\n";
open (TEST1, "test1.txt");
while (<TEST1>)
{
print;
}
close (TEST1);
print "</BODY>\n";
print "</HTML>";

test1.txt, is a text file with some numbers
I can display the content of test1.txt file when I type "perl test1.cgi" under
command prompt.
However, if I use my browser:
Error message saying, Cannot load application, Reason=30

Question 2:
My utlimate goal is to use my browser to read an external text file & use GD.pm
to draw a simple x-y graph. How can I let my browser know I am using perl command
like "open" or the "GD.pm"

Thank you very much

haynes



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

Date: 19 Oct 1999 04:36:35 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Win32:How can I use my browser to read an external file
Message-Id: <380BF531.1E238CC3@vpservices.com>

Haynes wrote:
> 
> I try to use netscape communicator/IE to open a file TEST1.cgi
>
> print "Content-type: text/html\n\n";

There is no "shebang" line, a line starting with #! then a path to perl,
something like

#!/usr/bin/perl -w

Exactly what your shebang line should look like depends on where perl is
located on your machine and what your webserver documents say it should
look like.  You are using a webserver aren't you?  If not, you need to
get one (www.apache.org, or search for 'httpd + your_OS'), if you want
to be able to see your cgi in a browser. 

There should definitely be a -w on the end of your shebang line so you
can find errors.

After the shebang line, you should have a line that says "use strict;"
so you can find other errors.

> open (TEST1, "test1.txt");

And that line should also look for errors with:

open (TEST1, "test1.txt") or die "Couldn't open test1.txt: $!";

Otherwise, your script is fine.  It works, I just ran it.

-- 
Jeff


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

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 1113
**************************************


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