[8677] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2294 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 10 19:07:15 1998

Date: Fri, 10 Apr 98 16:00:23 -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           Fri, 10 Apr 1998     Volume: 8 Number: 2294

Today's topics:
    Re: 365 Perl Consultants and Developers (Abigail)
    Re: an interesting problem <franzen@pmel.noaa.gov>
    Re: an interesting problem <dcameron@nospam.bcs.org.uk>
    Re: Bill Gates should be invited to O'Reilly's "Free So (Pat Luther)
    Re: Bill Gates should be invited to O'Reilly's "Free So (Joseph Buck)
    Re: contexts: is there such a thing as array? (Tye McQueen)
    Re: Diddling with search engines via CGI (John Heidemann)
    Re: File download problem in IE4.0 (Abigail)
    Re: General Rudeness, e.g. Re: Need a web login script (I R A Aggie)
    Re: General Rudeness, e.g. Re: Need a web login script <sonny@88net.net>
        help please <Sianpreece@btinternet.com>
        Intermittent Perl problems <Scott_LeWarne@BigFoot.com>
    Re: Is it the code or is it the server? <sanct@dlc.fi>
    Re: Is it the code or is it the server? (Craig Berry)
    Re: Is it the code or is it the server? <sanct@dlc.fi>
    Re: Is it the code or is it the server? (Craig Berry)
    Re: Is it the code or is it the server? (Abigail)
    Re: keys in hashs (Chris Nandor)
    Re: Newbies simple question - NT/Perl <arunas@a!nm.org>
        Numeric validation <ppp-support@canelle.telecom.uqam.ca>
    Re: Perl Puzzle: How Many Contexts? (Chris Nandor)
        Regular expression strangeness <melo@co.telenet.pt>
    Re: RMS should be invited to O'Reilly's "Free Software  harman@omsi.com
    Re: sendmail substitute for Macperl (Paul J. Schinder)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 10 Apr 1998 22:05:31 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: 365 Perl Consultants and Developers
Message-Id: <6gm53b$rdf$3@client3.news.psi.net>

j5rson@iversonsoftware.com (j5rson@iversonsoftware.com) wrote on
MDCLXXXIII September MCMXCIII in <URL: news:6glpoq$140$1@nnrp1.dejanews.com>:
++ As of this morning we have 365 consultants and developers in the directory
++ with Perl experience.


What do you do in leap years?



Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET", "http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content)) =~ /(.*\))[-\s]+Additional/s) [0]'


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

Date: Fri, 10 Apr 1998 13:37:41 -0700
From: Nathan Franzen <franzen@pmel.noaa.gov>
Subject: Re: an interesting problem
Message-Id: <Pine.SOL.3.96.980410130920.16050B-100000@corona.pmel.noaa.gov>

On 10 Apr 1998, Phil Ehrens wrote:

[code extracted below]

