[10090] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3683 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 10 16:07:26 1998

Date: Thu, 10 Sep 98 13:00:17 -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           Thu, 10 Sep 1998     Volume: 8 Number: 3683

Today's topics:
    Re: Absolute and Relative paths (Abigail)
    Re: Absolute and Relative paths <ckuskie@cadence.com>
    Re: CGI posting to CGI on SSL... dturley@pobox.com
    Re: History of Perl - round 1 <elaine@cts.wustl.edu>
        How to make a bot(as irc bot) with perl in NT server? (James  Bond  098)
        Net::CDDB? <ketanp@NOSPAMxwebdesign.com>
    Re: Objects & type checking <eashton@bbnplanet.com>
    Re: Objects & type checking <tchrist@mox.perl.com>
    Re: Objects & type checking <eashton@bbnplanet.com>
    Re: Objects & type checking (Tom Christiansen)
    Re: Perl "mkdir" function (Faust Gertz)
    Re: Perl & Java - differences and uses <borg@imaginary.com>
    Re: Perl & Java - differences and uses bjohnsto_usa_net@my-dejanews.com
    Re: Perl & Java - differences and uses bjohnsto_usa_net@my-dejanews.com
    Re: Perl & Java - differences and uses (Abigail)
        Perl Programmer needed <Pierre.Laplante@intellia.com>
    Re: Perl-Cgi-htaccess is this as simple as I think it i <jeff@vpservices.com>
    Re: perl/msql script doesn;t work when called from web  dturley@pobox.com
    Re: QUESTIONS (was: Perl Programmer Needed) (Ben Coleman)
    Re: Tokenizer in Perl... <aqumsieh@tigre.matrox.com>
        What is "Robot" in Perl? (James  Bond  098)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 10 Sep 1998 19:10:50 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Absolute and Relative paths
Message-Id: <6t987q$rie$1@client3.news.psi.net>

Michael Holden (michael@holdendesign.com) wrote on MDCCCXXXVI September
MCMXCIII in <URL: news:35F81792.FFD7BB9C@holdendesign.com>:
++ 
++ I have to change all <a href> links from absolute paths to relative
++ paths on roughly 5000 files. In the spirit of not reinventing the wheel
++ I was wondering if anyone knew if there were scripts or modules out
++ there that can assist with this.


use HTML::Parser;



Abigail
-- 
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
          for (s;s;s;s;s;s;s;s;s;s;s;s)
              {s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'


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

Date: Thu, 10 Sep 1998 12:43:40 -0700
From: Colin Kuskie <ckuskie@cadence.com>
Subject: Re: Absolute and Relative paths
Message-Id: <Pine.GSO.3.96.980910120848.27123B-100000@pdxue150.cadence.com>

On Thu, 10 Sep 1998, Michael Holden wrote:

> I have to change all <a href> links from absolute paths to relative
> paths on roughly 5000 files. In the spirit of not reinventing the wheel
> I was wondering if anyone knew if there were scripts or modules out
> there that can assist with this.

I've never heard of a general purpose tool to do this.  Given the
scope of the problem I doubt such a tool exists since it would
have to be really flexible and programmable.

Your best bet is to write a quick/dirty perl script to do this:

#!/usr/local/bin/perl -w

while (<>) {
  next unless /<A HREF/;  ##Skip unwanted lines
  ($url) = /<A HREF="([^"]+)"/;  ##grab the path
  ##change the path to be what you want
  s/<A HREF="([^"]+)"/<A HREF="$url"/;
  print;
}

VERY IMPORTANT NOTES:

1) It's case sensitive (A HREF).
2) Assumes only HREF per line.
3) Doesn't allow double quotes in the URL (not too crazy, but you
   know).
4) Works like a pipe:  noabs file.html > file1.html

You could change it to modify files in place:

#!/usr/local/bin/perl -wpi.bak

next unless /<A HREF/;  ##Skip unwanted lines
($url) = /<A HREF="([^"]+)"/;  ##grab the path
##change the path to be what you want
s/<A HREF="([^"]+)"/<A HREF="$url"/;

Now you can invoke it like this:  noabs file.html
and it will save the original file in file.html.bak and you can embed
it in another script that might use the File::Find module to
find all of your html files.

