[13567] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 977 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Oct 3 12:07:21 1999

Date: Sun, 3 Oct 1999 09:05:09 -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: <938966709-v9-i977@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 3 Oct 1999     Volume: 9 Number: 977

Today's topics:
    Re: /@array/ <ltl@rgsun40.viasystems.com>
    Re: ActivePerl <gellyfish@gellyfish.com>
    Re: CGI.pm <gellyfish@gellyfish.com>
    Re: CGI.pm <admin@gatewaysolutions.net>
    Re: CGI.pm <ltl@rgsun40.viasystems.com>
    Re: deprecated $[ (Tom Vaughan)
    Re: DU in perl (Arved Sandstrom)
    Re: DU in perl <mike@crusaders.no>
        GD Library Version 1.19 compiled for Windows NT <schulz@access.ch>
    Re: GD Library Version 1.19 compiled for Windows NT <gellyfish@gellyfish.com>
        HELP!!!!!!! inanna@acronet.net
        How to start up Netscape or Internet Explorer from a Pe (Nim Chu)
    Re: How to start up Netscape or Internet Explorer from  (Ted Wood)
    Re: How to start up Netscape or Internet Explorer from  <gellyfish@gellyfish.com>
    Re: How to start up Netscape or Internet Explorer from  <tom.kralidis@ccrs.nrcanDOTgc.ca>
    Re: How To Use a User Definied Type in Perl. <gellyfish@gellyfish.com>
        interrupt handler routine not being called <shubha@hindustan.vnet.net>
    Re: interrupt handler routine not being called <gellyfish@gellyfish.com>
    Re: Match and escape processing <ltl@rgsun40.viasystems.com>
        Need help with perl CGI (Ted Wood)
        Passing arguments to PERL script via URL <bacjc@worldnet.att.net>
    Re: Passing arguments to PERL script via URL <tom.kralidis@ccrs.nrcanDOTgc.ca>
    Re: Perl vs. PHP3 <gellyfish@gellyfish.com>
    Re: Perl vs. PHP3 (Abigail)
    Re: Perl vs. PHP3 (Jason Costomiris)
    Re: Simple newbie problem... <crdevilb@mtu.edu>
    Re: Simple newbie problem... <gellyfish@gellyfish.com>
    Re: Simple newbie problem... (Bill Moseley)
    Re: Values of thousand <mike@crusaders.no>
    Re: Values of thousand <rhomberg@ife.ee.ethz.ch>
    Re: Values of thousand <gellyfish@gellyfish.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 3 Oct 1999 13:44:10 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: Re: /@array/
Message-Id: <7t7mja$k6q$1@rguxd.viasystems.com>

Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
:>[A complimentary Cc of this posting was sent to lt lindley 
:><lee.lindley@bigfoot.com>],
:>who wrote in article <7t6dhb$9c1$1@rguxd.viasystems.com>:
:>> my @refnums = qw/first second third/;
:>> my $restring = join '|', map "\\b$_\\b", @refnums;

:>You do not want to do this.  Generally speaking, you want to keep as
:>much info out of alternations as possible.

:>  local $" = '|';

:>> my $dat = 'This is the first time.';
:>> print "Matches\n" if $dat =~ /$restring/o;

:>  print "Matches\n" if $dat =~ /\b(@refnums)\b/o;

Nice.  Added advantage that $1 contains the specific term
that matched.

I've got to get over my distaste of those string interpolation
tricks and start using them when there is an advantage.

-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: 3 Oct 1999 10:54:52 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: ActivePerl
Message-Id: <7t7cls$8lc$1@gellyfish.btinternet.com>

On Sat, 2 Oct 1999 23:59:35 -0400 joeyandsherry@mindspring.com wrote:
> Hello,
> 
> Thanks in advance.
> 
> I've just installed ActivePerl on my Win98 laptop. I've tried to execute the
> script below:
> 
> print "Content-type: test/html\n\n";
> print "<HTML><HEAD><TITLE>Test</TITLE></HEAD>\n";
> print "<BODY>\n";
> print "Hello World!\n";
> print "</BODY></HTML>\n";
> 
> I expected my Web Browser to open up and display Hello World!
> Have I really missed something, What gives?
> 

You seem to have missed a whole bunch of steps here :

browser makes request to SERVER for resource
SERVER receives request and decides that it is for a CGI program
SERVER executes CGI program
CGI program runs and sends output to SERVER
SERVER optionally adds some header information and sends output to browser

You need to have another piece of software on your PC.

The Activestate documentation contains information on configuring various
HTTP servers - the newsgroup comp.infosystems.www.servers.ms-windows
will be able to suggest various servers available and give further
advice on their installation and configuration.

<Followups set>

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: 3 Oct 1999 11:12:47 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: CGI.pm
Message-Id: <7t7dnf$8lk$1@gellyfish.btinternet.com>

On Sun, 3 Oct 1999 03:05:57 -0500 Scott Beck wrote:
> Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
> news:7t63nn$87v$1@gellyfish.btinternet.com...
>> On Sat, 2 Oct 1999 17:22:02 -0500 Scott Beck wrote:
>> > I noticed allot of questions about CGI.pm and how to use
>> > it so I thought I would post this Help file I made for CGI.pm.
>> > It is basically an indexed version of the documentation.
>> > I did not write the documentation in this file I just
>> > compiled it into a help file.
>> >
>> > This will only work on Windows.
>> >
>> > If this was inappropriate for posting to this group I apologize.
>> >
>>
>> yes this was an inappropriate posting for this group - it was a binary
>> posting in some unknown format - totally useless to the majority of
>> the people here who would anyhow have the CGI.pm manpage.
>>
>> Thanks for your efforts but believe me it was totally misguided ....
>>
> 
> OK Sorry.
> 

It might however be helpful if you placed this file on an FTP or web
server and posted the URL to it here so anyone who is interested can
access it.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sun, 3 Oct 1999 07:15:38 -0500
From: "Scott Beck" <admin@gatewaysolutions.net>
Subject: Re: CGI.pm
Message-Id: <rvei1ggik5t11@corp.supernews.com>

OK, here is a URL to download it.
Sorry again for the incontinence.

http://gatewaysolutions.net/download/CGI-hlp.chm


--
Scott Beck

Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:7t7dnf$8lk$1@gellyfish.btinternet.com...
> On Sun, 3 Oct 1999 03:05:57 -0500 Scott Beck wrote:
> > Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
> > news:7t63nn$87v$1@gellyfish.btinternet.com...
> >> On Sat, 2 Oct 1999 17:22:02 -0500 Scott Beck wrote:
> >> > I noticed allot of questions about CGI.pm and how to use
> >> > it so I thought I would post this Help file I made for CGI.pm.
> >> > It is basically an indexed version of the documentation.
> >> > I did not write the documentation in this file I just
> >> > compiled it into a help file.
> >> >
> >> > This will only work on Windows.
> >> >
> >> > If this was inappropriate for posting to this group I apologize.
> >> >
> >>
> >> yes this was an inappropriate posting for this group - it was a binary
> >> posting in some unknown format - totally useless to the majority of
> >> the people here who would anyhow have the CGI.pm manpage.
> >>
> >> Thanks for your efforts but believe me it was totally misguided ....
> >>
> >
> > OK Sorry.
> >
>
> It might however be helpful if you placed this file on an FTP or web
> server and posted the URL to it here so anyone who is interested can
> access it.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>




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

Date: 3 Oct 1999 14:14:17 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: Re: CGI.pm
Message-Id: <7t7obp$kqs$1@rguxd.viasystems.com>

Scott Beck <admin@gatewaysolutions.net> wrote:
:>OK, here is a URL to download it.
:>Sorry again for the incontinence.

LOL.  I know that incontinence has a more generic meaning of "lacking
in restraint", but this brought a funny picture to my mind of
somebody pooting all over c.l.p.m.  :-)