>=head 
>
> call as:
>          phildb database 3 italian french etc.
>
> where a database of translations is provided
> and "3" is an entry to search for
> italian french etc. are the langs to return 
> the word in!
>
> here is the database contents:
>
>une uno una 1 one ein
>deux dos due 2 two tswei
>trois tres trese 3 three drei
>quatre quatro quattro 4 four fier
>cinq cinco cinque 5 five funf
>
>=cut
>
>BEGIN{ 
>$n = 0;
>$delimiter  = " "; # the database delimiter
>$output_sep = "\n"; # the output seperator
>$french     = 0;   # column descriptors
>$spanish    = 1; 
<$italian    = 2;
>$integer    = 3;
>$english    = 4;
>$german     = 5;
>
>if($#ARGV > 2){ # when more than one field is requested
>   while($n <= $#ARGV){$language[$n++] = pop(@ARGV);}
>  }
> else{$language[0] = pop(@ARGV);} # only one field was requested

Wouldn't
  
  @language = splice @ARGV, 2

be a little easier than this?  Of course, it wouldn't reverse the ordering
of the languages, but I don't understand why you want them reversed

>$search_str = pop(@ARGV); # search string is $ARGV[2];
>@foo = <>; # read whole database ($ARGV[1]) into memory

Actually, search string is $ARGV[1], and the filename is $ARGV[0]

>} # end of BEGIN block
>
>foreach(@foo){
>        if(@foo[$i] =~ /$search_str/io){

make that $foo[$i], as below

>           @current_line = split($delimiter,@foo[$i]);
>           $j = 0;
>           
>           # the next block SHOULD return the listed translations,
>           # but it doesn't!?  it ALWAYS returns language[0] (french)!
>           # returning the french value 3 times if three langs are
>           # requested!  what's the deal?
>           foreach(@language){
>               printf("%s%s",@current_line[@language[$j++]],$output_sep);
>                  }

It looks to me like you really would want
               printf("%s%s",$current_line[$language[$j++]],$output_sep);

but I believe what's going on is that you are taking, say, $language[3],
which evaluates to, say, 'german'.  Since you are using the string,
'german' as an array index, you get the numerical value of that string, 0.

You really want to use a hash.  The definitions of $french, $german, etc
have no effect in this program.  [I don't think that you should try using
them as soft reference or anything like that - a hash is much better].
Read some documentation. "Learning Perl" is an excellent book.  Keep on.

Hope this helps,

-Nathan Franzen





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

Date: 10 Apr 1998 21:53:24 GMT
From: "Duncan Cameron" <dcameron@nospam.bcs.org.uk>
Subject: Re: an interesting problem
Message-Id: <01bd64ca$c66ac7a0$152f63c3@dns.btinternet.com>

It may be a typing error but shouldn't
>                   
printf("%s%s",@current_line[@language[$j++]],$output_sep);

refer to $language etc. @language[$j++] is an array slice not a scalar. 
Evaluating it in a scalar context gives the number of elements.

Phil Ehrens <phil@math.univ-tlse1.fr> wrote in article
<352E586F.A892101@math.univ-tlse1.fr>...
> I am trying to write a customer list parser for my boss.  It has to be
> REALLY easy for him to modify.
[snip]


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

Date: 10 Apr 1998 14:22:21 -0700
From: t_patl@qualcomm.com (Pat Luther)
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <t_patl.892242676@gano>


Sorry. I couldn't restrain myself on this one :-)

pudge@pobox.com (Chris Nandor) writes:

>In article <352E11A3.4813@min.net>, jdporter@min.net wrote:

># Chris Nandor wrote:
># > 
># > Maybe you mean the images on the fronts of the book?  The Camel image was
># > public domain and is no more; 
># 
># Now I'm confused. How can someone take a public domain image and make
># it proprietary?  Who did they buy the rights from? The public?
># 

>It certainly is, for certain purposes (i.e., the cover of Perl books, Perl
>web sites, etc.).

>Where do I get my info?  Tim O'Reilly, for one, at the Perl Conference. 
>People involved with Perl Mongers.  ORA employees, TPI, etc.

>I could probably use that image for use with a beverage company, as long
>as it was not in any way related to computer programming.  Then again,
>IANAL.  I just know that everyone who seems to know agrees that ORA has
>exclusive rights to this image in relation to Perl.

OK, some facts regarding the camel on the cover of the perl book (And, 
by the way, this is true of the llama as well):
 
1. That camel was NOT public domain before. It did not EXIST before.  It
   was created by Edie Freedman specifically for the book.
2. It was adapted from a 19th century engraving, which is STILL non-
   proprietary (to quote the Tuscany Trading Company, which publishes
   books with images from the Dover Pictorial Archive that these were
   taken from "You may use the designs and illustrations from
these books for graphics and craft applications free and without special permission."

Sources: The colophon in the back of both O'Reilly perl books, and the
Tuscany Trading Company web site: http://tuscanytrading.com/books/dover1.htm

Now -- it's been said that O'Reilly takes software out of public domain
and makes it proprietary.  This was amended (I mean "clarified") to mean
just the documentation. Now it's the camel image. And this isn't true.
Can anyone present ANY example of anything that was publically available,
but now is not, due to the action of O'Reilly & Associates.  (Or, actually,
due to anyone's actions. I don't think you can really take anything *out*
of the public domain once it's in there, can you?)

					??pat

-- 
--
Pat Luther t_patl@qualcomm.com
The opinions expressed herein are probably not those of Qualcomm.
We don't really agree on all that much....


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

Date: 10 Apr 1998 15:06:29 -0700
From: jbuck@best.com (Joseph Buck)
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <6gm555$1ga$1@shell17.ba.best.com>

Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> wrote:
>>I believe the GPL to be one of the main reasons for the
>>success of Linux (as oposed to the BSD386 derivatives),

I don't think the license made a true difference.  True, some of the
top BSD wizards formed BSDI and their version was proprietary.  But
other factors were probably more important.

Michael Funk <mwfunk@uncc.campus.mci.net> wrote:
>Linux had a year or so head start on FreeBSD and the 
>derivatives, that makes a big difference too.

If anything, free BSD (not FreeBSD, which came later) was once
well ahead of Linux.  Almost a complete system was available when
Linus was still doing early hacking and there was no Linux distribution.

The ugly infighting in the early days of free BSD (the Jolitzes
vs everybody else) and the splits that resulted dissipated energy,
and the lawsuit threat from AT&T put much of the code in question
for a while.




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

Date: 10 Apr 1998 17:45:54 -0500
From: tye@fohnix.metronet.com (Tye McQueen)
Subject: Re: contexts: is there such a thing as array?
Message-Id: <6gm7f2$npo@fohnix.metronet.com>

John Porter <jdporter@min.net> writes:
) 
) The bizarre thing (to me) is that in
) 
) 	scalar @foo{ EXPR1, EXPR2 }
) 
) the comma is behaving in a scalar context, yet EXPR1 and EXPR2 are
) being evaluated in a list context.  Not that that's bad, just
) perhaps somewhat counterintuitive?