Of course, you can find documentation for all of this in the manpages
(man perl), or on the web (http://www.perl.com), or by doing a DejaNews
search...

Good luck,
Colin



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

Date: Thu, 10 Sep 1998 18:53:16 GMT
From: dturley@pobox.com
Subject: Re: CGI posting to CGI on SSL...
Message-Id: <6t976s$keq$1@nnrp1.dejanews.com>

In article <35F7ECD6.9C87DA2A@cswnet.com>,

> <BR>program and POST it to another CGI program that is on a SSL server.&nbsp;
> The
> <BR>subroutine I have written works fine on non-secure systems.

Most ISPs have their secure severs running as different users. Generally you
have to chmod any files that are read/write to 666, if you are using the ISPs
cerificate. Getting your own certificate is a solution to these really bad
permission settings.

Is there some reason you put all those html tags in your post, besides just to
be irritating

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 10 Sep 1998 12:37:51 -0500
From: elaine ashton <elaine@cts.wustl.edu>
To: perlguy@technologist.com
Subject: Re: History of Perl - round 1
Message-Id: <Pine.SOL.3.96.980910123146.25583C-100000@helen.cts.wustl.edu>

> Not if you get the new "Perl keyboard"!!!

I'm _all_ over that if it comes in the shape of a camel. "One hump or
two?" :)

> Only $19.95 from Ronco.

Is Ronco or K-Tel still around? Those commercials in the 70s were so
great. Those people old enough to remember the SNL skit spoofing them may
understand the nickname.

> (Use only under close adult supervision)

Adults spoil all our fun. :) 

e.



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

Date: Fri, 11 Sep 1998 17:05:40 GMT
From: burningboy@hotmail.com (James  Bond  098)
Subject: How to make a bot(as irc bot) with perl in NT server?
Message-Id: <35f9575d.11126686@news.au.ac.th>

hmm...
Is it possible to make a bot(like irc bot) with perl in NT server?
Can i upload the file to the /cgi-bin/ directory and start the bot
with Netscape?

 ..................
in unix we can use Background Process, but in NT can we do the
Background work? and what command in perl can do that?

 .0.


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

Date: Thu, 10 Sep 1998 15:22:44 -0400
From: Ketan Patel <ketanp@NOSPAMxwebdesign.com>
Subject: Net::CDDB?
Message-Id: <35F82704.9DB8E9C7@NOSPAMxwebdesign.com>

Anyone know where I can find this module?  I looked on CPAN and couldn't
find it... I also emailed the author and received no response...

Thanks


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

Date: Thu, 10 Sep 1998 18:51:57 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Objects & type checking
Message-Id: <35F81D70.C39107E@bbnplanet.com>

Mark Lehrer wrote:

> I agree, this is my first OO Perl project so I don't know the
> differences well, yet.  The tutorials haven't done a good job of
> explaining them.

There are a bunch of Perl tutorials out there on-line as well as the
book "Learning Perl" (llama on the cover). However, you must not
approach the language thinking "Well, I could do this in C++....".
Approach it with the idea of exploring this really groovy new way to
play and it will seem much easier. I guarantee it or your money back. :)

e.


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

Date: 10 Sep 1998 19:10:19 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Objects & type checking
Message-Id: <6t986r$80v$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> writes:
:> I agree, this is my first OO Perl project so I don't know the
:> differences well, yet.  The tutorials haven't done a good job of
:> explaining them.
:
:There are a bunch of Perl tutorials out there on-line as well as the
:book "Learning Perl" (llama on the cover). 

This is not good advice.  The LLama's treatment of OO is sketchy at best.

--tom
-- 
"Usenet is like a herd of performing elephants with diarrhea --
massive, difficult to redirect, awe-inspiring, entertaining, and a
source of mind-boggling amounts of excrement when you least expect
it." --gene spafford, 1992


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

Date: Thu, 10 Sep 1998 19:26:57 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Objects & type checking
Message-Id: <35F825A5.7F3E20AC@bbnplanet.com>

Tom Christiansen wrote:

> :There are a bunch of Perl tutorials out there on-line as well as the
> :book "Learning Perl" (llama on the cover).
> 
> This is not good advice.  The LLama's treatment of OO is sketchy at best.

Point taken. However, if Mark didn't quite like the perltoot, I thought
that he might need to get a better background in the language. I hear
there is a cookbook out there that might help too. :) 

e.


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

Date: 10 Sep 1998 19:34:01 GMT
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: Objects & type checking
Message-Id: <6t99j9$91k$1@csnews.cs.colorado.edu>

