[9495] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3088 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 8 00:07:31 1998

Date: Tue, 7 Jul 98 21:00:27 -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           Tue, 7 Jul 1998     Volume: 8 Number: 3088

Today's topics:
    Re: -- Picking up Extra .. Abigail, A Question for you. (Tad McClellan)
    Re: -w on production code (was Re: better way of gettin <ljz@asfast.com>
    Re: -w on production code (was Re: better way of gettin <steph@hotkey.net.au>
    Re: backticks <efinch@cais.com>
    Re: Batch printing of html files (Martien Verbruggen)
    Re: better way of getting the last modified file? (Mark-Jason Dominus)
    Re: DB_File in the real world. (Brandon S. Allbery KF8NH)
    Re: DB_File in the real world. (Mark-Jason Dominus)
    Re: DB_File in the real world. <tchrist@mox.perl.com>
    Re: Do we need lame msgs in discussions? Re : Martien V (Martien Verbruggen)
    Re: Do we need lame msgs in discussions? Re : Martien V (Ronald J Kimball)
    Re: Do we need lame msgs in discussions? Re : Martien V (brian d foy)
    Re: Extracting a string (easy question) (Mark-Jason Dominus)
    Re: Extracting portions of an HTML file using perl <phil.clark@takethisbitout.tpd.co.uk>
    Re: Extracting portions of an HTML file using perl (Jeremy D. Zawodny)
    Re: Extracting portions of an HTML file using perl (brian d foy)
    Re: Extracting portions of an HTML file using perl (brian d foy)
    Re: Extracting portions of an HTML file using perl (Jeremy D. Zawodny)
    Re: Extracting portions of an HTML file using perl (Martien Verbruggen)
    Re: help I'm a beginner (Martien Verbruggen)
        Installing Perl and mSQL on DG/ux, AViiON <scgyong@dev.bbcom.co.kr>
        Is posting via CGI script that dangerous? yup@my-dejanews.com
        local printer <s027119@income.com.sg>
    Re: local printer (Martien Verbruggen)
        LookupAccountSID or LookupAccountName PaulBoyer@my-dejanews.com
    Re: manipulate /etc/passwd without expect ?? (Abigail)
        Matrix array in Perl Win32 (Huang)
    Re: Mix Perl and HTML? (Martien Verbruggen)
    Re: Mix Perl and HTML? (brian d foy)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 7 Jul 1998 10:37:32 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: -- Picking up Extra .. Abigail, A Question for you.
Message-Id: <sbftn6.65.ln@localhost>

Webcruiser (dfsdf@ziplink.net) wrote:
: Abigail, what do you mean you wouldn't re-open the file?


I expect she means to open the file for read AND write, read the file,
seek() to the beginning of the file, and then write the file. All
with a single open() call.

If you don't understand what read/write mode and seek()ing is, then
leave it as you have it. It will still work.

: > Of course, I wouldn't reopen the file, and I'd use locking too.
                                                   ^^^^^^^^^^^^^^^

As you seem to be a web cruiser, I'm guessing that you are using Perl
in a CGI environment?

If so, then you can safely ignore the open/seek stuff, but that
locking stuff is Very Important.

You can lose data if two web clients end up accessing the same file
at the same time...


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


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

Date: 07 Jul 1998 22:37:33 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <ltr9zx83v6.fsf@asfast.com>

Russ Allbery <rra@stanford.edu> writes:

> Abigail <abigail@fnx.com> writes:
> 
> > Just for those once in more than a year events of upgrading Perl?  Don't
> > you want to know what might be broken now, or will be broken in the next
> > release? Ever considered *testing* your scripts before installing a new
> > version of Perl?
> 
> > If there's one reason to keep -w, it's for catching new problems when
> > Perl is upgraded.
> 
> We have hundreds of deployed scripts, sometimes in odd crannies of places.
> It sometimes simply isn't feasible to delay a sitewide Perl upgrade,
> particularly one that contains *security fixes* just to make sure that
> we've tested every single piece of code.  And warnings suddenly showing up
> *are* perceived as fatal errors by people who then procede to do dumb
> things on that basis.
>
> [ ... ]

There are good points being made here on both sides of the issue.  I have
my own point to add to the mix:

If using `-w' was clearly an advantage in all production code, then
why is this an *option* in the first place?  Wouldn't it be best, if
this were the case, that `-w' disappear as an option altogether, and
its behavior be the default?  There could then be a different option
to turn off these warnings in the odd, occasional, esoteric cases
where they might not be wanted.

There must be *some* well-thought-out reason(s) for `-w' still
remaining optional.  I haven't followed Perl-porters for a while.
Could anyone explain the the why's of the option-hood of `-w'?

> [ ... etc. ... ]

-- 
 Lloyd Zusman   ljz@asfast.com
 perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'


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

Date: Wed, 08 Jul 1998 13:18:45 +1000
From: Stephan Carydakis <steph@hotkey.net.au>
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <35A2E515.333@hotkey.net.au>

Jim Brewer wrote:
Tom Christiansen <tchrist@mox.perl.com> writes:

Nothing personal Tom but, hahahahahahahahahaha


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

Date: Tue, 07 Jul 1998 23:06:12 -0400
From: Ed Finch <efinch@cais.com>
Subject: Re: backticks
Message-Id: <35A2E224.C2FE850E@cais.com>

brian d foy wrote:

> In article <35A246D0.5AF1ECE9@med-ph.uni-sb.de>, Klaus Peper <peper@med-ph.uni-sb.de> posted:
>
> >The following code is doing wrong at our website:
> >
> >$files=`ls`;
> >print "$files\n";
> >
> >There is no print in this case, the webmaster told me that the
> >list goes to the monitor.
>
> does the output really go to the "monitor" (console?) or is he
> just trying to hide his inability to answer the question?
>
> the most glaring problem is that you did not specify which
> ls you wanted to run.

Nor is the intended filehandle specified. Was something like "select FOO; $| =1" executed?

--
Ed

     Microsoft Windows: the Budweiser of operating systems.




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

Date: 8 Jul 1998 03:05:24 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Batch printing of html files
Message-Id: <6nunlk$oii$4@comdyn.comdyn.com.au>

[comp.lang.perl.module doesn't exist, removed]

In article <35A2BB86.76B0823@istar.ca>,
	Steven Cruz <stevenc@istar.ca> writes:
> 
> --------------12972EE686BA93F28BB9C196
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit

Please, don't do this. Usenet is a plain text medium.

> Hello;
> 
>     Near impossible to do use CGI. Tried once, very hard. You the user
> also have to open the printer port to the public internet. Which opens
> up a big security problem.

Huh? 'open the printer port to the public internet'? What does that mean?

It's easy. lpr *.html will do it. Of course, it'll come out of the
default printer that's attached to the server, not the browsing
machine.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I took an IQ test and the results were
Commercial Dynamics Pty. Ltd.       | negative.
NSW, Australia                      | 


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

Date: 7 Jul 1998 22:11:33 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: better way of getting the last modified file?
Message-Id: <6nukgl$ig0$1@monet.op.net>

In article <MPG.10093ff12a871673989715@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>Careful -- only the default 'Larry' around these parts is unerring (as 
>well as all-seeing and omnipotent)!  Mere mortal 'Larry's require fuller 
>qualification (in two senses of that word).

I recently sent the Perl Conference folks the notes for my talk.  In
it, I had an example that discussed someone running a low-grade porno
site.  I needed to give this person a name.  I thought of naming him
after Bob Guccione, but I already had other examples in the paper
involving a different `Bob' (named after someone else.)  So I named
the zitty pornographer after Larry Flynt.

It was pretty late at night, and then a few days later I realized what
I'd done. 

Whoops.



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

Date: 7 Jul 1998 20:59:20 -0400
From: allbery@kf8nh.apk.net (Brandon S. Allbery KF8NH)
Subject: Re: DB_File in the real world.
Message-Id: <6nug98$19k$1@rushlight.kf8nh.apk.net>

Also sprach gebis@albrecht.ecn.purdue.edu (Michael J Gebis) (<6nuds9$7mh@mozo.cc.purdue.edu>):
+-----
| I've been taking a look at the DB_File module and the examples in the
| Camel, and I must say, it's really sweet.  In a toy example, I've set
| it up so I can do something like this:
+--->8

Well, no, it's not.  DB_File isn't a full-featured multicolumn database, as
you have just discovered.

What I am doing with it is to store the records in a DB_RECNO file (a flat
file, really) and using DB_File to create indexes:  the key is the column,
the datum is the record number in the actual data file.  When you manipulate
data, you lock the DB_RECNO file.  When you manipulate indexes, you lock the
index file.  If you're doing both (i.e. add), you lock all of them; this
suggests that you should also have a "super-lock" which locks the entire
system, rather than locking each index and the data file individually.
(But if you're doing only file-level locking, you can treat the data file
lock as the super-lock and save yourself some trouble.  If you aren't that
worried about concurrency issues, you can just use the data-file lock for
everything at the cost of possibly "unnecessary" locking.)

Actually, it's more complicated because I'm working with multiple "legacy"
flat files, so my index datum is the data file name and the record number.
This probably won't change soon, since there are programs that expect to
grep the flat files or load them into core for local processing, but the
ugly stuff is hidden in my module so I can change it without breaking the
programs using the module.

As a side benefit, I can declare both DB_BTREE indexes for indexed sequential
(iterated) access and DB_HASH indexes on the same columns for faster direct
access.  But for the databases in question, they aren't large enough to be
woeth this; and probably if they ever get that large, it'll be better to use
MySQL or etc. as the database.

BTW, I think db-2.0 deals with all of this a bit better.  But it's not as
portable --- I have to support systems on which mmap() isn't there or isn't
sufficiently functional for db-2.0, so I'm using db-1.85 still.

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
electrical and computer engineering
carnegie mellon university			   (bsa@kf8nh is still valid.)


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

Date: 7 Jul 1998 23:03:12 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: DB_File in the real world.
Message-Id: <6nunhg$j1f$1@monet.op.net>

In article <6nuds9$7mh@mozo.cc.purdue.edu>,
Michael J Gebis <gebis@albrecht.ecn.purdue.edu> wrote:
>So, my question is: how do people do this in the real world?  

I can't speak for others, but I follow two strategies.

1. For small (up to 100,000 records) databases that change rarely, I
   use a home-grown package that builds indices and supports very fast
   boolean queries.

2. For other applications, I use a commercial-quality relational
   database like Oracle or MySQL.  DBM files are too limited to be
   useful here without a huge amount of added machinery.

>My other alternative is to dump DB_File and go with some other
>solution.

That's what I'd do in your situation.

>I guess this would be a good opportunity to try out the object
>database in the panther book, but I'd like to hear peoples opinions
>on using DB_File first.  (I really like the simple hash interface, if
>you can't tell.)

You could tie a hash variable to a function that calls the DBI module
in the way you want.  Perl's nice that way.

>I realize that this is sort of a nebulous question: I'm asking for
>advice, not a technical clarification.  

I like `advice' questions better than the other kind anyway.


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

Date: 8 Jul 1998 03:39:18 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: DB_File in the real world.
Message-Id: <6nupl6$3eq$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    mjd@op.net (Mark-Jason Dominus) writes:
:In article <6nuds9$7mh@mozo.cc.purdue.edu>,
:1. For small (up to 100,000 records) databases that change rarely, I
:   use a home-grown package that builds indices and supports very fast
:   boolean queries.

I should probably show you mine for this once it's cleaned up
a tiny bit more.  It's remarkable how fast bit vectors can be
manipulated, eh?  I can't believe how quick it is.

Right now I need a name for it.

--tom
-- 
A power tool is not a toy.  Unix is a power tool.


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

Date: 8 Jul 1998 02:56:25 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Do we need lame msgs in discussions? Re : Martien Verbruggen
Message-Id: <6nun4p$oii$2@comdyn.comdyn.com.au>

In article <6nuf08$833@mozo.cc.purdue.edu>,
	gebis@albrecht.ecn.purdue.edu (Michael J Gebis) writes:
> mgjv@comdyn.com.au (Martien Verbruggen) writes:
> }without flames, there would be even more crap on this group.
> 
> You'll never convince me that this is true.
> 
> I'll never convince you that this is false.

Which was exactly the point I made in various parts of my post. This
discussion keeps coming up, and it never will get resolved, and never
can be resolved.

That is also why we don't need this discussion all over again.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | If at first you don't succeed, try
Commercial Dynamics Pty. Ltd.       | again. Then quit; there's no use being
NSW, Australia                      | a damn fool about it.


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

Date: Tue, 7 Jul 1998 23:27:12 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Do we need lame msgs in discussions? Re : Martien Verbruggen
Message-Id: <1dbtim9.1y7t9on7f41s7N@bay2-137.quincy.ziplink.net>

Azman Shariff <azman@bnex.com> wrote:

> I noticed three kinds of repliers here basically they all in the
> catogeries
> 1) Sincere answer to solve the problem
> 2) Just a flame telling ppl off
> 3) An answer to the question but added a flame