Sounds like a bug to me.  A subtle bug, sure.  I suspect that
perl's hash slice code is not passing the scalar context to the
inner list but instead special-cases scalar context to return the
last item of the slice.  That'd be one way to do it, but it is
inconsistant and so isn't the way it should be done.  IMVHO.
--
Tye McQueen    Nothing is obvious unless you are overlooking something
         http://www.metronet.com/~tye/ (scripts, links, nothing fancy)


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

Date: 10 Apr 1998 13:45:54 -0700
From: johnh@dash.isi.edu (John Heidemann)
Subject: Re: Diddling with search engines via CGI
Message-Id: <johnh.892241056@dash.isi.edu>

john13@interlog.com (John Russell) writes:

>I've done some launching of search engines like Altavista via
>Javascript.  (Open a window with the URL http:// ... + my query.)  Now
>I would like to do more elaborate things using Perl and LWP.
>
>Is there a body of knowledge about this subject already?  For example,
>I guess that anyone doing this kind of thing needs to know:

>- Is there a method to make the search engines return very long lists
>of results rather than a set of small pages with "next" links?  Which
>search engines are best or worst in this regard?

>- Do all search engines use CGI-friendly ?-encoded URLs for their
>query results?

>- Is there reusable code specifically for working with search engine
>results (e.g. compare if "hits" from 2 engines are really the same,
>transform results into standard format, etc.)?


You might try the WWW::Search module in CPAN, which addresses your
first and second bullets, and part of the third bullet.

   -John Heidemann


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

Date: 10 Apr 1998 21:53:44 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: File download problem in IE4.0
Message-Id: <6gm4d8$rdf$1@client3.news.psi.net>

bidyut@yahoo.com (bidyut@yahoo.com) wrote on MDCLXXXIII September
MCMXCIII in <URL: news:6gltco$6at$1@nnrp1.dejanews.com>:
++ Hi There,
++ 
++ 
++ Now this work fine with netscape 4.0 and IE3.02. But in IE4.0 it gives a
++ problem. HTML and TXt files don't have any problem. But when i open a doc or
++ Xls file, it says a registry problem. When i open a pdf file, it opens the
++ viewer, but doen't show the file.. instead a blank screen!!

So, what's your Perl question? If you have a problem with IE, ask in
a group about IE.


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


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

Date: Fri, 10 Apr 1998 17:05:49 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: General Rudeness, e.g. Re: Need a web login script
Message-Id: <fl_aggie-1004981705500001@aggie.coaps.fsu.edu>

In article <tmorniniEr7Gu4.MvF@netcom.com>, tmornini@netcom.com (Tom
Mornini) wrote:

+ sonny (sonny@88net.net) wrote:
 
+ : Do you think that being rude to people who post questions that you deem
+ : aren't worthy will deter others from doing so?  All this invective just adds
+ : to the general noise.  Ignore them, tell them to RTFM, or give'm an URL, but
+ : this "its my playground" attitude is really childish.
 
+ It does amaze me how some people, who understand everything technical,
+ understand so little socially.

Too bad this isn't a social group. It's a technical group that happens
to have some social aspects. It is, however, a technical newsgroup.

+ In other words, I completely agree.

That's nice. That and a $1.07 will get you a cup o' tea at Barnes & Noble.

+ The "protectors of the group" need a crash course in leadership by example.

I think the example needs to be "come, join us in c.l.p.moderated if
you want some real discussion" and assign the newbies to the purgatory
of c.l.p.misc until they can figure out how to post to the moderated
newsgroup successfully.

Consider it a right-of-passage. In the mean time, why don't you boys
help out them thar newbies and answer their questions instead of whining
about someone else being rude?

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>


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

Date: Fri, 10 Apr 1998 17:18:23 -0500
From: sonny <sonny@88net.net>
Subject: Re: General Rudeness, e.g. Re: Need a web login script
Message-Id: <352E9AAE.B4ADB0FD@88net.net>



I R A Aggie wrote:

> In article <tmorniniEr7Gu4.MvF@netcom.com>, tmornini@netcom.com (Tom
> Mornini) wrote:
>
> + sonny (sonny@88net.net) wrote:
>
> + : Do you think that being rude to people who post questions that you deem
> + : aren't worthy will deter others from doing so?  All this invective just adds
> + : to the general noise.  Ignore them, tell them to RTFM, or give'm an URL, but
> + : this "its my playground" attitude is really childish.
>
> + It does amaze me how some people, who understand everything technical,
> + understand so little socially.
>
> Too bad this isn't a social group. It's a technical group that happens
> to have some social aspects. It is, however, a technical newsgroup.
>
> <SNIP>

> I think the example needs to be "come, join us in c.l.p.moderated if
> you want some real discussion" and assign the newbies to the purgatory
> of c.l.p.misc until they can figure out how to post to the moderated
> newsgroup successfully.
>
> Consider it a right-of-passage. In the mean time, why don't you boys
> help out them thar newbies and answer their questions instead of whining
> about someone else being rude?

My point is help'em or ignore'm (which is what I prefer to do).  Just don't add to
the general hub-bub by telling folks that they're lame or too lazy to look it up for
themselves.  There will always be more of "them" than of "y'all."  BTW, there ain't
no whining here, just all these self proclaimed hall monitors are getting a tad
irritating.

sonny



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

Date: 10 Apr 1998 21:56:46 GMT
From: "Joan Preece" <Sianpreece@btinternet.com>
Subject: help please
Message-Id: <01bd64cb$006687a0$8b3463c3@sianpree>

I need to write an address book style program which enables visitors to my
site to review CD's which they have listened too - is there anyone out
there who knows of a site which may be able to help or even anyone who can
send me the necessary code!!

Thank You 
Sian Preece 


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

Date: Fri, 10 Apr 1998 15:36:27 -0700
From: "Scott LeWarne" <Scott_LeWarne@BigFoot.com>
Subject: Intermittent Perl problems
Message-Id: <6gm7qm$de5@news.or.intel.com>

I'm having intermittent problems with several perl scripts on a server
running IIS 3.0.  90% of the time, they work fine.  But sometimes, users get
an error message that says,

"CGI Error The specified CGI application misbehaved by not returning a
complete set of HTTP headers. The headers it did return are: "

It doesn't list anything for the headers that it did return.   I have seen
this error in several places in the MS knowledge base, but they all
reference specific headers being returned rather than none at all.

Does anyone have any idea what might be causing this problem?  I usually
have to reboot the server to correct the problem.  I'm not a Perl expert,
but the scripts seem to be written ok and they work most of the time.

Any help would be greatly appreciated.
Thanks in advance
Scott LeWarne
Scottx_a_LeWarne@ccm.co.intel.com





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

Date: Sat, 11 Apr 1998 00:00:24 +0300
From: Aleksi Asikainen <sanct@dlc.fi>
Subject: Re: Is it the code or is it the server?
Message-Id: <352E8868.24371AE@dlc.fi>

> You do that with the proper filehandle selected, right? And before 
> doing output to that filehandle? (Just double-checking....)

No, I don't use any filehandles. So no files, just pure printing to the
STDOUT... It worked well before "on-line" (server-client) printing...

> (Are you using a non-Unix system? 

Yes, Win95. For test-use only. And that is not the reason.

> An old version of Perl?)

Nope.

-aleksi


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

Date: 10 Apr 1998 21:01:21 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Is it the code or is it the server?
Message-Id: <6gm1b1$s2v$1@marina.cinenet.net>

Aleksi Asikainen (sanct@dlc.fi) wrote:
: 
: And yes, the code really sends something, because it starts like this:
: 
:   print "Content-type: mime/html\n\n";
:   print "<HTML><BODY BGCOLOR=\"#ABCABCAB">\n";

What's the fourth primary color??? :)  Also, your closing " on the color 
quadruple isn't escaped.  I'd suggest using

  print qq!<HTML><BODY BGCOLOR="#ABABAB">\n!;

instead.

Also, are you sure you don't want content type 'text/html', rather than 
'mime/html'?

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Sat, 11 Apr 1998 00:17:16 +0300
From: Aleksi Asikainen <sanct@dlc.fi>
Subject: Re: Is it the code or is it the server?
Message-Id: <352E8C5C.CE4D5DA8@dlc.fi>

>  Also, your closing " on the color
>   print qq!<HTML><BODY BGCOLOR="#ABABAB">\n!;
> Also, are you sure you don't want content type 'text/html', rather 

Sorry I wrote it and didn't read it after. Those are typos that exitst
only in my mail, not in the real code.

-aleksi


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

Date: 10 Apr 1998 21:18:26 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Is it the code or is it the server?
Message-Id: <6gm2b2$s2v$2@marina.cinenet.net>

Aleksi Asikainen (sanct@dlc.fi) wrote:
: > You do that with the proper filehandle selected, right? And before 
: > doing output to that filehandle? (Just double-checking....)
: 
: No, I don't use any filehandles. So no files, just pure printing to the
: STDOUT... It worked well before "on-line" (server-client) printing...

STDOUT *is* a filehandle, even when used implicitly.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: 10 Apr 1998 22:03:16 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Is it the code or is it the server?
Message-Id: <6gm4v4$rdf$2@client3.news.psi.net>

Tom Phoenix (rootbeer@teleport.com) wrote on MDCLXXXIII September
MCMXCIII in <URL: news:Pine.GSO.3.96.980410134250.19268P-100000@user2.teleport.com>:
++ On Fri, 10 Apr 1998, Aleksi Asikainen wrote:
++ 
++ > And I can't get even those! (Well... ok, I can get them, if the program
++ > ends, but that's not what I have in my mind...)
++ 
++ Sounds like buffering, and $| should do that. Maybe your system has some
++ non-standard buffering, although that's not likely. (Are you using a
++ non-Unix system? An old version of Perl?) 

