[16522] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3934 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 7 09:05:46 2000

Date: Mon, 7 Aug 2000 06: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: <965653512-v9-i3934@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 7 Aug 2000     Volume: 9 Number: 3934

Today's topics:
        CGI page inheritance <npd@students.cs.mu.OZ.AU>
    Re: convert string from uppercase to lower case <elephant@squirrelgroup.com>
    Re: Difference between a .cgi file and a .pl file? (Tim Hammerquist)
        dropping space from begginning & end of a string <linux@worsdall.demon.co.uk>
    Re: dropping space from begginning & end of a string (Andreas Kahari)
    Re: dropping space from begginning & end of a string <yuval.buchner@intel.com>
    Re: find the number of characters in a string <mauldin@netstorm.net>
    Re: get files from other servers (Colin Keith)
        Help!! Need to find user name jennlee_2@my-deja.com
        How do I call a DLL on a Windows machine ? hugo.b@derivs.com
    Re: How do I send data to another Server ??? (Colin Keith)
    Re: IIS and Perl (Colin Keith)
    Re: IP spoofing <dsa@dassda.com>
    Re: IP spoofing (Rafael Garcia-Suarez)
        Looking for perl projects.. august4@my-deja.com
    Re: perlscript has problems with sendmail nobull@mail.com
        problem with Mail::POP3 module <laf@gameonline.co.uk>
    Re: reg expressions - protect html <nickco3@yahoo.co.uk>
    Re: Regexp problem - Stripping HTML <of@hm.com>
    Re: sending javascript value to CGI (Tony L. Svanstrom)
    Re: sending javascript value to CGI <daverwin@hotmail.com>
    Re: totally newbie to perl, I ... <kensplace@comport.com>
    Re: totally newbie to perl, I ... <robert99@maine.rr.nodamnspam.com>
    Re: WWWBoard.PL <jthomas@pdxgothic.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 7 Aug 2000 22:04:04 +1000
From: Nick Doyle <npd@students.cs.mu.OZ.AU>
Subject: CGI page inheritance
Message-Id: <Pine.GSO.4.05.10008072152570.9166-100000@holly.cs.mu.OZ.AU>


We're making a site with a lot of similar pages, but I don't think cgi
scripts can inherit (when i say 'we', i mean 'we' as in 'them', 'they').
Our solution is to have each cgi script use a page_printer.pm class, which
inherits the common methods from the more general class.

Is there an easier way ?

thanks in advance,
nick.

(please reply via email, group too if you want)



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

Date: Mon, 07 Aug 2000 10:14:30 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: convert string from uppercase to lower case
Message-Id: <MPG.13f92967700d8e2e9896cf@news>

Keith Calvert Ivey writes ..
>newsgroups@ckeith.clara.net (Colin Keith) wrote:
>
>>s/([aeiou])/\u$1/g;
>
> tr/aeiou/AEIOU/;
>
>>Of course, it doesn't account for 'y', but that's left 
>>as an exercise for the reader:)
>
>Not to mention å, é, ï, õ, û, æ, etc.

which (just to clarify) the tr/// solution provided doesn't account for 
either

to get all those vowels .. plus the original vowels you want something 
like this

  tr/aeiou\340-\366\370-\377/AEIOU\300-\326\330-\337/;

depending on what ñ and ð etc. mean you will probably want to reduce 
that set even further

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Mon, 07 Aug 2000 09:58:51 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <slrn8ot2lk.k5.tim@degree.ath.cx>

On Mon, 7 Aug 2000 01:45:29 -0700, Jack Thomas <jthomas@pdxgothic.com> wrote:
> "DS" <snakeman@kc.rr.com> wrote in message
> news:vjmc5.94$L5.2310@typhoon.kc.rr.com...
> > What is the diference betweeen a .pl file and a .cgi file?
> > Can I convert a .pl to a .cgi?
> 
> Perl .pl and Perl .cgi are file types which are equivalent.
> 
> If you want to convert a .pl file to a .cgi file, you simply need to rename
> it.

This is correct for the most part.  However, .pl (by def) implies that
it's a perl script, perl library, or something written in Polish.  =)

 .cgi implies that it complies with the Common Gateway Interface
standard, but it need not be written in perl.  Here is a perfectly valid
cgi script written in the bash shell language:


	: #!/bin/bash
	: # test.cgi
	: echo "Content-type: text/html
	: "
	: echo "<P><B>Hey there!</B></P>"