You forgot one...

4) Posts criticizing other peoples' posting styles.

Been there, done that.

By the way, your newsreader is not line-wrapping properly, so your
message is a bit awkward to read.  :-)

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Tue, 07 Jul 1998 23:59:50 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Do we need lame msgs in discussions? Re : Martien Verbruggen
Message-Id: <comdog-ya02408000R0707982359500001@news.panix.com>
Keywords: from just another new york perl hacker

In article <1dbtim9.1y7t9on7f41s7N@bay2-137.quincy.ziplink.net>, rjk@coos.dartmouth.edu (Ronald J Kimball) posted:

>Azman Shariff <azman@bnex.com> wrote:
>
>> I noticed three kinds of repliers here basically they all in the
>> catogeries
>> 1) Sincere answer to solve the problem
>> 2) Just a flame telling ppl off
>> 3) An answer to the question but added a flame
>
>You forgot one...
>
>4) Posts criticizing other peoples' posting styles.

[i think you should indent more, you nazi[1] ]

the more i think about this, the more i think 1) and 3) are
not mutually exclusive.  nor 1) and 2).  i think the values
for "sincere" and "problem" are nebulous at best.  but then,
what do you expect with a forum that crosses so many demographic
boundaries?

kill files are nice, but the best flamers usually have the best
nuggets of wisdom too ;)