That's buffering between your program and the server. Unless the server
is configured to handle over the socket to your program, your program
is *not* talking to the browser. This can even be further complicated
by the use of proxies.

You're better of in the relevant server group.


Abigail
-- 
perl -weprint\<\<EOT\; -eJust -eanother -ePerl -eHacker -eEOT


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

Date: Fri, 10 Apr 1998 22:06:01 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: keys in hashs
Message-Id: <pudge-1004981805480001@dynamic500.ply.adelphia.net>

In article <352E5D1D.AE99C308@hpl.hp.com>, Larry Rosler <lr@hpl.hp.com> wrote:

# Mark-Jason Dominus wrote:
# > 
# > In article <352DB35D.7243@outofservice.com>,
# > Jeff  <jn1@outofservice.com> wrote:
# > >$myhash{'key'} = 12;
# > >$myhash{key} = 12;
# > >
# > >first one is the better way to do it- the second one is a
# > >bareword, and if perl6 ever came along and claimed the literal
# > >token key as a symbol, your script would fail.
# > 
# > Wrong.  They are identical.  Try
# > 
# >         $myhash{time}
# > 
# > and see what it does.  Does it get the time?  Nope.
# 
# But it *does* get a warning from the "-w" flag.  So in that sense, they
# are not identical.

Well, in meaning, they will always be identical.  In one particular side
effect, they may not be for now, but IIRC, that warning is supposed to be
removed at some point.  It should be, anyway.  If you want time(), use
time().

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==               New Book:  MacPerl: Power and Ease               ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#


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