In comp.lang.perl.misc, Mark Lehrer <mark@satch.markl.com> writes:
:>  [courtesy cc of this posting sent to cited author via email]
:unfortunately it was a spam-proof address.  8^)

Then this is a spam-proof-proof message.

:I agree, this is my first OO Perl project so I don't know the
:differences well, yet.  The tutorials haven't done a good job of
:explaining them.

Thank you.

:I learned that it isn't possible to have two methods of the same class
:with the same name; which I'll assume means that I can have only one
:constructor per class.

That's incorrect.  The answer can be found in <*SPAM CENSORED*>.

:> What would @ISA have to do with arguments?
:
:How else does a method know what object types were passed to it as
:arguments?

That's incorrect.  The answer can be found in <*SPAM CENSORED*>.

--tom
-- 
    s = (char*)(long)retval;                /* ouch */
        --Larry Wall in doio.c from the perl source code


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

Date: Thu, 10 Sep 1998 18:58:03 GMT
From: faust@wwa.com (Faust Gertz)
Subject: Re: Perl "mkdir" function
Message-Id: <35f81f28.1543261@news.wwa.com>

On Thu, 10 Sep 1998 17:23:58 +0100, "Pemail"
<darren.hudson@pemail.net> wrote:

>Could anyone supply any examples (or url's that provide the source code) of
>perl code that includes the function "mkdir". The reference perl books are
>rather skeletal!

If you tell us what you want to do, we might be able to supply you
with better examples.

>From perlfunc:

> mkdir FILENAME,MODE 
> Creates the directory specified by FILENAME, with permissions specified by 
> MODE (as modified by umask). If it succeeds it returns 1, otherwise it returns 
> 0 and sets $! (errno). 

A nicely formated bit of code from perlstyle:

>    mkdir $tmpdir, 0700 or die "can't mkdir $tmpdir: $!";
>    chdir($tmpdir)      or die "can't chdir $tmpdir: $!";
>    mkdir 'tmp',   0777 or die "can't mkdir $tmpdir/tmp: $!";

Depending on what you are doing, you might want to look at File::Path.


HTH

Faust Gertz
Philosopher at Large


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

Date: Thu, 10 Sep 1998 18:54:00 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <cfVJ1.701$E9.2455911@ptah.visi.com>

In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: George Reese wrote:
:> 
:> David Cantrell <NukeEmUp@ThePentagon.com> wrote:
:> : However, your assertion has been proven wrong.  And _why_ is being
:> : concise a problem?  If you actually look at production perl code, it
:> : doesn't appear anything like Obfuscated Perl Contest winners.
:> 
:> Your thesis resist on the premise that fewer keystrokes is better.
:> That is false.

: Um, the goal was to show how "Perl accomplishes a task easier".
: This may or may not be equivalent to "better", in your moral
: framework; but I'm having a hard time seeing how

:     python -c 'import sys; import string; \
:         print string.atoi(sys.argv[1], 16)' 40

: accomplishes its task easier than

:     perl -e 'print hex shift' 40

It doesn't.  And the perl version is not easier either.  Just fewer
keystrokes.  Unless your sole goal is 'coding in the fewest
keystrokes', I do not see how you can argue one version is
meaningfully different than the other.

:> And a beautiful troll looks nothing like an ugly
:> troll -- but they are still both trolls.

: As Mr. Reese's recent posts in comp.lang.perl.misc neatly demonstrate.

Cannot deal with someone attacking your pet language so you resort to
attacks on my character?

-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: Thu, 10 Sep 1998 18:46:44 GMT
From: bjohnsto_usa_net@my-dejanews.com
Subject: Re: Perl & Java - differences and uses
Message-Id: <6t96qk$k20$1@nnrp1.dejanews.com>

In article <8c3ea3qyc3.fsf@gadget.cscaper.com>,
  Randal Schwartz <merlyn@stonehenge.com> wrote:
> >>>>> "bjohnsto" == bjohnsto usa net <bjohnsto_usa_net@dejanews.com> writes:
>
> bjohnsto> On the Web server.
>
> bjohnsto> On the web server you can execute a Perl script, or a Java
> bjohnsto> Sevlet (There are plenty of nonstandard solutions: if you
> bjohnsto> use AOL server you could use a TCL script and with
> bjohnsto> Microsoft's IIS you could use an ASP page).
>
> bjohnsto> These scripts could do some processing like putting an order
> bjohnsto> into a database, then generate a page to show the results.
> bjohnsto> Perl is better than Java at manipulating text.  So Perl is
> bjohnsto> mostly better for this job.  To help get around Java's
> bjohnsto> weakness with Text Sun has introduced jhtml pages which help
> bjohnsto> somewhat.  Perl has much less need for help here.
>
> You've also forgotten the way-cool "mod_perl" that permits Perl
> "Servlets" (ugh, what a name) under Apache (the dominant Web server on
> the net, and gaining market share).  This isn't just souped up CGI...
> Perl through mod_perl has access to the entire Apache API, and can do
> everything from creating a custom logging record into a database all
> the way to translating URLs into database calls depending on the time
> of day.

I have not forgotten mod_perl, with straight CGI, establishing a new database
connection for each hit would make perl a joke for high volume sites.

I have never used mod_perl.  It sounds pretty impressive.
Perl is strong on the web server already.

My experiences with perl technology have been pretty good as far as the
language goes, but perl on NT has real problems.  And its more than just that
NT has real problems.  Perl comes from unix and it shows.

My solution - use unix for web servers.

> bjohnsto> On the Browser
>
> bjohnsto> On the web browser Java has a full built-in graphical
> bjohnsto> environment in a secure sand box.  Java's competition here
> bjohnsto> is JavaScript, an unrelated language which fits into the
> bjohnsto> HTML environment rather than having its own GUI.  Perl is
> bjohnsto> not wide spread enough amongst clients to be useful.
>
> And Java is disabled enough on serious surfers to not be useful
> either.  I'll never surf the wide-open net-seas with Java or
> Javascript enabled.

Most people have both enabled all the time.

Everyone at this company (over 5000 of them) does.

Bugs in Netscape are far more likely to crash your machine than the risk a
malicious applet.

I have never had any damage from a malicious applet, nor have I ever heard of
anyone suffering any damage from one.

I think that Java is definitely safe enough to have enabled for MOST (not all)
people.

Some companies do not allow employees to use the internet at all for security
reasons.  (Some for time management or cost reasons)

There are real problems with any sophisticated client based technologies. My
experiences installing an Excel macro recently reminded me of some of these.

Java is not completely standard.  There are a 3 major versions 1.02, 1.1, and
Microsoft's attempt to derail Java.  There will soon be a forth 1.2.

JVM's are not very stable.  Surfing to a Java site is a good way to make
Netscape even more unstable than it already is.  I don't use IE but I presume
the same story applies.

> bjohnsto> In the Database
>
> bjohnsto> Java is being added to the existing proprietary programming
> bjohnsto> languages available for storing logic to run inside
> bjohnsto> databases.  Java's competitors include PL/SQL, TransactSQL
> bjohnsto> and other proprietary languages.  In the database Perl is
> bjohnsto> again not supported here.
>
> Tim Bunce and the thousands of users of DBI/DBD would probably
> disagree with you here. :)

DBI/DBD is not IN the database.

You can't use perl to write a database stored procedure.
You can't use perl to write a database trigger.
You can't transparently serialize a perl object into a database.
You can't call methods on perl object which are stored in the database.
You can't call a perl method in an SQL statement.

I have done all this stuff with Java and Sybase SQL Anywhere.

Oracle claims to be doing this kind of thing in their next release.
Most RDBMS vendors (not Microsoft) have announced plans to do this.

I know of know plans to add perl inside any relational database.

This is not because there is anything wrong with perl the language.

> Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095

Brendan Johnston


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 10 Sep 1998 19:05:22 GMT
From: bjohnsto_usa_net@my-dejanews.com
Subject: Re: Perl & Java - differences and uses
Message-Id: <6t97ti$lmi$1@nnrp1.dejanews.com>

In article <905295043.652672@thrush.omix.com>,
  Zenin <zenin@bawdycaste.org> wrote:

[snip stuff I agree with]

>
>         Sand boxes are only really useful for enterprise apps, as no
>         one else is (or should be) foolish enough to allow them for
>         general web sites.

Don't understand what you mean. Are you taking about the methods to give
signed applets extra permissions? Even if they were supported by the popular
browsers, I think that you should try to remove the need for these from your
architecture.

>
> : And Java is disabled enough on serious surfers to not be useful
> : either.  I'll never surf the wide-open net-seas with Java or
> : Javascript enabled.
>
>         I run pretty wide-open, but I do it from an highly restricted
>         login.

I use Windows95 at work wide open, and Windows 95 will let anyone do anything.
If I had some choice and did use something decent I would probably still use a
reasonably powerful login.

> : Tim Bunce and the thousands of users of DBI/DBD would probably
> : disagree with you here. :)
>
>         Yep.  Solid, high-performance database connectivity is exactly
>         why we've chosen Perl for a number of mission critical uses at
>         my current company.
>
>         The last thing anyone trying to write a scalable app in Java
>         would do is use JDBC directly from the client anyway