[1] Scorekeeper: "and that's the end of the thread!  thanks for
coming folks!  see you in two weeks."

-- 
brian d foy                                  <comdog@computerdog.com>
if you don't like *this* thread, kill file it like i should have


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

Date: 7 Jul 1998 22:21:12 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Extracting a string (easy question)
Message-Id: <6nul2o$iki$1@monet.op.net>
Keywords: itinerary Oswald vagary worst


In article <35a2a3c6.8132579@news.btinternet.com>,
Jonathan Stowe <Gellyfish@btinternet.com> wrote:
>>awk '{print $1}'   <input >output
>
>Oh MJ how could you say that ;-}

It's even endorsed by Larry.

(``Awk has to be better at something.'')

>Various versions of awk are available for the Win/DOS platform - The
>one I have is old but

 ...but even an old port will run {print $1} OK.

>But of course you could take the above script snippet and put it
>throught the supplied a2p program.

#!/usr/local/bin/perl
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
    if $running_under_some_shell;
			# this emulates #! processing on NIH machines.
			# (remove #! line above if indigestible)

eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift;
			# process any FOO=bar switches

$, = ' ';		# set output field separator
$\ = "\n";		# set output record separator

while (<>) {
    ($Fld1) = split(' ', $_, 9999);
    print $Fld1;
}