In the end, these are mostly semantic differences.  If you see an
executable with a .cgi extension, it's most likely written in perl.

-- 
-Tim Hammerquist <timmy@cpan.org>

Life is too serious to be taken seriously.
	-- Mike Leonard


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

Date: Mon, 7 Aug 2000 13:18:14 +0100
From: Mark Worsdall <linux@worsdall.demon.co.uk>
Subject: dropping space from begginning & end of a string
Message-Id: <v3a3qSAGkqj5Ewix@worsdall.demon.co.uk>

Hi,

I have this string:-

my $string = ' hello todays world ';

How could I drop the space from the beginning and the end?

-- 
He came from Econet - Oh no, I've run out of underpants :(
Home:- jaydee@wizdom.org.uk       http://www.wizdom.org.uk
Shadow:- webmaster@shadow.org.uk  http://www.shadow.org.uk
Work:- netman@hinwick.demon.co.uk http://www.hinwick.demon.co.uk
Web site Monitoring:-             http://www.shadow.org.uk/SiteSight/


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

Date: 7 Aug 2000 14:30:03 +0100
From: andkaha@hello.to.REMOVE (Andreas Kahari)
Subject: Re: dropping space from begginning & end of a string
Message-Id: <398eabcb@merganser.its.uu.se>

In article <v3a3qSAGkqj5Ewix@worsdall.demon.co.uk>,
Mark Worsdall  <linux@worsdall.demon.co.uk> wrote:
>Hi,
>
>I have this string:-
>
>my $string = ' hello todays world ';
>
>How could I drop the space from the beginning and the end?

$string =~ s/^\s*|\s*$//g;

/A

-- 
# Andreas Kähäri, <URL:http://hello.to/andkaha/>.
# ...brought to you from Uppsala, Sweden.
# All junk e-mail is reported to the appropriate authorities.
# Criticism, cynicism and irony available free of charge.


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

Date: Mon, 7 Aug 2000 15:32:33 +0300
From: "Yuval Buchner" <yuval.buchner@intel.com>
Subject: Re: dropping space from begginning & end of a string
Message-Id: <8mma94$a2e@news.or.intel.com>

Hi,
$string =~ s/^\s*//; # truncate the leading spaces (replace them with null)
$string =~ s/\s*$//; # truncate the trailing spaces

--Yuval


Mark Worsdall wrote in message ...
>Hi,
>
>I have this string:-
>
>my $string = ' hello todays world ';
>
>How could I drop the space from the beginning and the end?
>
>--
>He came from Econet - Oh no, I've run out of underpants :(
>Home:- jaydee@wizdom.org.uk       http://www.wizdom.org.uk
>Shadow:- webmaster@shadow.org.uk  http://www.shadow.org.uk
>Work:- netman@hinwick.demon.co.uk http://www.hinwick.demon.co.uk
>Web site Monitoring:-             http://www.shadow.org.uk/SiteSight/




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

Date: Mon, 07 Aug 2000 12:58:35 GMT
From: Jim Mauldin <mauldin@netstorm.net>
Subject: Re: find the number of characters in a string
Message-Id: <398EB1F8.5C81D40E@netstorm.net>

Uri Guttman wrote:
> 
> >>>>> "JM" == Jim Mauldin <mauldin@netstorm.net> writes:
> 
>   JM> "Godzilla!" wrote:
>   >>
>   JM> <snip rant>
> 
>   JM> True, my example would wipe out the letters.
> 
>   >> $letters = $string =~ tr/a-zA-Z/a-zA-Z/;
> 
>   JM> is correct;
> 
> actually you were correct in assuming no need for the second part of tr/
> moronzilla is wrong as usual as she can't rtfm without moving her lips.
> 
> but length is still a better way to get the number of chars in a
> string. so you were wrong in that way.
> 

Thanks for the insight and correction.  I always enjoy your posts, Uri. 
I'm not worried about Godzilla, but I do want to minimize the number of
mistakes I make, and I'm happy to take my lumps when they're due. Perl
is astonishing sometimes. I was a Pascal programmer before, and Perl is,
well - a whole other language!

-- Jim


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

Date: Mon, 07 Aug 2000 12:15:27 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: get files from other servers
Message-Id: <zLxj5.86$DT4.2824040@nnrp2.clara.net>