Yes, the database vendors can't make their products/architecture work with
many simultaneous users. Pretty pathetic really.

>  and Java
>         lacks the basic primitives (select(), non-blocking IO, file
>         descriptor passing, etc) to compete for use in writing servers
>         under Unix (thread all blocking IO my ass...).

Not sure I agree. The servers I have written have all been fairly low volume,
and Java would have been fine.

Non blocking file IO would be pretty easy to add as a JNI call. I guess
select is some kind of wait for multiple semaphore/socket wait call but I
have never done any unix systems stuff so I don't know.

I guess the Java people just want you to use more threads.

Maybe now that Sun is looking more towards Java on the server al well as in a
set top box, you will get more of the what you need.

Maybe in addition to Personel Java we will get Server Java.

>   Even JDBC from
>         Servlets is worthless with 3k-10k simultaneous users, which is
>         common for enterprise level applications.

Servlets are improving fast.
I don't see any major long term issues with the architecture.

>         To be honest, Java is pretty darn good for client apps, but
>         for servers it bites, and without an extra tier or three it
>         can't scale database access well at all (but then, neither
>         can anything else, really, for the same reasons).

Databases themselves are the limiting factor.
They are an order of magnitude slower than any of the web technologies.

>
> --
> -Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:

Brendan Johnston


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 10 Sep 1998 19:40:47 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6t99vv$s7o$1@client3.news.psi.net>