Could be worse, I suppose.





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

Date: Tue, 7 Jul 1998 15:22:13 +0100
From: "Phil Clark" <phil.clark@takethisbitout.tpd.co.uk>
Subject: Re: Extracting portions of an HTML file using perl
Message-Id: <0uatn6.02a.ln@gate.tpd.co.uk>

I tried that and I got this far:

require HTML::Parser;
$p = HTML::Parser->new;
$p->parse_file("file.html")

But then what do I do?

Printing $p just shows "HTML::Parser=HASH(0x1014f56c)

whatever that is

tia
Phil
phil.clark@tpdDOTcoDOTuk



brian d foy wrote in message ...
>In article <a12tn6.av4.ln@gate.tpd.co.uk>, "Phil Clark"
<phil.clark@takethisbitout.tpd.co.uk> posted:
>
>>Can someone tell me how to extract a portion of an HTML file in perl? For
>>example the <HEAD> ........ </HEAD> section - I want to extract just the
>>text in the middle of the tags, and not the tags themselves, nor anything
>>outside the tags.
>
>use HTML::HeadParser;
>
>good luck :)
>
>--
>brian d foy                                  <comdog@computerdog.com>
>CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
>Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
>Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>




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

Date: 07 Jul 1998 22:00:29 -0400
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Extracting portions of an HTML file using perl
Message-Id: <m3u34tksoy.fsf@peach.z.org>