In article <8mlrt2$k1a$1@orpheus.gellyfish.com>, Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>On Fri, 04 Aug 2000 14:35:45 GMT aaron@preation.com wrote:
>> But if the files you need to get are not visible to the public and a
>> http browser, I am not sure how you can get access to them.
>> 
>> Can anyone tell me if there is a way to do this?
>> 
>
>Not by HTTP no,  you will have to make the files available by some protocol
>or service for you to get them.

To add to this, if its because the files are private and you don't want 
them available on a web site, try throwing them behind HTTP 
Authentication. Whilst its insecure because it doesn't encrypt the 
username/password combination, the OP might be able to use MD5 
Authentication or better use it over SSL that was discussed.

perldoc LWP::UserAgent  get_basic_credentials() / credentials()

Col.


---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC


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

Date: Mon, 07 Aug 2000 12:54:23 GMT
From: jennlee_2@my-deja.com
Subject: Help!! Need to find user name
Message-Id: <8mmbht$uec$1@nnrp1.deja.com>

Hi,

We just switched our Netscape web server to Novell and use the NDS for
authentication.  I have a Perl script called by submitting an HTML
form, where I need to know the username of the person who envokes it.

No environmental variable contains this username (I dumped them all out
to check for sure) and I am not sure how to find it.

Can anyone assist with how to find the username?

Thanks

Jennifer Rusch
jennifer.rusch@nospam.uwmf.wisc.edu (remove nospam)


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


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

Date: Mon, 07 Aug 2000 12:49:33 GMT
From: hugo.b@derivs.com
Subject: How do I call a DLL on a Windows machine ?
Message-Id: <8mmb8r$ub8$1@nnrp1.deja.com>

Please Help me on this one.....

I need to receive parameters entered by the user in my Perl Script on a
Linux machine and pass them to a DLL on a Windows NT machine.

The DLL uses parameters to do calculations, and I need to get back the
values that it calculates, for my Perl Script to use them in the HTML
page it builds.

hugo.b@derivs.com

Thank You

Hugo


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


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

Date: Mon, 07 Aug 2000 12:22:16 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: How do I send data to another Server ???
Message-Id: <YRxj5.87$DT4.2824300@nnrp2.clara.net>

In article <8mlvpu$mne$1@nnrp1.deja.com>, classies@my-deja.com wrote:
>The Code or Function in the Perl Script to pass these data to another
>PC which is Windows NT that have a API or Function in a DLL that will
>receive these Values or data and do some Excel Calculations and send it
>back to the PERL Script on the Linux PC.

Have a look at the Win32 modules on CPAN. I *think* win32::OLE would be the 
one you're after, maybe win32::API. My extremely scant knowledge of win32 
programming makes it hard for me to say further, but I *think* you can talk 
to OLE apps on other machines. If not, get perl installed on that machine, 
and have your perl apps talk to each other :) 

Col.


---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC


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

Date: Mon, 07 Aug 2000 12:38:47 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: IIS and Perl
Message-Id: <r5yj5.88$DT4.2825015@nnrp2.clara.net>

In article <8mkr39$tr1$1@nnrp1.deja.com>, johannc@tpg.com.au wrote:
>This crashes IIS. When we disabled the .look extension, IIS  functions
>as normal.

If that's anything like my experiences with IIS that's normal :)
Still, that aside, if you run a perl script that doesn't use these two 
modules via this method, do you still get the same problem?
I've had a look on the activestate web site and there are not outstanding 
bugs under 'IIS' or 'LWP::UserAgent' that match your description so I would 
err towards it being IIS.

>Basically, here's the Perl script that we use:

Okay, do you run it with -w and use strict ? If not do so (-wF if you want 
descriptive error messages) and look in the server log. Does it log anything 
anyway? Have you tried stepping through the code with a print 
"Content-Type: text/html\n\nhere X"; exit(0), to see if any part of it runs 
(does it run at all, is it during compilation that it crashes?)

>Is there a destroy method to destroy the $response and $ua because we
>think it might be tying the sessions for the webserver.

Not that I know of, you shouldn't need them since perl's garbage collection 
will tidy up when variables go out of scope and if they're not by the end of 
it, it'll then go back over it with the big vacuum cleaner until 
everything's been released. That should clean up everything on your end 
(releasing any file locks, closing sockets on your end, etc.) 

Col.



---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC


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

Date: Mon, 7 Aug 2000 18:40:50 +0800
From: DT <dsa@dassda.com>
Subject: Re: IP spoofing
Message-Id: <MPG.13f9130d5cbab743989680@news.cyberway.com.sg>