Date: Fri, 10 Apr 1998 16:12:53 -0600
From: "Arunas Salkauskas" <arunas@a!nm.org>
Subject: Re: Newbies simple question - NT/Perl
Message-Id: <352e97c3.0@news.cadvision.com>

The documentation you have is for Unix.  You have to be imaginative to
figure out how this applies to NT.

First:  /usr/local/bin/perl  is a very common place to have perl if you're
on a Unix machine.  c:/perl/bin/perl.exe is a more likely place to have perl
on a MS machine.

Second:  Before getting ambitious and trying to run the script through your
web server, make sure that it will run at the command line.  Start up a DOS
prompt, and try running the  program.  If it gives you any errors, it likely
won't run through CGI.

Third:  Have you enabled CGI on your web server?  Are you running a web
server?  If you aren't using a web server then it will never work.  You
can't just point the browser at a file on your hard drive, and expect your
browser to run it.  CGI is a Server-side interface, and browsers don't know
and don't need to know anything about it.

HTH

- Arunas Salkauskas
High Point Designs
www.highpointdesigns.com


Ian Gregson wrote in message <6gloq5$s3t$1@diana.bcn.ibernet.es>...
>hello I have just downloaded an advertising perl script but I can't get it
>to work. The first line of each .cgi file is. It tells me to make sure that
>this points to where perl is installed
>
>#!/usr/local/bin/perl
>
>But for some reason when I point my web browser at admin.cgi it just
>displays the file as a text document within my IE4.0. It is obviously not
>compiling it. Am I doing something wrong ??
>
>I have installed perl in the above location. The documentation tells me to
>do a which perl to find out the location of #! but I can't find out how to
>do this.
>
>Any help would would be greatly appreciated.
>
>Ian
>
>Ian Gregson
>iang@jet.es
>
>
>




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