"Phil Clark" <phil.clark@takethisbitout.tpd.co.uk> writes:

> I tried that and I got this far:
> 
> require HTML::Parser;
> $p = HTML::Parser->new;
> $p->parse_file("file.html")
> 
> But then what do I do?
> 
> Printing $p just shows "HTML::Parser=HASH(0x1014f56c)
> 
> whatever that is

brian missed a step in his answer: Read the Documentation.

And you mis-interpreted his first instruction. He literally meant that
you should add "use HTML::HeadParser" in your code. :-)

> brian d foy wrote in message ...
> >In article <a12tn6.av4.ln@gate.tpd.co.uk>, "Phil Clark"
> <phil.clark@takethisbitout.tpd.co.uk> posted:
> >
> >>Can someone tell me how to extract a portion of an HTML file in perl? For
> >>example the <HEAD> ........ </HEAD> section - I want to extract just the
> >>text in the middle of the tags, and not the tags themselves, nor anything
> >>outside the tags.
> >
> >use HTML::HeadParser;
> >
> >good luck :)

Jeremy
-- 
Jeremy D. Zawodny                   Web Geek, Perl Hacker, etc.
http://www.wcnet.org/~jzawodn/      jzawodn@wcnet.org

LOAD "LINUX",8,1


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

Date: Tue, 07 Jul 1998 22:06:16 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Extracting portions of an HTML file using perl
Message-Id: <comdog-ya02408000R0707982206160001@news.panix.com>
Keywords: from just another new york perl hacker

In article <0uatn6.02a.ln@gate.tpd.co.uk>, "Phil Clark" <phil.clark@takethisbitout.tpd.co.uk> posted:

>I tried that and I got this far:
>
>require HTML::Parser;
>$p = HTML::Parser->new;
>$p->parse_file("file.html")
>
>But then what do I do?

search <URL:http://www.dejanews.com> for HTML::Parser.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>


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

Date: Tue, 07 Jul 1998 22:54:20 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Extracting portions of an HTML file using perl
Message-Id: <comdog-ya02408000R0707982254200001@news.panix.com>
Keywords: from just another new york perl hacker

In article <m3u34tksoy.fsf@peach.z.org>, jzawodn@wcnet.org (Jeremy D. Zawodny) posted:

>"Phil Clark" <phil.clark@takethisbitout.tpd.co.uk> writes:
>
>> I tried that and I got this far:
>> 
>> require HTML::Parser;
>> $p = HTML::Parser->new;
>> $p->parse_file("file.html")
>> 
>> But then what do I do?
>> 
>> Printing $p just shows "HTML::Parser=HASH(0x1014f56c)
>> 
>> whatever that is
>
>brian missed a step in his answer: Read the Documentation.

you have to set

   $brian::state_obvious = 1;

to get that level of answer.  it's undef by default. ;)

Digression:

it may not be obvious to new comers, but most of the guru types
(the Trinity et alia) know what they know because they read it
somewhere, made it up (i.e create perl), or tried it until they 
got it right.