Brent Michalski (perlguy@inlink.com) wrote on MDCCCXXXVI September
MCMXCIII in <URL: news:35F802B3.7A1F1EC9@inlink.com>:
++ George Reese wrote:
++ > 
++ > Anything that can be done in Perl can by done in Python more easily.
++ > And you can actually read and maintain the Python code.
++ 
++ I cannot believe the ignorance on display here!

I can. It's George! Of course he's ignorent; he has always been.
Don't pay attention to him. He's killfile fodder.



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


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

Date: Thu, 10 Sep 1998 19:21:04 GMT
From: Pierre Laplante <Pierre.Laplante@intellia.com>
Subject: Perl Programmer needed
Message-Id: <35F82664.F0E378DF@intellia.com>

This is a multi-part message in MIME format.
--------------0B6620CE5754EBA7FC337A55
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I need a perl programmer ASAP for a 23 hours project on a solaris
system.

I need cv + code example + rate

thanks

--------------0B6620CE5754EBA7FC337A55
Content-Type: text/x-vcard; charset=us-ascii;
 name="laplante.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Pierre Laplante
Content-Disposition: attachment;
 filename="laplante.vcf"

begin:vcard
n:Laplante;Pierre
tel;fax:514.392.0911
tel;work:514.392.1292
x-mozilla-html:TRUE
org:Intellia Inc.
adr:;;2305, Sainte-Cunigonde;Montrial;Quibec;H3J 2X1;Canada
version:2.1
email;internet:pierre.laplante@intellia.com
title:Conseiller principal
note:Pierre.Laplante@altavista.net
x-mozilla-cpt:;-7280
fn:Pierre Laplante
end:vcard


--------------0B6620CE5754EBA7FC337A55--



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

Date: 10 Sep 1998 18:05:08 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Perl-Cgi-htaccess is this as simple as I think it is?
Message-Id: <35F8144F.4525B256@vpservices.com>

And someone can't fudge the http_referrer by sending their own header?

- Jeff