> Oh, I can see a legitimate reason for doing that. Surely if a search engine 
> has restrictions on what you can submit you should be a good little net 
> puppy and abide by them. You know just being nice since you want to use 
> their service ... 
> 

I want to provide search engine submission service, using a script, 
however, also heared that search engines don't like mass submission even 
if the URLs are from different domains.  I need a solution, that's why, I 
think of using 'ip spoofing'.


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

Date: Mon, 07 Aug 2000 12:25:21 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: IP spoofing
Message-Id: <slrn8otavb.gev.rgarciasuarez@rafael.kazibao.net>

DT wrote in comp.lang.perl.misc:
>
>
>> Oh, I can see a legitimate reason for doing that. Surely if a search engine 
>> has restrictions on what you can submit you should be a good little net 
>> puppy and abide by them. You know just being nice since you want to use 
>> their service ... 
>> 
>
>I want to provide search engine submission service, using a script, 
>however, also heared that search engines don't like mass submission even 
>if the URLs are from different domains.  I need a solution, that's why, I 
>think of using 'ip spoofing'.

Provide a from to the user, with buttons 'submit to Google', 'submit to
Altavista', etc., and all required value fields hidden into the form.
You can even put a target=anotherwindow in your <form> tags.
The user has then to click the buttons to submit its site to the
different search engines. From its own IP adress.

-- 
Rafael Garcia-Suarez


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

Date: Mon, 07 Aug 2000 11:27:42 GMT
From: august4@my-deja.com
Subject: Looking for perl projects..
Message-Id: <8mm6fa$r4t$1@nnrp1.deja.com>

Hi,

Are you looking for perl projects...Go to the following website.

http://www.imandi.com/go/run.dll?Rewards&ref=august4

They have a section on small business. This section has loads of
projects under the following heading.

1) Software development projects
2) Database Projects
3) Computer Network projects

perl projects are one of them..

Augus


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


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

Date: 07 Aug 2000 13:39:32 +0100
From: nobull@mail.com
Subject: Re: perlscript has problems with sendmail
Message-Id: <u98zu9utx7.fsf@wcl-l.bham.ac.uk>

johands@hotmail.com writes:

>  i have a problem with sendmail

How have you reached this conclusion?

>  I try to execute the following script (with chmod to 755), but it
> doesn't work, nothing is send to the email-addresses

That's to be expected because all the relevant lines are commented out.

> and nothing, even the error-message of my dienice
> subroutine, is showed in my browser

Have you checked your script compiles OK?

>  The only showed in my browser is HTTP 500 - internal servererror.

That would be the one that tells you to check the logs for details of
the error.  So...

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Mon, 7 Aug 2000 11:20:29 +0100
From: "Neil Lathwood" <laf@gameonline.co.uk>
Subject: problem with Mail::POP3 module
Message-Id: <965643701.13621.0.nnrp-12.c246f129@news.demon.co.uk>

Hi Folks,

I am trying to write a script that will interface with a pop3 server, I am
using the Mail::POP3 module from CPAN. However when I run the program (code
below) it prints out that the password for the username is wrong, I know it
is right. Am I missing something here.

#!/usr/bin/perl -w

use CGI::Carp 'fatalsToBrowser';
use Mail::POP3Client;
print "content-type:text/html\n\n";

$pop = new Mail::POP3Client(Host=>"pop3.dial1.co.uk");
$pop->User("username");
$pop->Pass("password");
$pop->Port("110");
$pop->Connect() || die $pop->Message;


However if I do it like this:

#!/usr/bin/perl -w

use CGI::Carp 'fatalsToBrowser';
use Mail::POP3Client;
print "content-type:text/html\n\n";

$pop = new Mail::POP3Client("username", "password", "pop3.dial1.co.uk");
print $pop->Message;

it connects fine, if I try it with a different mail server
(pop3.magicmail.co.uk) on the second example it says that it can't connect
to the server. I know that the usernames and passwords are correct and that
both mail servers are up and running, Can someone shed some light on this
problem?


Many thanks in advance and I hope I have provided you with enough
information.

Neil




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

Date: Mon, 07 Aug 2000 11:28:28 +0100
From: Nick Condon <nickco3@yahoo.co.uk>
Subject: Re: reg expressions - protect html
Message-Id: <398E8F4C.514B990E@yahoo.co.uk>

"Godzilla!" wrote:

> indiziert wrote:
> > #3. if html protect html code from being parsed
>
> Two methods have been provided. I wrote a barebones
> script for a beginning. Another suggested copy and
> paste a module reference.

My advice is to use the module. Sure, loading modules takes
execution-time and memory, but it cuts your development time.
Additionally the module is already debugged, cutting your development
time again, and more importantly, it will be more reliable in production
and will take less of your time supporting it.

Godzilla often preaches methods to this group that cut execution time or
reduce memory usage. In time - and with experience - she will realise
that these economies are false.

Hardware is cheap, programmer time is expensive. So re-use, re-use,
re-use. Import modules, cut-and-paste other peoples work. All this
reduces *your* time invested in development and support. This is truly
efficient programming.



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

Date: 7 Aug 2000 11:39:07 GMT
From: "Philip McGauran" <of@hm.com>
Subject: Re: Regexp problem - Stripping HTML
Message-Id: <01c00064$48d7b680$e2e2280a@philmcgauran>

This is a script I use for stripping html tags. I use it to change a HTML
table to a group of records, with each field on a separate line. 

It starts off by requesting a file to act on, and then makes the above
changes. 

Hope it provides some ideas.

Phil

$NewWord="\n";
print "Enter a file name\n";
$TheFile=<STDIN>;
chomp($TheFile);
open (INFILE, $TheFile) or die "The File $TheFile could ". "not be
found.\n";
$OutFile = '>file.txt';
chomp($OutFile);
open(OUTFILE, $OutFile) or die "The File $OutFile could not be found.\n";  
  

while(<INFILE>)
{       $TheLine=$_;
         chomp($TheLine);
         chomp($TheWord);
          $TheLine =~ s/(<.*?)(>)//gi;
          $TheLine =~ s/(<\/.*?)(>)//gi;
          $TheLine =~ s/.* //gi;
          $TheLine =~ s/^\W*//i;
          
          
          $TheLine =~ s/Live/********/;
        
          print OUTFILE "\n$TheLine";
        print "\n$TheLine";               
         
        
          
}
          close(INFILE);
          close(OUTFILE);
          print "\n\n";
          print $TheWord . "\n";
          print $NewWord . "\n";
          print $TheFile . "\n";
          $OutFile = substr ($OutFile, 1);
          print $OutFile . "\n";
          unless(rename($OutFile, $TheFile))
          {
                        print "The rename failed\n"
          }

Ian Stuart <ian.stuart@ed.ac.uk> wrote in article
<398E7051.61D3532E@ed.ac.uk>...
> Posted and mailed, as Eli says...
> 
> mbutt@my-deja.com wrote:
> > 
> > I am trying to construct a regular expression to strip certain HTML
tags
> > out of a string.
> Off the top of my head....
> 
> $matching_code = $php;
> 
> # Find anything segment that starts with an "<", then has 0 or more
> spaces
> #    followed by the string $matching_code (case-insensitive), then any
> number 
> #    of characters that DO NOT include a ">", then a trailing ">".  This
> should 
> #    pick up the tag, irrispective of the number of attributes, or their
> size
> # We also need to remove the closing tag, plus any text in between
> $html_file =~ s/<[
> *]$matching_code[^>]*>[^<\/$matching_code>]*<\/$matching_code>//ig
> 
> I think.....
> 
> PS - ow! my brain hurts.. ;-)
> 
> -- 
>            --==**==--
> Ian Stuart - University computing services.
> ---------------------------------
> Truth is what you believe it to be.
>   I cannot force my facts on you, only make you believe my beliefs.
> ---------------------------------
> http://lucas.ucs.ed.ac.uk/
> 


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

Date: Mon, 7 Aug 2000 12:57:57 +0200
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: sending javascript value to CGI
Message-Id: <1eezvwy.10pjnrdpn5gaN%tony@svanstrom.com>

Kris Gonzalez <jimjamjoh@softhome.net> wrote:

> "http://daverwin.homepage.com" wrote:
> 
> > if just for IE use Iframe as target
> > for NN load a lyer with the results
> 
> Can the above be done without refreshing the layer/frame...that is,
> imperceptibly to the surfer?

Of course, but since I'm reading this in comp.lang.perl.misc and this
has nothing to do with Perl I won't answer it, I might have answered it
if you'd asked in comp.infosystems.www.authoring.cgi. :)

     /Tony