so, choose a Role Model and start hacking like that person (that is,
read and create Cool Stuff)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
submit a bug report if you like.


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

Date: 07 Jul 1998 23:16:14 -0400
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Extracting portions of an HTML file using perl
Message-Id: <m3g1gdkp6p.fsf@peach.z.org>

comdog@computerdog.com (brian d foy) writes:

>    $brian::state_obvious = 1;
> 
> to get that level of answer.  it's undef by default. ;)

I can only hope that comp.lang.perl.moderated helps the situation.

<DIGRESSION>

Last summer, I lost track of the "newbie" questions I answered day in
and day out. Eventually I got sick of seeing my address in the weekly
list of top 10 posters to clpm and became disheartened in general.

Going to the Perl Conference 1.0 helped for a few weeks, but I lost
interest again. I spent my time reading the p5p list instead of the
newsgroups (and learned a hell of a lot that way).

Now, it's summer again, and I'm getting tired of it all. I see a
patter emerging -- though I won't be attending the Perl Conference 2.0
(grrr...).

</DIGRESSION>

Oh well.

Jeremy
-- 
Jeremy D. Zawodny                   Web Geek, Perl Hacker, etc.
http://www.wcnet.org/~jzawodn/      jzawodn@wcnet.org

LOAD "LINUX",8,1


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

Date: 8 Jul 1998 03:00:23 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Extracting portions of an HTML file using perl
Message-Id: <6nunc7$oii$3@comdyn.comdyn.com.au>

In article <0uatn6.02a.ln@gate.tpd.co.uk>,
	"Phil Clark" <phil.clark@takethisbitout.tpd.co.uk> writes:
> I tried that and I got this far:

Euhmm.. brian d foy suggested using HTML::HeadParser, not HTML::Parser.

> require HTML::Parser;
> $p = HTML::Parser->new;
> $p->parse_file("file.html")
> 
> But then what do I do?

You read the documentation by typing 

# perldoc HTML::Parser

and read what to do next.

> Printing $p just shows "HTML::Parser=HASH(0x1014f56c)
> 
> whatever that is

That is a string representation of a hash reference.

# perldoc perlref

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Can't say that it is, 'cause it ain't.
NSW, Australia                      | 


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

Date: 8 Jul 1998 02:54:32 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: help I'm a beginner
Message-Id: <6nun18$oii$1@comdyn.comdyn.com.au>

In article <comdog-ya02408000R0707982037000001@news.panix.com>,
	comdog@computerdog.com (brian d foy) writes:
> In article <6nuc2j$nlt$1@comdyn.comdyn.com.au>, mgjv@comdyn.com.au (Martien Verbruggen) posted:
> 
> 
>>The fact that perl warns you that '456aa' is not a number is a good
>>thing, because it simply isn't a number.
> 
> well, not a decimal number anyway.  maybe it's just the particular
> example, but hex() sprang to mind when i saw '456aa' next to 'number'.

heh. ok, ok. Maybe I should have used something else, but then, It's
always possible to come up with a base that includes any characters
that I can come up with :)

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Can't say that it is, 'cause it ain't.
NSW, Australia                      | 


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

Date: Wed, 08 Jul 1998 10:57:38 +0900
From: "Kim, Ki-Yong" <scgyong@dev.bbcom.co.kr>
Subject: Installing Perl and mSQL on DG/ux, AViiON
Message-Id: <35A2D212.869EF10C@dev.bbcom.co.kr>

I made a cgi program and have to install it to client's site.The target
machine is AViiON, and OS is DG/ux.

I not only failed to install perl 5.004_04, but also failed to setup
mSQL.

when i typed 'make' after 'Condigure -d; make depend', it said it cannot
find the shared object libperl.so.

so i turned the so option off, and this time the make stops with the
message:
UX:ld: somemessage: ../../lib/auto/Fcntl/Fcntl.none: fatal error: Symbol
referencing errors. No output written to ../../lib/auto/Fcntl/Fcntl.none

and I tried to build mSQL. after typing 'make target' and changed
directory to the target, I typed 'make all'.
and the message was:
UX:ld: somemessage: msqladmin: fatal error: Symbol referencing errors.
No output written to msqladmin