Perhaps this word should enter the lexicon of those who choose to
admonish inappropriate posters.  If you can compare their
transgression to farting in a crowd or dropping a load in their
shorts, they will be so busy laughing they won't be so combatitive
and defensive.

print "Just another guy who laughs at fart jokes",


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

Date: 3 Oct 1999 15:09:14 GMT
From: vaughan@itdc.edu (Tom Vaughan)
Subject: Re: deprecated $[
Message-Id: <7t7riq$j9o$1@malgudi.oar.net>

Tracey Hughes (TH@Dymaxion.ca) wrote:

: I was wondering if anyone knows why exactly the $[ variable was deprecated
: after release 5.

It causes problems if you use negative subscripts. Since Perl5 allows the
use of negative subscripts to access the end of an array, if $[ is set to 
a negative value to begin with this could cause some confusion. 

	$[ = -1;
	@array = ( "moe", "larry", "curly" );

	print $array[-1]; # does this mean the 1st or the last element?

I have worked with someone that attempted this, against all sane
advice and had it working some of the time. In a for loop the negative
index seems to revert to the end of the array.

Tom







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

Date: Sun, 03 Oct 1999 11:03:11 -0300
From: Arved_37@chebucto.ns.ca (Arved Sandstrom)
Subject: Re: DU in perl
Message-Id: <Arved_37-0310991103120001@dyip-51.chebucto.ns.ca>

In article <FJ0v8M.M6@wolfe>, renez@lightcon.xs4all.nl wrote:

> I'm looking for a module which will do the same thing as the Unix
> command du -ks. I have looked on CPAN but there seems to be no such
> module.
> 
No need for the module. Just use the system command to actually call "du".

Arved


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

Date: Sun, 3 Oct 1999 16:04:04 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: DU in perl
Message-Id: <sjJJ3.1366$Tm3.6024@news1.online.no>


<renez@lightcon.xs4all.nl> wrote in message news:FJ0v8M.M6@wolfe...
> I'm looking for a module which will do the same thing as the Unix
> command du -ks. I have looked on CPAN but there seems to be no such
> module.
>
> Before writing my own version I would like to make sure I'm
> not duplicating work!

File::Find, combined with stat() and the += operator should do the trick.

--
Trond Michelsen





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

Date: Sun, 3 Oct 1999 15:28:53 +0200
From: "Andreas Schulz" <schulz@access.ch>
Subject: GD Library Version 1.19 compiled for Windows NT
Message-Id: <7t7lqa$m0j$1@pacifica.access.ch>

Can anyone help me with these files because I cannot compile the c code by
myself (Newby). Please post them here or tell me where I can find them.

Thanks a lot for your help

Andreas




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

Date: 3 Oct 1999 15:26:44 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: GD Library Version 1.19 compiled for Windows NT
Message-Id: <7t7sjk$927$1@gellyfish.btinternet.com>

On Sun, 3 Oct 1999 15:28:53 +0200 Andreas Schulz wrote:
> Can anyone help me with these files because I cannot compile the c code by
> myself (Newby). Please post them here or tell me where I can find them.
> 

If you are using the Activestate Perl then you can install the GD module
simply with :

ppm install GD

at your command prompt ...

If you are not then you are not being explicit enough.

BTW. Please do not rely on the subject line of your message to convey
the entire sense - you cannot know for certain what any given newsreader
will do with that ....

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sun, 03 Oct 1999 15:54:01 GMT
From: inanna@acronet.net
Subject: HELP!!!!!!!
Message-Id: <37f77b85.242363488@news.acronet.net>

ok, the following was produced by a Perl Syntax Checker program
because this perl file received a 500 error, i dont understand how the
script is flawed, an anyone figure this out?

Can't find string terminator "END" anywhere before EOF at
/usr/home/kenobiz.com/htdocs/cgi-bin/cancer.pl line 7.

Listing of /cgi-bin/cancer.pl

   1: #!/usr/local/bin/perl
   2: 
   3: 
   4: print "Content-type: text/html\n\n";
   5: 
   6: 
   7: print <<END;
   8: <font color="red">
   9: Sort out feelings concerning your emotional partner on the 26th
and 27th. 
  10: Pick up an unusual hobby on the 28th and 29th that will awaken
the creative side of you. 
  11: You need to get out and have some fun socializing with close
friends or lovers on the 30th and 1st. 
  12: Don't count on loved ones for support on the 2nd. 
  13: What you would like the most this week is to melt together with
your beloved or to dissolve in your emotions. 
  14: You are prepared to give yourself completely and expect the same
of your partner. 
  15: Romance plays an important role in your relationships, you want
to chase and be chased. 
  16: If you haven't yet found your center you will want constant
confirmations of acceptance making yourself more vulnerable than you
are. 
  17: Your day dreams will only serve to entertain you this week and
you should embrace the lighter side more than you do. 
  18: It's O.K. to smile this week.
  19: </font>
  20: END


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

Date: Sun, 03 Oct 1999 12:48:51 GMT
From: nimchu@hal-pc.org (Nim Chu)
Subject: How to start up Netscape or Internet Explorer from a Perl script
Message-Id: <7t78pt$286o$1@news.hal-pc.org>

I have a need to start up a Netscape or Internet Explorer browser
session from a Perl script and give it the an URL and goes to a web
page. The script later will send another URL and ask the browser to
display the page. I appreciate any help.



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

Date: Sun, 03 Oct 1999 03:42:43 -0700
From: twood@island.net (Ted Wood)
Subject: Re: How to start up Netscape or Internet Explorer from a Perl script
Message-Id: <twood-0310990342430001@dyn6.duncan.island.net>

In article <7t78pt$286o$1@news.hal-pc.org>, nimchu@hal-pc.org (Nim Chu) wrote:

> I have a need to start up a Netscape or Internet Explorer browser
> session from a Perl script and give it the an URL and goes to a web
> page. The script later will send another URL and ask the browser to
> display the page. I appreciate any help.

Which platform? Macintosh or Window?

If it's Macintosh, then you can send AppleEvents (AppleScript) to control
the browsers. Perl (or MacPerl) integrates nicely with AppleEvents.

If it's Windows, I don't have a clue.

Hope this helps some.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
              Have you checked out NeighbourNet BC?
                        neighbournetbc.com

  Edwin (Ted) Wood    3110 Doupe Road         twood@island.net
  Leopard Concepts    Duncan, B.C.  V9L 6P1
                      (250) 746-8189


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

Date: 3 Oct 1999 12:39:35 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to start up Netscape or Internet Explorer from a Perl script
Message-Id: <7t7iq7$8ql$1@gellyfish.btinternet.com>

On Sun, 03 Oct 1999 12:48:51 GMT Nim Chu wrote:
> I have a need to start up a Netscape or Internet Explorer browser
> session from a Perl script and give it the an URL and goes to a web
> page. The script later will send another URL and ask the browser to
> display the page. I appreciate any help.
> 

You could use the module Win32::OLE if of course you are on windows ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sun, 03 Oct 1999 11:25:46 -0400
From: Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca>
Subject: Re: How to start up Netscape or Internet Explorer from a Perl script
Message-Id: <37F7757A.E1447BA7@ccrs.nrcanDOTgc.ca>

Nim Chu wrote:
> 
> I have a need to start up a Netscape or Internet Explorer browser
> session from a Perl script and give it the an URL and goes to a web
> page. The script later will send another URL and ask the browser to
> display the page. I appreciate any help.

This should work on UNIX.

$url = "http://www.perl.com";

`netscape $url`;

 ..Tom

-----------------------------------------------------------------------------------------
Tom Kralidis                                  Geo-Spatial Technologist 
Canada Centre for Remote Sensing              Tel: (613) 947-1828
588 Booth Street , Room 241                   Fax: (613) 947-1408
Ottawa , Ontario K1A 0Y7                     http://www.ccrs.nrcan.gc.ca
-----------------------------------------------------------------------------------------


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

Date: 3 Oct 1999 10:44:39 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How To Use a User Definied Type in Perl.
Message-Id: <7t7c2n$8l8$1@gellyfish.btinternet.com>

In comp.lang.perl.misc Steven Hildreth <sphildreth@hotmail.com> wrote:
> Hi, I am wanting to know how do you use a user definied type in perl. I use
> this udf in PowerBasic to access a binary database, I am wanting to use perl
> to access this database and display data to a web page.
> 
> Here is a example of the user definied type:
> ----------------------------
> Type ExampleInfo
>     something as string * 1
>     else as integer
>     LastPart as boolean
> end type
> 
> dim Example as ExampleInfo
> 
> open filename for random as FileID
>     get #FileID, , Example
> close FildID
> 
> cls
> print "Here is the something string"; example.something
> end
> 

Perl doesnt have user defined types in the same way as VB does and also
doesnt have a similar mechanism to 'get' to read datafiles directly into
such a structure.

Records are often described with a hash and fixed length data is read
from a file with 'read'. 'read' reads a fixed amount at a time.

'read' will place the record into a single scalar - to dissasemble that
record into its separate parts using 'unpack' it is necessary to know the
actual layout of the record in the file.

Yout example *might* be rendered something like:

@fields = qw(something else LastPart);

open(FILE,"filename") || die "Couldnt open file - $!\n";

my $reclength = 10; # of course I havent the faintest idea about this

while(read(FILE,$buffer,$reclength) == $reclength )
 {
   $record{@fields} = unpack "A1 i C",$buffer; # I made this unpack format
                                                 up - I dont actually know
                                                 what those types would be.
 }

close(FILE);

If you wanted to keep all of the records you would push a reference to
the hash %record onto an array.

For your reading enjoyment:

perldoc -f read
perldoc -f unpack
perldoc -f pack      (this has the formats)
perldoc perldata
perldoc perdsc
perldoc perLoL

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sun, 3 Oct 1999 10:43:04 -0400
From: "Shubha Gargya" <shubha@hindustan.vnet.net>
Subject: interrupt handler routine not being called
Message-Id: <3SJJ3.521$Qg1.98409@ralph.vnet.net>

Why is the following routine not being called when control+c is
pressed:
    $SIG{'INT'} = 'handler';
    print "In main...";
    sleep(10);

sub handler {
     print "Process Interrupted\n";
     $SIG{'INT'} = 'DEFAULT';
     exit(0);
}





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

Date: 3 Oct 1999 15:23:13 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: interrupt handler routine not being called
Message-Id: <7t7sd1$924$1@gellyfish.btinternet.com>

On Sun, 3 Oct 1999 10:43:04 -0400 Shubha Gargya wrote:
> Why is the following routine not being called when control+c is
> pressed:
>     $SIG{'INT'} = 'handler';
>     print "In main...";
>     sleep(10);
> 
> sub handler {
>      print "Process Interrupted\n";
>      $SIG{'INT'} = 'DEFAULT';
>      exit(0);
> }
> 

Works for me perfectly well - think you might need to be more explicit:


Linux gellyfish 2.2.0 #3 Sat Mar 13 15:43:01 GMT 1999 i686 unknown

This is perl, version 5.005_02 built for i686-linux

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: 3 Oct 1999 14:00:28 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: Re: Match and escape processing
Message-Id: <7t7nhs$klu$1@rguxd.viasystems.com>

Abigail <abigail@delanet.com> wrote:
:>lt lindley (ltl@rgsun40.viasystems.com) wrote on MMCCXXIII September
:>MCMXCIII in <URL:news:7t65qr$7c0$1@rguxd.viasystems.com>:
:>`` Abigail <abigail@delanet.com> wrote:
:>`` 
:>`` :>    #!/opt/perl/bin/perl -wl
:>`` 
:>`` :>    use strict;
:>`` 
:>`` :>    sub TIESCALAR {bless \(my $a = '')}
:>`` :>    sub FETCH     {my $a = shift; my $b = $$a; $$a = '$'; $b}
:>`` 
:>`` :>    tie my $xyz => '';
:>`` 
:>`` :>    print "Yes" if $xyz =~ /^\Q$xyz$/;
:>`` 
:>`` :>    __END__
:>`` :>    Yes
:>`` 
:>`` OK.  I left you an opening and you slithered through like
:>`` a snake through a mouse hole.  I should have said "for any
:>`` single value of $xyz".  
:>`` 
:>`` But I'm still ignorant as to why the first reference to $xyz during
:>`` the re interpolation doesn't call FETCH.  I suppose I have some
:>`` reading to do and that it will all make sense then.

:>Oh, but it does. It certainly does. The interesting question is, why
:>is the FETCH from $xyz in the regex called *before* the FETCH call
:>from the $xyz left of the =~....

Ahhh.  I see it now.  I was blinded by the assignment to the tied
object and did not notice that FETCH was returning the prior value of
the base object each time it was called.

As to why the contents of the regex is evaluated first, I won't
spoil your fun except to provide another clue:

 print "Yes" if "$xyz" =~ /^\Q$xyz$/;
__END__

does not print Yes.  


-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: Sun, 03 Oct 1999 03:49:04 -0700
From: twood@island.net (Ted Wood)
Subject: Need help with perl CGI
Message-Id: <twood-0310990349050001@dyn6.duncan.island.net>

I'm currently working on an advanced website that requires CGI scripts to
manage extensive customer databases.

If you:

a) can write PERL scripts and implement as CGI on a UNIX server;
b) are interested in helping me to do this;
c) want *free* access to the service as a Thank You;

then let me know.

Please e-mail your response and I'll send you full details.


Ted.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
              Have you checked out NeighbourNet BC?
                        neighbournetbc.com

  Edwin (Ted) Wood    3110 Doupe Road         twood@island.net
  Leopard Concepts    Duncan, B.C.  V9L 6P1
                      (250) 746-8189


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

Date: 3 Oct 1999 15:14:36 GMT
From: "Charles Cuccaro" <bacjc@worldnet.att.net>
Subject: Passing arguments to PERL script via URL
Message-Id: <01bf0db2$f49af900$13644e0c@bacjc>

Hello, I'm trying to pass arguments into a PERL script via a URL.

First off, is it even possible for a PERL script to receive arguments from
a URL?
example: http://www.thedomainname.com/test.cgi?name="Bob"&id="1234"

If it is, then what is the syntax for the URL and how do I get the values
in the PERL script?

What I would like to do is to be able to redirect user to various pages
based on the id passed into the script.

Thank you in advance.
cj



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

Date: Sun, 03 Oct 1999 11:31:25 -0400
From: Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca>
Subject: Re: Passing arguments to PERL script via URL
Message-Id: <37F776CD.AB122456@ccrs.nrcanDOTgc.ca>

Charles Cuccaro wrote:
> 
> Hello, I'm trying to pass arguments into a PERL script via a URL.
> 
> First off, is it even possible for a PERL script to receive arguments from
> a URL?
> example: http://www.thedomainname.com/test.cgi?name="Bob"&id="1234"
> 
> If it is, then what is the syntax for the URL and how do I get the values
> in the PERL script?
> 
> What I would like to do is to be able to redirect user to various pages
> based on the id passed into the script.
> 
> Thank you in advance.
> cj

First you would have to decode the input information passed from the
previous page.  Depending on what inputs you've passed, you'd work with
them in the resulting page.  You wouldn't quote your argument values.

Check out http://www.cgi101.com/ this should help you out.

BTW, messages like these should be directed to:
comp.infosystems.www.authoring.cgi

 ..Tom

-----------------------------------------------------------------------------------------
Tom Kralidis                                  Geo-Spatial Technologist 
Canada Centre for Remote Sensing              Tel: (613) 947-1828
588 Booth Street , Room 241                   Fax: (613) 947-1408
Ottawa , Ontario K1A 0Y7                     http://www.ccrs.nrcan.gc.ca
-----------------------------------------------------------------------------------------


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

Date: 3 Oct 1999 11:07:58 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl vs. PHP3
Message-Id: <7t7dee$8lh$1@gellyfish.btinternet.com>

On Sun, 03 Oct 1999 10:10:05 +0200 Moritz Mertinkat wrote:
> Hi,
> 
>   I have to write an Advertising Script (Banner rotation),
>   but I still don't know what language I should use.
> 
>   What do you think is the better language (speed!) for
>   this task?
> 

We dont go for language advocacy here much:  it is assumed that if you
are asking a question here then you are already using Perl and have some
question that pertains to the language.   Of course it is likely that
you are going to get a rather one sided view here and that view will be
that you should use Perl for this.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: 3 Oct 1999 06:45:24 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl vs. PHP3
Message-Id: <slrn7vegug.2ot.abigail@alexandra.delanet.com>

Moritz Mertinkat (bluebit@gmx.net) wrote on MMCCXXIV September MCMXCIII
in <URL:news:37F70F5D.92203002@gmx.net>:
\\ 
\\   I have to write an Advertising Script (Banner rotation),
\\   but I still don't know what language I should use.

I wouldn't write it at all. Banner ads are the work of the devil.

\\   What do you think is the better language (speed!) for
\\   this task?

Forth.



Abigail
-- 
               split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_)  {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


  -----------== 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: 3 Oct 1999 14:16:18 GMT
From: jcostom@madcow.jasons.org (Jason Costomiris)
Subject: Re: Perl vs. PHP3
Message-Id: <slrn7vep9i.3bn.jcostom@madcow.jasons.org>

On Sun, 03 Oct 1999 10:10:05 +0200, Moritz Mertinkat <bluebit@gmx.net> wrote:
:   I have to write an Advertising Script (Banner rotation),
:   but I still don't know what language I should use.
: 
:   What do you think is the better language (speed!) for
:   this task?

That depends on what you know and how your server is configured.

Is perl your strong-suit?  Are you using mod_perl on Apache?  Then use perl.

Are you better w/C than perl?  Run mod_php3 on Apache.

It's a silly question that only you can answer.

So, I'll suggest you use Algol.  Or maybe B.

-- 
                 Jason Costomiris <><
            Technologist, cryptogeek, human.
jcostom {at} jasons {dot} org  |  http://www.jasons.org/ 


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

Date: 2 Oct 1999 02:30:38 GMT
From: Colin R. DeVilbiss <crdevilb@mtu.edu>
Subject: Re: Simple newbie problem...
Message-Id: <7t3qoe$6pg$1@campus3.mtu.edu>

Bill Moseley <moseley@best.com> wrote:
> jon@osfn.org (jon@osfn.org) seems to say...
> > Hi,
> > how do I now edit these files (I want the changed file to have the
> > original name??

> Check out the -I switch.  Program Perl has an example (lookup -I in the 
> index) or perldoc perlrun and look at the -I examples.

tr/I/i/;

Colin R. DeVilbiss
crdevilb@mtu.edu


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

Date: 3 Oct 1999 15:37:45 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Simple newbie problem...
Message-Id: <7t7t89$92a$1@gellyfish.btinternet.com>

On Fri, 01 Oct 1999 23:39:42 GMT jon@osfn.org wrote:
> Hi,
> 
> I need to replace one string with an other in multiple .html documents
> 

I had also forgotten that Tom Christiansen posted a program quite recently
here that would do exactly this - I'm sure you will be able to find it on
Deja News ... 

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sun, 3 Oct 1999 08:32:47 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Simple newbie problem...
Message-Id: <MPG.126116fde621e8289897c7@206.184.139.132>

Colin R. DeVilbiss (crdevilb@mtu.edu) seems to say...
> Bill Moseley <moseley@best.com> wrote:
> > Check out the -I switch.  Program Perl has an example (lookup -I in the 
> > index) or perldoc perlrun and look at the -I examples.
> 
> tr/I/i/;

Time to adjust my dose.  I've been using $^I too much.

Thanks for watching!




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


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

Date: Sun, 3 Oct 1999 16:13:50 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Values of thousand
Message-Id: <CsJJ3.1460$Tm3.5914@news1.online.no>


Marc <puma@mailandnews.com> wrote in message
news:7t3db4.3vseghf.0@pumamarcmailandnews.h3B0BFA44.invalid...
> Christopher wrote in <37f53cc1.3845763@PersonalNews.de.uu.net>:
>
> >- 125.000 or 12,900,000 for europe (point)
>     Er, not to nitpick too much, but isn't the European method more like
> 125 900 000,30  Not points used at all, and a coma for the decimal mark?

I don't think there's any "European standard" on this. In Norway this number
would be written as 125.900.000,30

--
Trond Michelsen





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

Date: Sun, 03 Oct 1999 17:21:48 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Values of thousand
Message-Id: <37F7748C.4A20C7CA@ife.ee.ethz.ch>

Trond Michelsen wrote:
> 
> Marc <puma@mailandnews.com> wrote in message
> news:7t3db4.3vseghf.0@pumamarcmailandnews.h3B0BFA44.invalid...
> > Christopher wrote in <37f53cc1.3845763@PersonalNews.de.uu.net>:
> >
> > >- 125.000 or 12,900,000 for europe (point)
> >     Er, not to nitpick too much, but isn't the European method more like
> > 125 900 000,30  Not points used at all, and a coma for the decimal mark?
> 
> I don't think there's any "European standard" on this. In Norway this number
> would be written as 125.900.000,30

I personally (swiss) would use another character:
125'900'000,30

- Alex


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

Date: 3 Oct 1999 15:41:51 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Values of thousand
Message-Id: <7t7tfv$92d$1@gellyfish.btinternet.com>

On Sun, 3 Oct 1999 16:13:50 +0200 Trond Michelsen wrote:
> 
> Marc <puma@mailandnews.com> wrote in message
> news:7t3db4.3vseghf.0@pumamarcmailandnews.h3B0BFA44.invalid...
>> Christopher wrote in <37f53cc1.3845763@PersonalNews.de.uu.net>:
>>
>> >- 125.000 or 12,900,000 for europe (point)
>>     Er, not to nitpick too much, but isn't the European method more like
>> 125 900 000,30  Not points used at all, and a coma for the decimal mark?
> 
> I don't think there's any "European standard" on this. In Norway this number
> would be written as 125.900.000,30
> 

Yeah.  The UK which is irrefutably part of Europe (that nice Tony told me so)
and we would have 125,900,000.30 ;-}

> --
> Trond Michelsen

That extra space after the two dashes really is important to most newsreaders.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

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


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