Date: Fri, 10 Apr 1998 22:05:35 GMT
From: ppp-support <ppp-support@canelle.telecom.uqam.ca>
Subject: Numeric validation
Message-Id: <352E969E.617F3F4C@canelle.telecom.uqam.ca>

Hello!

How can i validate that $num actualy contain a number?
The best i got, is :
$num =~ /[0-9]/

But it's not exactly what i'm looking for. Any help appreciate.
--
________________________________________
Reni Guitar
Etudiant,
Mantrise, Informatique de gestion UQAM
Coordonateur, Support technique PPP-UQAM.



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

Date: Fri, 10 Apr 1998 22:11:55 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Perl Puzzle: How Many Contexts?
Message-Id: <pudge-1004981811430001@dynamic500.ply.adelphia.net>

In article <6glci5$1ir$1@monet.op.net>, mjd@op.net (Mark-Jason Dominus) wrote:

# In article <352D97F3.F8D8C17A@coos.dartmouth.edu>,
# Ronald J Kimball  <rjk@coos.dartmouth.edu> wrote:
# >There is no such thing as an "array" context.  List, scalar, void.
# 
# I've been trying to make a list of contexts; not all are
# distinguishable by `wantarray'.  The manual notwithstanding, there's
# not really any such thing as `boolean' context; that's just a figure
# of speech.  But there are at least two other contexts in Perl.