-- 
     /\___/\ Who would you like to read your messages today? /\___/\
     \_@ @_/  Protect your privacy:  <http://www.pgpi.com/>  \_@ @_/
 --oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
 DSS: 0x9363F1DB, Fp: 6EA2 618F 6D21 91D3 2D82  78A6 647F F247 9363 F1DB
 ---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
    \O/   \O/  ©1999  <http://www.svanstrom.com/?ref=news>  \O/   \O/


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

Date: Mon, 7 Aug 2000 07:47:50 -0700
From: "http://daverwin.homepage.com" <daverwin@hotmail.com>
Subject: Re: sending javascript value to CGI
Message-Id: <jeyj5.912$Xb.166252@nnrp2.sbc.net>


Kris Gonzalez wrote in message <398E3C1D.502AC725@softhome.net>...
>Is there a way to submit a javascript value to a CGI and continue
>running scripts on the page? >

"Target " a popup window
or a hidden frame





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

Date: Mon, 7 Aug 2000 12:33:39 +0100
From: "ken" <kensplace@comport.com>
Subject: Re: totally newbie to perl, I ...
Message-Id: <8mm6p1$ufn$1@newsg1.svr.pol.co.uk>

seb wrote in message <8mlra9$4rs$1@buty.wanadoo.nl>...

>totally newbie to perl, I would like 2 know what do I need to run my first
>perl script
>(you know, something like ' Hello World ! '  ;-)) )
>under W 9x (is it possible ? ) or W 2k.



If running locally, on w9x then you need a web server of some kind, i use
a freeware one called omni, as its small and simple,
you can download it from http://www.omnicron.ab.ca/httpd/download.html

You also need perl itself, I use Activeperl, available from
http://www.activestate.com/

Simply install both of the above, set up the options in omni to point to
your perl installation
and tell it where your cgi-bin directory is.

save the following script as a .pl

A simple hello world script is shown below

#!/usr/local/bin/perl
# Hello world example program

print ("Content-type: text/html\n\n");
print "Hello World !";


Note the first line contains the location of the perl interpreter, it must
start with #!


And then fire up omni and your browser,
and use the url

127.0.0.1 your "home"
so if your cgi-dir was a subdirectory of your default dir then it would be

127.0.0.1/cgi-bin/helloworld.pl


or whatever!


good luck, hope that helps a bit




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

Date: Mon, 7 Aug 2000 07:42:15 -0400
From: "Robert Lee" <robert99@maine.rr.nodamnspam.com>
Subject: Re: totally newbie to perl, I ...
Message-Id: <wgxj5.31021$9E6.184344@newsr1.maine.rr.com>

Download Perl 5 for Win32 from www.activestate.com and install it. You can
then write your scripts in notepad (or any other text editor like DOS EDIT).
Save them with the .pl extention (technically optional) and run them from a
MSDOS prompt like this:

c:\perl\bin\>perl myscript.pl

The above command would execute a script called myscript.pl. Since your not
providing an absolute path, the script would have to be in c:\perl\bin which
is not recommended. I suggest you create ".pl" as a windows filetype with
two commands:

RUN (default) - c:\perl\bin\perl.exe %1
EDIT - c:\windows\notepad.exe

that way you can double-click your scripts in windows explorer to run them
or right-click them and selecting "edit" from the menu to edit them with
notepad. If you have IE5 installed you'll have a program called WSCRIPT.EXE
in your windows folder. This file contains some nice icons that you can
associate with .pl files too.

-Robert




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

Date: Mon, 7 Aug 2000 03:09:43 -0700
From: "Jack Thomas" <jthomas@pdxgothic.com>
Subject: Re: WWWBoard.PL
Message-Id: <398e8c69$1_2@news.nwlink.com>

> - Can it run on an Intranet?

Yes.

> - Can it run on a "ordinary" NT4.0/Win2000 Server without having to
install
> some kind of Perl-server-support?

Download and install Perl. I use the distribution from activestate on an NT
4.0 server and it works fine.
http://www.activestate.com

You MUST install Perl on your server in order to us use Perl scripts.

Jack Thomas
jthomas@pdxgothic.com



"Bjørn Nørgaard" <bnp@lknetlon.dk> wrote in message
news:39812543@194.255.58.12...
> Does any of you have experience with wwwboard.pl from Matt's Script
Archive?
>
> - Can it run on an Intranet?
> - Can it run on a "ordinary" NT4.0/Win2000 Server without having to
install
> some kind of Perl-server-support?
>
>
> Bjørn
>
>




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

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


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