Daniel Adams wrote:
> 
> Well, for a start it is a trivial matter to test where the form was
> submitted from and, if it wasn't from your domain, to reject the
> input.
> Hells, even *I* can do this, and I'm Mr Newbie. I do this on about
> half my
> scripts anyway,
> 
> --
> 
> Dan Adams
> dan@fearsome.net
> 
> Jeff Zucker wrote in message <35F7F1B5.2035566D@vpservices.com>...
> >dmorel wrote:
> >> [...]
> >> I need to set a variable for the number of times they
> >> are allowed to enter.
> >> [...]
> >> could I not have a script that would read the contents
> >> of a form (user-name, password, number of times allowed)
> >
> >What would prevent someone from creating their own form on their own
> box
> >with the same variables (with times_allowed = 1 zillion) and
> submitting
> >it to your script?
> >
> >- Jeff


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

Date: Thu, 10 Sep 1998 18:49:18 GMT
From: dturley@pobox.com
Subject: Re: perl/msql script doesn;t work when called from web page
Message-Id: <6t96ve$ka6$1@nnrp1.dejanews.com>

In article <6t8m2a$rb9$1@nnrp1.dejanews.com>,
  nospam.ajm@antopia.com wrote:

>Everything works great when I run the script from the
shell,
> I can read and write data to my database fine.	However, when I run the
same
> script from the web page it won't connect,

Runs from the command line, not from the browser, heh? That makes it a cgi
problem, no? Try comp.infosystems.www.authoring.cgi

You should also know that many ISP have different machines for shell accounts
and web servers. If you think you should ask your ISP to do something, perhaps
that's an indication that maybe you do. :-0 Your ISP probably has a help/faq
page as well.


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 10 Sep 1998 18:59:40 GMT
From: tnguru@termnetinc.com (Ben Coleman)
Subject: Re: QUESTIONS (was: Perl Programmer Needed)
Message-Id: <35f82151.604579419@news.mindspring.com>

On Wed, 09 Sep 1998 11:14:04 -0400, John Porter <jdporter@min.net> wrote:

>How about
>19. Dangle the offer of pre-IPO stock.

Not to mention

20.  Post a 'business' message from a .edu address.

Ben
-- 
Ben Coleman
Senior Systems Analyst
TermNet Merchant Services, Inc.
Atlanta, GA


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

Date: 10 Sep 1998 15:24:49 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: Tokenizer in Perl...
Message-Id: <x3y4suflqim.fsf@tigre.matrox.com>


Jian Zhang <jian@cisco.com> writes:

> 
> Hi,
> 
> I am new to Perl and working on a simple parser.  I'm looking for a way
> doing tokenization in Perl.  For example, given a string:
> 
>   module  my_module(33: 3){
> 
> The perl program should parse the string into an array:
> 
>   @string_array = ("  ",
>                    "module",
>                    "  ",
>                    "my_module",
>                    "(",
>                    "33",
>                    ":",
>                    " ",
>                    "3",
>                    ")",
>                    "{");
> 
> Please note that I also need all white-spaces preserved and accurately
> parsed.
> 
> If someone could give some hint or even an example (if it's not too
> complicated), it would be greatly appreciated.
> 
> Thanks in advance.
> 
> Jian Zhang
> San Jose, CA
> 
> 

This is interesting .. I don't think you can find an easy solution for
this (maybe I'm wrong!) .. 

I can only think of splitting on boundaries. If you're not familiar
with regexps then I suggest you read the perlre manpages.

$string = '  module  my_module(33: 3){';
@string_array = split /\b/, $string;

This will give you:

'  '
'module'
'  '
'my_module'
'('
'33'
': '
'3'
'){'


It's not quite what you want since '(', ' ', ':', ')' and '{' are all
non words, so no boundaries exist between them. But this is the best I
could come up with at the moment. Maybe you might be able to take it
from there.

Actually, the only other way I could think of is to construct a regexp
that would take each special case into account, but that would be way
too complicated (for me at least!)

Hope this was (semi?) helpful
-- 
Ala Qumsieh             |  No .. not Just Another
ASIC Design Engineer    |  Perl Hacker!!!!!
Matrox Graphics Inc.    |
Montreal, Quebec        |  (Not yet!)


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

Date: Fri, 11 Sep 1998 16:59:22 GMT
From: burningboy@hotmail.com (James  Bond  098)
Subject: What is "Robot" in Perl?
Message-Id: <35f9569e.10935612@news.au.ac.th>

"Robot" ,I've encountered this word many times in Perl ,etc. "Robot
Rules ... some thing like that!, what does it means? -.-''


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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