How about faux multidimensional context, as in $hash{1, 2, 3}?  That's not
list context in there.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==               New Book:  MacPerl: Power and Ease               ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#


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

Date: Fri, 10 Apr 1998 23:47:41 +0100
From: Pedro Melo <melo@co.telenet.pt>
Subject: Regular expression strangeness
Message-Id: <352EA18D.1AEE4DB8@co.telenet.pt>

Hi!

perl -e 'print "Ok\n" if "asd.df" =~ /^.*$/'

prints Ok
but when I do this

perl -e 'print "Ok\n" if "as\nd.df" =~ /^[.\n]*$/'

it no longer prints Ok (??)
the dot (.) matches everything except a newline, but a character class
with a dot and a newline should match, right?

Melo


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

Date: Fri, 10 Apr 1998 16:44:18 -0600
From: harman@omsi.com
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <6gm3rj$gjb$1@nnrp1.dejanews.com>

In article <6glfb8$chm$1@halcyon.com>,
  tzs@halcyon.com (Tim Smith) wrote:
>
> Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> wrote:
> >People writing software they want to share with other people,
> >and assure that their work will remain accessible, should
> >use the GPL.
>
> But if you want to share without strings attached, don't use GPL.
> When I feel like giving something of mine as a gift to other programers,
> I want it to really be like a gift.
>

  The point is really this: Do you, in the long run, want strings attached to
 something or not?  Now, you are saying, I don't mind if somebody else does
 it, at least I am promoting freedom.  In other words, you want to set him
 free to do something which restricts  others' freedom.  It is simple.  It is
 like this: I would like to give you a  gift of a very powerful utility, only
 if you promise me you would use it not  to harm somebody.

  A child who wants to harm others has to be told not to.  It is a sorry state
 of affairs when adults have to be dealt with similarly.

 Think not only of other "programmers" but of other "users" who would use the
 software produced by those programmers.

 Harman <harman@omsi.com>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Fri, 10 Apr 1998 17:32:25 -0400
From: schinder@leprss.gsfc.nasa.gov (Paul J. Schinder)
Subject: Re: sendmail substitute for Macperl
Message-Id: <schinder-1004981732250001@schinder.clark.net>

In article <32F9FB6F.4455@callisto.si.usherb.ca>,
eslcafe@callisto.si.usherb.ca wrote:

}  Anyone know of another sendmail substitute for macperl.
}  
}  I'm using this script - which works - but I don't receive a message! The
}  smpt address i use is correct!

How do you know that the script succesfully connected to the server, since
you're not checking?

}  
}  #!perl
}  
}  _______________________________________________________
}  print "Content-type: text/html\nPragma: no-cache\n\n";
}          print "<HTML>\n";
}          print "<BODY>\n";
}          print "<P>WORKS!?\n";
}  
}  $email = "eslcafe\@callisto.si.usherb.ca";
}  use Net::SMTP;
}  
}  $smtp = Net::SMTP->new('callisto.si.usherb.ca');

Do the following:

$smtp = Net::SMTP->new('callisto.si.usherb.ca', Debug => 1);

You can then look at the debugging output and find out exactly what went wrong.
If you can't understand the output, you can send it to me by email or post
it here (but leave all the HTML junk out).

}  
}  $smtp->mail($ENV{USER});

I assume you're using a MacPerl recent enough so that it actually sets
$ENV{USER}?  If not, it might be failing right here when the SMTP server
gets the null string as the envelope sender.

}  $smtp->to('$email');
}  
}  $smtp->data();
}  $smtp->datasend("To: $email\n");
}  $smtp->datasend("\n");
}  $smtp->datasend("A simple test message\n");
}  $smtp->dataend();
}  
}  $smtp->quit;
}  
}          print "<P>WORKS!?\n";
}          print "</BODY>\n";
}          print "</HTML>\n";

-- 
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@leprss.gsfc.nasa.gov


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

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

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