above the ld error message, there is Undefined symbol list.
Undefined symbol           first referenced in file
recv                                libmsql.a(net.o)
socket                            libmsql.a(libmsql.o)
send                               libmsql.a(net.o)
connect                          libmsql.a(libmsql.o)
setsockopt                     libmsql.a(libmsql.o)
shutdown                       libmsql.a(libmsql.o)
inet_addr                       libmsql.a(libmsql.o)

There was also an Undefined symbol table above ld error of  building
perl
Undefined symbol    first referenced
Perl_sv_yes             Fcntl.o
Perl_sv_newmortal   Fcntl.o
 ...

What can i do? Should I install gcc? or..
Should I re-install system library such as libc? (I hope this is not the
case)

gcc version is 2.6.3 (ix86 DG/ux, DG-2.6.3.23, Oct 15 1996)
(I think this version is so old)

- scgyong@nownuri.net -

ps. I'm poor at English



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

Date: Wed, 08 Jul 1998 03:41:15 GMT
From: yup@my-dejanews.com
Subject: Is posting via CGI script that dangerous?
Message-Id: <6nupor$dcj$1@nnrp1.dejanews.com>

Hello everyone!

I've seen loads of messages talking about how people can EASILY intercept
information that is not passed through a secure server (SSL), I've also noted
some IP sniffers.  IS it really that EASY to take information sent via web
forms/shopping carts that are not SSL?

After all, who wants to get sued for intercepted credit card numbers! :)

John Leo

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


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

Date: 8 Jul 1998 01:44:24 GMT
From: "S. Sarkar" <s027119@income.com.sg>
Subject: local printer
Message-Id: <01bdaa11$acac9780$2d1809a8@sarkar.income.com.sg>

Hi,

Can anyone advise me as to how to go about printing a document on the
client printer using a CGI script housed on a server. I do not want to use
the server's or the client browser's printing capabilities.

Platform : Win NT
Webserver : IIS 3.0
Language : HTML 3.2 and Perl 5.001
Client : Win 95 
Browser : IE 4.x

all help will be appreciated.

thanx
newbie's newbie.



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

Date: 8 Jul 1998 03:11:56 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: local printer
Message-Id: <6nuo1s$oii$5@comdyn.comdyn.com.au>

In article <01bdaa11$acac9780$2d1809a8@sarkar.income.com.sg>,
	"S. Sarkar" <s027119@income.com.sg> writes:
> Hi,
> 
> Can anyone advise me as to how to go about printing a document on the
> client printer using a CGI script housed on a server. I do not want to use
> the server's or the client browser's printing capabilities.

Then you can't. Somehow, somewhere, some machine will have to send
stuff to a printer. That is 'using printer capabilities';

Anyway. To print it on the server side:

use lpr.

# man lpr


To print it on the browser side:

press that little button thingie, or use that menu stuff. There's no
way to do this from CGI, and that's good. Very good. I wouldn't like
it very much if some doofus could just flood my printer with hundreds
of pages of advertisements.

Maybe you can do something with Java or JavaScript. Go ask on one of
the groups that deal with that to find out.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | What's another word for Thesaurus?
NSW, Australia                      | 


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

Date: Wed, 08 Jul 1998 01:02:14 GMT
From: PaulBoyer@my-dejanews.com
Subject: LookupAccountSID or LookupAccountName
Message-Id: <6nugem$uqc$1@nnrp1.dejanews.com>

Would someone please post example code of how to use LookupAccountSID or
LookupAccountName from the Win32 extensions for Perl? I am trying to write a
simple Perl script to take a SID and find the corresponding username.

Thank you

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


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

Date: 8 Jul 1998 02:13:58 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: manipulate /etc/passwd without expect ??
Message-Id: <6nukl6$gng$1@client3.news.psi.net>

Chetan Ahuja (ahuja@argus.cem.msu.edu) wrote on MDCCLXXI September
MCMXCIII in <URL: news:6nuafg$8bd$1@msunews.cl.msu.edu>:
++ 
++   The subject line says it all... (but I'll say it again anyway)
++ Has anybody figured out a way to allow users to change their 
++ unix passwords through a perl script ( i.e. running as a cgi script).
++ The idea of course is that mail users shouldn't need to learn how 
++ to use telnet (why not..?? but its not for me to ask) but  be able to 
++ change their passwords through a web interface (what a cliche this phrase
++ is turning out to be "through a web interface"). I am feeling too lazy to
++ get Tcl/expect to work and then write a perl script to use expect and 
++ so on...

Why is it that anyone and his uncle wants their users to be able to
change their passwords via a web interface, yet noone knows how to do it?

If you can't figure out how to do it - don't. It's too dangerous.



Abigail
-- 
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT


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

Date: Wed, 08 Jul 1998 01:26:27 GMT
From: wong2020@tm.net.my (Huang)
Subject: Matrix array in Perl Win32
Message-Id: <35a2ca67.1795731@news.tm.net.my>

Hi all:

  I wish to work with a lot of matrix. I wonder what is the best tools
in Perl32. It seems that Math::MatrixReal doesn't work under Win32.
Any help will be appreciated. 

Thanks.
Huang


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

Date: 8 Jul 1998 02:45:28 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Mix Perl and HTML?
Message-Id: <6numg8$ofv$2@comdyn.comdyn.com.au>

In article <6kzo1.1100$I3.3312956@newse2.tampabay.rr.com>,
	"Mickey Coulter" <mcoulter@tampabay.rr.com> writes:
> Is there a product,  besides Verigen ($$$) that allows mixed Perl & HTML on
> UNIX?  I am aware of IISPerl for Win32 and like it a LOT. Would like
> something similarly priced for UNIX ;-)

You cannot 'mix' a programming language with a markup language. It
just doesn't make sense.

If you are really asking what you should be using to create programs
for the web, then the answer is most likely CGI. And yes, perl can
handle CGI. And yes, many, many, almost all we servers support
CGI. Many of them are free. It's not a perl issue.

To learn more about CGI, try http://www.cgi-resources.com. To ask
questions about CGI, go to one of the newsgroups about CGI. To ask
questions about perl, ask here.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | In a world without fences, who needs
Commercial Dynamics Pty. Ltd.       | Gates?
NSW, Australia                      | 


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

Date: Tue, 07 Jul 1998 23:51:57 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Mix Perl and HTML?
Message-Id: <comdog-ya02408000R0707982351570001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6numg8$ofv$2@comdyn.comdyn.com.au>, mgjv@comdyn.com.au (Martien Verbruggen) posted:

>In article <6kzo1.1100$I3.3312956@newse2.tampabay.rr.com>,
>        "Mickey Coulter" <mcoulter@tampabay.rr.com> writes:
>> Is there a product,  besides Verigen ($$$) that allows mixed Perl & HTML on
>> UNIX?  I am aware of IISPerl for Win32 and like it a LOT. Would like
>> something similarly priced for UNIX ;-)
>
>You cannot 'mix' a programming language with a markup language. It
>just doesn't make sense.

sometimes i think my CGI scripts are just fancy HTML pages with 
embedded Perl snippets.  not realy the same thing, but it's free :)

   #!/usr/bin/perl
   
   print <<"HTML";
   Content-type: text/html

   <html>
   yadda yadda yadda
   
   <body>
   
   yadda yadda yadda
   <ul>
   HTML
   
   #probably some DBI or LWP thingy goes here
   foreach my $thingy ( sort @thingys )
      {
      print "<li>$thingy\n"
      }
   
   print <<"HTML";
   </ul>
   yadda yadda yadda
   
   </body>
   </html>
   HTML

with mod_perl it's as fast as a page and with mod_rewrite you
can't tell that it isn't!

actually, i seem to remember this thing called EvoScript
that was presented at the last Perl Conference.  it does
this sort of thing, even on NT! parts were just uploaded to
CPAN by Jeremy Bishop.  one would have to look
<URL:http://www.evolution.com> for more details.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
of course, Evo is just 500 feet away.


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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 3088
**************************************

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