[9506] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3100 Volume: 8

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

Date: Wed, 8 Jul 98 17:00:20 -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           Wed, 8 Jul 1998     Volume: 8 Number: 3100

Today's topics:
    Re: -- Abigail, Here's an update for you. <dfsdf@ziplink.net>
    Re: Bar and Line Charts in Perl <jwb79@mail.idt.net>
    Re: Choosing DBMS: friendly to Linux, Apache, Perl, Jav (Paul D. Smith)
    Re: Do I understand this? (Bob Trieger)
    Re: explaining the whys of referencing... WAS Re: on th <tchrist@mox.perl.com>
    Re: good research methods WAS Re: on the fly subs with  (Tad McClellan)
        How to use 'system ("...")' on WIN32. <mpham@cts.com>
    Re: Indexing servers <jwb79@mail.idt.net>
    Re: Indexing servers (Martien Verbruggen)
    Re: NEVER "call warn() and return undef" (Re: question  (Mike Stok)
    Re: new charter and moderator for comp.lang.perl.announ <dgris@rand.dimensional.com>
    Re: new charter and moderator for comp.lang.perl.announ (Martien Verbruggen)
    Re: new charter and moderator for comp.lang.perl.announ <dgris@rand.dimensional.com>
    Re: Oh man, DO I love Perl ! (References to things that <tchrist@mox.perl.com>
        Perl and ASP-Pages, determinating link-hierarchy? <schulzev@hotmail.com>
    Re: Perl CGI and warnings [Was: Re: -w on production co (Larry Rosler)
    Re: Perl CGI and warnings [Was: Re: -w on production co (Mark W. Schumann)
    Re: perl-installation eats more than 3 GByte of harddis (Martien Verbruggen)
    Re: Problem in Variable String to Open() (Martien Verbruggen)
    Re: regexp s/// for removing tail end of string (nobody)
    Re: Strange file behavior... (Martien Verbruggen)
    Re: tough regexp - help needed (Tad McClellan)
    Re: tough regexp - help needed otis@my-dejanews.com
    Re: tough regexp - help needed (Craig Berry)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 07 Jul 1998 19:34:23 -0400
From: Webcruiser <dfsdf@ziplink.net>
Subject: Re: -- Abigail, Here's an update for you.
Message-Id: <35A2B07F.415B@ziplink.net>

Abigail, I did some more testing, calling the &getstatus and
&updatestatus subroutines directly, bypassing the html form. I looed at
the disk file and sure enough, the file was mot modified with spaces! It
turns out that the spaces come in when I load the @STATUS as the default
value in the form. The leading space shows up in the form, and becomes
written to the output file. I still can't force it to go away. Here is
the code that reads the environment variables and makes the variables:

sub form_parse  {
	# Get the input 
	read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

	# Split the name-value pairs
	@pairs = split(/&/, $buffer);

	foreach $pair (@pairs)
	{
    	($name, $value) = split(/=/, $pair);

    	# Un-Webify plus signs and %-encoding
    	$value =~ tr/+/ /;
    	$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
	$value =~ s/^ +//; # try this to get rid of space

    	# Stop people from using subshells to execute commands
    	# Not a big deal when using sendmail, but very important
    	# when using UCB mail (aka mailx).
    	# $value =~ s/~!/ ~!/g;

    	# Uncomment for debugging purposes
    	# print "Setting $name to $value<P>";

    	$FORM{$name} = $value;
	# print $name,", ",$FORM{$name},"<p>"; 
	}     # End of foreach
	}	#  End of sub

sub make_variables {
	$request = $FORM{'request'}; 
	$AID = $FORM{'AID'}; 
	@STATUS = $FORM{'STATUS'};
	$REPLY = $FORM {'REPLY'};
	$password = $FORM{'password'}; 
	$adminbutton = $FORM{'adminbutton'};
	}

Somewhere in here the leading space is added to each line after the
first line. Can you figure this out?


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

Date: 8 Jul 1998 23:14:15 GMT
From: "Jim Babbington" <jwb79@mail.idt.net>
Subject: Re: Bar and Line Charts in Perl
Message-Id: <01bdaac6$2800a7a0$bfa084a9@xxxchjb>


> 
> You could automate the Excel process by Recording an Excel macro that
builds
> the chart that you want, and then change the name of the macro to
'AutoOpen'
> so it will execute the macro whenever the spreadsheet opens.  Then you
want
> to run the "Save as HTML" option through code.	See Microsoft technote
> Q168561 for sample code to output everything including the graph to an
HTML
> file.
> 
> You'll need Excel 97 SR-1 to do this.
> 
> You could then kick-off Excel from perl with command-line arguments.

Do you know if I could run excell as a batch process(on NT Server), 
and then, in real-time, display the resulting graph to a user(http)?

Let me give you some background....
I have an application that, based on query results stipulated by the WWW
user, should produce a graph (hbar). I was able to do this in 5 minutes of
code under Apache/Solaris using gnuplot, however, my knuckle headed
management made me convert to NT running NS Enterprise Server. I never
could get gnuplot to work correctly under NT (I blame the NT by default,
cuz
it worked under unix). Eventually, as more users complained about not
having
this chart, I was forced to duplicate the hbar chart with a java applet.
Now I 
have maintanence problem: I don't like java, and if I could maintain this
with
excell, I can delegate this to an intern (I call this "automating").

If I could do this with excess, I would run out and give MS my money
for a copy of excell!!

Any help is appreciated,

Thanx

Jim


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

Date: 08 Jul 1998 18:17:58 -0400
From: psmith@baynetworks.com (Paul D. Smith)
To: gordo@pclink.com
Subject: Re: Choosing DBMS: friendly to Linux, Apache, Perl, Java
Message-Id: <p5yau4ng15.fsf@baynetworks.com>

My personal recommendation:  MySQL.

  http://www.tcx.se/

Free (!) as long as you don't sell the database as part of your
product--although it's nice if you register for email support (as little
as $200 a year).

The user community is very active and even though in theory you have to
pay for email support, in practice Monty is answering messages on the
mailing list (it seems like) 24 hrs. a day.

Wicked fast, as they say up here.  The above web site has some
benchmarks.

And of course, it has a nice Perl DBD interface :)

Downsides: it's threaded so needs a modern OS; however, Solaris and
Linux are the two main development platforms so Linux is
well-supported.  Also, it doesn't have any concept of transactions (in
newer versions you can lock a DB, but there's no automatic rollback) or
other fancier SQL stuff.

The other two options I'm aware of are Postgres and mSQL.  The former is
GPL'd, I think, and the latter is commercial, but cheap.  I was using it
for a while but the maintainers are _MUCH_ harder to get ahold of, and
serious, core-dumping bugs have been known to linger for months before a
new release is made :-/.  I prefer the speedy release cycle of
MySQL... although I never bother to upgrade unless I need to.

mSQL also doesn't have the more powerful features of SQL (even less than
MySQL) although both do all the fundamentals.  Postgres, I think, has a
lot more in it but is slower.

My $0.02...

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@baynetworks.com>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
     These are my opinions--Bay Networks takes no responsibility for them.


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

Date: Wed, 08 Jul 1998 22:16:04 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Do I understand this?
Message-Id: <6o0r7a$9pc$1@ligarius.ultra.net>

Scratchie <upsetter@ziplink.net> wrote:
-> Tom Christiansen <tchrist@mox.perl.com> wrote:
-> : In comp.lang.perl.misc, 
-> :     geiger@cs.ucdavis.edu (Phillip George Geiger) writes:
-> : :I want to put some advertising banners on my web site.  
-> 
-> : Gosh, that'll sure win you a lot of friends.
-> 
-> What planet do you live on?

Earth, apparently. On Earth banners are nothing but annoying.

Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-400-1972 
  Ext: 1949 and let the jerk that answers know 
  that his toll free number was sent as spam. "


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

Date: 8 Jul 1998 22:29:39 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: explaining the whys of referencing... WAS Re: on the fly subs with special tag markers
Message-Id: <6o0rsj$5pt$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    Daniel Grisinger <dgris@rand.dimensional.com> writes:
:Just curious, but where would you put your hypothetical division
:between intermediate and advanced perl?  

Good question.  Very good question.

--tom
-- 
You are the sponsor for the account andrew (Andrew Hume).


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

Date: Wed, 8 Jul 1998 17:34:43 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: good research methods WAS Re: on the fly subs with special tag markers
Message-Id: <36s0o6.pi7.ln@localhost>

Dan Baker (dtbaker_@flash.net) wrote:
: brian d foy wrote:

: > actually, i'll breifly outline what i do when learning some new perl
: > thingy.  i usually don't go past 4a).  it might seem cumbersome
: > at first, but the more you practice, the better you get :)
: -------------

: thanx for outlining your methods.... it actually does help a lot! I am
: still having trouble finding things in perldoc, and many topics aren't
: covered too well in any one book. The other problem I keep running into
: is that most of the books are slightly outdated by the time they are
: printed and new features are available that are not in the books, or are
: slightly different from one book to the next so I can't tell which is
: *best*.


The *best* is not a "book" at all.

It is the documentation that is provided with the perl distribution.

I *always* check there before resorting to (potentially outdated)
bound books. Doing a word search on electronically stored text
is much faster, and more accurate, than skimming through an Index
or Table of Contents...


perl's documentation is updated each time perl itself is updated.

It simply must be more up-to-date that any book can hope to be...


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


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

Date: Wed, 08 Jul 1998 16:41:46 -0700
From: Michael Pham <mpham@cts.com>
Subject: How to use 'system ("...")' on WIN32.
Message-Id: <35A403BA.867390C@cts.com>

I have a script that calls another script using 'system()' function.
It works fine on Unix.  I tried to port it to WIN32 and find that it
does not work as expected.  Any WIN32 gurus?

Thanks in advance


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

Date: 8 Jul 1998 22:54:44 GMT
From: "Jim Babbington" <jwb79@mail.idt.net>
Subject: Re: Indexing servers
Message-Id: <01bdaac3$6d54f1b0$bfa084a9@xxxchjb>


> 
> I'm an NT user and know bugger all about UNIX - are u using grep as a
unix
> command?  if so what does it do.  Also, how does isindex work?

Yeah, grep has it's roots in unix, but it is available for NT/win32s at 
www.cygnus.com. grep stands for GlobalRegularExpresionPrint
You could of course employ the regex power of perl to accomplish 
the same thing, but I've found that using utilities like grep for globbing
takes advantage of the OS's capabilites for accessing filename and 
physical file location, providing better performance, and error handling.

To do this in perl(without grep), you would want open a dir and get a file
list to work with:

$search="flamers";
opendir(DOCDIR,"html/") || die "error opening dir";
while(readdir(DOCDIR)) {
	if(/\.html$/i) { push(@docfiles,$_) }
	}
while($search_doc = pop(@docfiles) {
	$next_doc = 0; 	# we have to be carfull when doing opens within a while
nest
	open(TEMP,"<$search_doc") || die "somtheing went terribly wrong!!";
	while(<TEMP>) {
		if($next_doc) { next } # need we look further?
		if(/$$search/i) {
			print "<a href=\"$search_doc\">$_</a><hr>";
			$next_doc = 1; # we're done here
			next;
		}
	close(TEMP); # don't leave this out!!
	}
}

This is lightweight and should work on any platform (it's wise to cross
your
fingers when using NT). (note to Brian: No, I've never done this before,
either.)

I hope this helps, and despite all of the background noise, it has been
very
delightfull coresponding with you.

Jim


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

Date: 8 Jul 1998 23:07:27 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Indexing servers
Message-Id: <6o0u3f$h3$3@comdyn.comdyn.com.au>

In article <6nvcrn$hds$1@taliesin.netcom.net.uk>,
	"Clinton Gormley" <clint@netcomuk.co.ukXX> writes:
> I want to build a web site that works a bit like the Microsoft Knowledge
> Base - so a searchable index of articles - probably a key word search rather
> than full text indexing.

This is not a trivial task by any means, and maybe instead of trying
to implement this yourself you should first have a look at freely
available search engines. Check Yahoo and pick one or two that seem to
do more or less what you want. Then adapt them to your needs, or use
the algorithms they use for your own use. Maybe you should also check
out www.cgi-resources.com. Don't download anything that just trolls
through a bunch of files every time a search is done. You're on the
right track with an index of articles.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd.       | enough features yet.
NSW, Australia                      | 


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

Date: 8 Jul 1998 22:27:00 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: NEVER "call warn() and return undef" (Re: question about objects)
Message-Id: <6o0rnk$3j0@news-central.tiac.net>

In article <35A3DA5C.3C8F@min.net>, John Porter  <jdporter@min.net> wrote:

>You are saying that Perl doesn't need a robust exception mechanism.
>Is that what you mean?

Yes.  Perl doesn't need anything.  Perl users want things added.

>If it had one, you wouldn't have to use it.
>But if it didn't have one, you *couldn't* use it.
>Which situation fits your philosophy better?

Don't know.  

The bottom line was that I was facetiously grumbling about the presumption
that you knew I'd agree ;-)

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: Wed, 08 Jul 1998 23:11:35 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: new charter and moderator for comp.lang.perl.announce
Message-Id: <6o0tik$a9n$1@rand.dimensional.com>

[posted to comp.lang.perl.misc and mailed to the cited author]

In article <5qogv02vku.fsf@prometheus.frii.com>
Nathan Torkington <gnat@frii.com> wrote:
<snip Randal's message>
>As I said to you on #perl, I feel that commercial postings should be
>allowed.  I think comp.lang.perl.announce should be for announcements
>relating to Perl--including conferences, new books, new issues of The
>Perl Journal, new modules, and commercial products that use Perl.
                                                         ^^^^^^^^
I don't think merely using perl should qualify a product for announcement
on clpa.  I don't think that Oracle should be announcing new products
on clpa just because they bundled oraperl with their product.

>Books, conferences, and commercial products that use Perl all serve to
>make Perl more accessible and more widely used, which in turn can lead
>to more jobs for Perl programmers, better salaries for Perl
>programmers, and more (and sometimes better) tools for Perl
>programmers.  I think those are good and desirable ends.

I agree that these are good and desirable ends, but clpa does not
exist to create more jobs with better salaries.  It exists to
provide announcements that are relevant to the task of perl
programming.  

The set of things relevant to programming perl does not include 
some random application just because it is written in perl.  That 
would be like posting an announcement to a forum on C for every 
new program that was written in C.  Maybe it's just me, but that
seems kind of silly :-).

Programs that are directly applicable to programming perl, on the
other hand, are always on topic whether they are written in perl
or not.

>My suggestion for a charter was:
>
>| comp.lang.perl.announce is for announcements of:
>|  - software that is, is written in, embeds, or otherwise uses Perl.

I agree, subject to my reservations above.

>|  - events that contain Perl tracks or tutorials, or otherwise
>|    significantly feature Perl.
>|  - books, magazines, and journals that have a chapter or article on
>|    Perl.

Yes, because all of these things are related to programming.

<snip rest of proposed charter>

>I volunteer to moderate, because I feel that the advocate of the
>charter should be the moderator.  It seems unreasonable to ask someone
>to endure flamage and potential lawsuits enforcing a charter that
>someone else came up with.  I have enough confidence in my abilities
>to be impartial that I think I can manage this.

I have no objections to you serving as moderator (but, then again,
the only person I'd object to having as moderator is myself :-).

Regards,
Daniel
-- 
Daniel Grisinger           dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                           Dave Clark


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

Date: 8 Jul 1998 22:48:55 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: new charter and moderator for comp.lang.perl.announce
Message-Id: <6o0t0n$h3$2@comdyn.comdyn.com.au>

In article <5qk95o2emo.fsf@prometheus.frii.com>,
	Nathan Torkington <gnat@frii.com> writes:
> cpierce1@cp500.fsic.ford.com (Clinton Pierce) writes:
>> >Perl Journal, new modules, and commercial products that use Perl.
>> >                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> 
>> I'd like clarification on this part.
> 
> Glad to oblige.
> 
>> Our product contains 1% Perl code...may we advertize a new release on 
>> clpa?
> 
> Yes.  If your product interfaces with Perl then you should be able to
> post announcements of a new release to comp.lang.perl.announce.  It's
> not like there are thousands of programs that feature Perl.  I hardly

Please. Not that. We'll be inundated with announcements of every CGI
program that is written in Perl. If you must allow commercial posting,
please restrict them to products that have a direct relevance to Perl,
the programming language, or perl, the program, or the perl community.
Allowing a post simply because it uses a bit of perl is slightly silly
in my opinion. Imagine comp.lang.c.moderated getting advertisements
for every program that uses C or interfaces with C in some way.

If people still feel they need to post an announcement of these sorts
of things, they can always do it on clp.misc.

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


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

Date: Wed, 08 Jul 1998 23:50:54 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: new charter and moderator for comp.lang.perl.announce
Message-Id: <6o1009$acq$1@rand.dimensional.com>

[posted to comp.lang.perl.misc and mailed to the cited author]

In article <5qk95o2emo.fsf@prometheus.frii.com>
Nathan Torkington <gnat@frii.com> wrote:
>cpierce1@cp500.fsic.ford.com (Clinton Pierce) writes:

>> Our product contains 1% Perl code...may we advertize a new release on 
>> clpa?
>
>Yes.  If your product interfaces with Perl then you should be able to
>post announcements of a new release to comp.lang.perl.announce.  It's

Perhaps if you're product includes a perl API you can announce the
availability and revisions of the API.  This may mean little functional
difference in the actual approved announcements, but it will also
mean that in the future there will be no obligation to announce a new
product just because it ships with an obsolete, possibly proprietary,
perl interface.

>not like there are thousands of programs that feature Perl.  I hardly
>imagine Microsoft rushing to add a "Save as Perl" option to all their
>products simply so they can plug them in comp.lang.perl.announce.

Actually, Microsoft already ships perl in at least two products (the
NT Resource Kit and their developer network library), neither of which
do I feel warrant announcements on clpa.

I also don't think that clpa should be used to announce a new RedHat
distribution, but under your charter it probably must because they do
ship perl with RedHat.

>comp.lang.perl.announce should be like a births, deaths, and marriages
>for Perl.

No.  comp.lang.perl.announce should be a bibliography (or whatever
the proper electronic term would be) of resources to aid people
programming perl.

Regards,
Daniel


-- 
Daniel Grisinger           dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                           Dave Clark


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

Date: 8 Jul 1998 22:31:09 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Oh man, DO I love Perl ! (References to things that go out of scope)
Message-Id: <6o0rvd$5pt$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, abigail@fnx.com writes:
:I deeply hate non-private variables. It's a pain in the ass, and
:often stands in the way of replacing a module by something more
:flexible and/or more efficient.

Well said.  

--tom, cribbing notes for the object debate
-- 
    "We have ways to make you scream." 
	--Intel advertisement, in the June 1989 Doctor Dobbs Journal


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

Date: Thu, 09 Jul 1998 00:03:28 +0000
From: Thomas Schulze-Velmede <schulzev@hotmail.com>
Subject: Perl and ASP-Pages, determinating link-hierarchy?
Message-Id: <35A408D0.A05E5724@hotmail.com>

Hello *,

I'm in charge of maintaining a website with about 200 ASP-Pages
(buildin scripting of M$-IIS, HTML-VBScript-mix).

Now I should document the link-hierarchie between the various
*.asp - Files.
Because of the VBScript-Code scattered in the files, that task is
not that easy...
Does anybody know a solution?
(E.g. Is there a Perl-Module out there to do the job?)

Thank you in advance!

Best regards

Thomas SV


PS: If there is no tool out there I'll write one using pstree, but
    it would be fine not inventing the wheel a second time.


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

Date: Wed, 8 Jul 1998 15:08:17 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl CGI and warnings [Was: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <MPG.100d8da9eb4654a69896f9@nntp.hpl.hp.com>

[This followup was posted to comp.lang.perl.misc and a copy was sent to 
the cited author.]

In article <6o0o5i$13f$1@client3.news.psi.net> on 8 Jul 1998 21:26:10 
GMT, Abigail <abigail@fnx.com> says...
> Larry Rosler (lr@hpl.hp.com) wrote on MDCCLXXII September MCMXCIII in
> <URL: news:MPG.100d6f8616d561a39896f7@nntp.hpl.hp.com>:
> ++ The function I presented does not capture 
> ++ the output from 'use diagnostics;' in my test.  I don't know where it 
> ++ goes, as it doesn't get to STDOUT or STDERR.
> 
> Odd.
 ...
> Looks like it goes to my STDERR....

That is because you don't provide a $SIG{__WARN__} handler.

The following comes from the INTERNALS section of the documentation in 
diagnostics.pm:

"If an extant $SIG{__WARN__} handler is discovered, it will continue
to be honored, but only after the diagnostics::splainthis() function 
(the module's $SIG{__WARN__} interceptor) has had its way with your
warnings."

The original warning makes it through to my $SIG{__WARN__}, but the 
diagnostics.pm explanation goes bye-bye.  As I don't think this module 
should be used in production code in any case, I don't think it's 
worthwhile for me to pursue this further.

Maybe Tom C will clarify the situation.
 
-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 8 Jul 1998 19:12:42 -0400
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: Perl CGI and warnings [Was: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <6o0uda$ia8@junior.apk.net>

In article <6o0oal$13f$2@client3.news.psi.net>,
Abigail <abigail@fnx.com> wrote:
>lvirden@cas.org (lvirden@cas.org) wrote on MDCCLXXII September MCMXCIII
>in <URL: news:6o0ed7$gtl$1@srv38s4u.cas.org>:
>++ 
>++ 2. CGI is frequently installed in odd out of the way places and cannot
>++ necessarily all be tested before installing an urgent upgrade to perl with
>++ regards to security.
>
>It sounds very odd to me that upgrading perl with regards to security is
>considered "urgent", yet the CGI programs are installed in odd out of the
>way places and cannot necessarily all be tested before installing.
>
>Something is wrong with that picture.

I'm still trying to figure out where the CGI programs would be, other
than in /yaddayaddayadda/cgi-bin/.  Is that an odd out of the way
place?

I thought most httpds would run CGI code only if it were located in
one in a list of specific directories given in a system-wide config
file.  It can't be that hard to check those directories for active
scripts.



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

Date: 8 Jul 1998 23:16:39 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: perl-installation eats more than 3 GByte of harddisk
Message-Id: <6o0ukn$h3$4@comdyn.comdyn.com.au>

In article <35A3693F.3409@bauwesen.tu-cottbus.de>,
	Thomas Kobbe <knocker@bauwesen.tu-cottbus.de> writes:
> Hello,
> 
> when I do "sh Configure" and a "make depend" (perl5.004_04 on HP-UX 9),
> perl installation generates the file ".shlist" which blows up to over 3
> GByte of diskspace, an I must cancel the installation.

Odd... .shlist is created by things like:

echo Makefile.SH cflags.SH config_h.SH makeaperl.SH makedepend.SH makedir.SH perl_exp.SH writemain.SH | tr ' ' '\012' >.shlist

I can't see too many problems there.. Maybe you could show us the
output of make depend, up to the point where you have to break it off.

> Can anybody help me please ???

I think you'll have to give us more information, unless someone else
with a HP-UX already knows what you're talking about.

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


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

Date: 8 Jul 1998 22:34:18 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Problem in Variable String to Open()
Message-Id: <6o0s5a$h3$1@comdyn.comdyn.com.au>

In article <35A39456.A02468E3@towery.com>,
	Ernest Mueller <ernestm@towery.com> writes:

> I know enough to know "you're supposed to use strict and -w", but

Good :)

> unfortunately the FAQs are less helpful on helping you make your program
> work after you've done it.  Took me a while to figure out how to make it
> work under taint checking (and apparently I don't have it figured out
> yet).  Any helpful hints/places to look for more on that?

You mention you checked the FAQs, but did you also check the perlsec
documentation? That is basically the place to look for setuid and
taint chekcing stuff. It has some examples and explanations.

There is also a FMTEYEWTK article by Tom Christiansen, titled 'safe
shell escapes' which details a few things.
http://www.perl.com/CPAN/doc/FMTEYEWTK/index.html 

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Think of the average person. Half of
Commercial Dynamics Pty. Ltd.       | the people out there are dumber.
NSW, Australia                      | 


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

Date: 8 Jul 1998 23:28:19 GMT
From: ac1@fspc.netsys.itg.telecom.com.au (nobody)
Subject: Re: regexp s/// for removing tail end of string
Message-Id: <6o0vaj$18s@newsserver.trl.OZ.AU>

Jerry (jerry@fitzweb.com) wrote:
: Hi there, hope someone can give me a quick hack to do this.

: I have a string that is a full path to a file, i.e.
: dir/subdir/subsubdir/file.ext  What I want to do is strip off the file name,
: leaving just the path info (with the final / ) in a string.  The paths will
: have a varying number of directories, so I don't think I can use split to
: just grab all the dirs, throw out the last one, and join the remainder
: together. (If this is the way to go, please show me I can't see it).

: I tried substitution, using this:
: $path =~ s/\/.*?$//;
: but it strips off everything after the first '/'.  I thought the '.*?' would
: give  me the minimal match, and the '$' would make the match start at the
: end of the string, but I'm wrong.

: Checked the FAQ, newsgroup, manpages, several books.  All to no avail.  I
: know I'm missing something elementarily simple....

: TIA,
: Fitz

Try $path =~ s/\/[^\/]*$//;
which is any number of non-/'s
rather than any number of characters.

By the way, what was the extraneous '?' for?
AC





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

Date: 8 Jul 1998 23:19:58 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Strange file behavior...
Message-Id: <6o0uqu$h3$5@comdyn.comdyn.com.au>

In article <35A38D4D.BFEDC809@bewley.net>,
	Philip Snyder <prsnyder@bewley.net> writes:
> Hiya. Well, when I say upload, I mean upload. :) As of Netscape 2 (I
> think... maybe it was 3?), there has been a file upload form item. Well,

Heh. And 'uploading' a file has been a feature in programs like Kermit
and ftp ever since the dawn of time. In this case: When you say
upload, you mean using the upload feature of Netscape browsers. It
really is important to be precise :)

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I'm desperately trying to figure out
Commercial Dynamics Pty. Ltd.       | why kamikaze pilots wore helmets - Dave
NSW, Australia                      | Edison 


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

Date: Wed, 8 Jul 1998 17:25:52 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: tough regexp - help needed
Message-Id: <glr0o6.pi7.ln@localhost>

otis@my-dejanews.com wrote:

: > >> ++ perl regular expression problem :)
: > >> ++
: > >>
: > >> (Something with HTML)
: > >>
: > >> Don't apply regexs on the entire document - that won't work.
: > >>
: > >> use HTML::Parser;
: > >
: > >unfortunately this is not an option for me in this project.


Then it is likely not possible to do what you wish with 100% accuracy.

You need to either accept that whatever you attempt with regular
expressions will fail occasionally, or bite the bullet and do
it correctly (with a real full-blown parser, regexs are not parsers).

If you press on with doing only the best you can with regexes, then
you can post your regex here, and someone will post a valid HTML
example that will break your code.

Try it...



: > >while I posted this in a perl newsgroup (because it requires knowledge of
: > >regular expressions, and a perl newsgroup is most probably the best for
: that),
: > >the code is actually java (OROMatcher package).
: >
: > [boggles...]
: >
: > the answer still is that regexen aren't not the way to go.  but, if
: > you needed a java solution, you should have said so and posted to
: > an appropriate group.  maybe another java person has already done what
: > you need to do.

: out of curiosity - why is the regexp not a solution?


   It appears that you do not have the benefit of a complete curriculum
   in Computer Science related topics.

   It would take about a full 16 week semester to answer your question
   completely. You probably don't want to wait that long  ;-)

   So you will have to take it on faith then.

   It is mathematically impossible (ie. there is no formal mathematical
   proof) to correctly parse *all* possible HTML using only regexen. 

   In general, you need some memory (most often a stack of some sort).

   Regular expressions do not have a stack.



   Regular expressions are not of sufficient power to accomplish
   what you wish.

   You cannot get blood from the regex turnip...

   Plan A is unworkable, you should consider a Plan B (HTML::Parser)   ;-)


: I posted it here because I assumed (wrong?) that people reading this (perl)
: newsgroup will have the best idea bout the appropriate regexp.
                                         ^^^^^^^^^^^^^^^^^^^^^^


   There *is no* appropriate regex, because what you want to do is
   *impossible* using *only* regular expressions.

   Get thee to a class in Formal Methods or Language Theory if you
   really want to be convinced.



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


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

Date: Wed, 08 Jul 1998 22:37:54 GMT
From: otis@my-dejanews.com
Subject: Re: tough regexp - help needed
Message-Id: <6o0sc2$fjd$1@nnrp1.dejanews.com>


> ++ > ++ perl regular expression problem :)
> ++ >
> ++ > (Something with HTML)
> ++ >
> ++ > Don't apply regexs on the entire document - that won't work.
> ++ >
> ++ > use HTML::Parser;
> ++
> ++ unfortunately this is not an option for me in this project.
> ++ while I posted this in a perl newsgroup (because it requires knowledge of
> ++ regular expressions, and a perl newsgroup is most probably the best for
that),
> ++ the code is actually java (OROMatcher package).
>
> But you wrote "perl regular expression problem".

that is true, and there are 3 reasons I did that: 1. I didn't want to make
the question moer confusing by mentioning java 2. I didn't want answers like
- java - bad, use perl (I use perl daily, but not for this project) 3. the
java package I am using (OROMatcher) uses perl-like regular expressions, so
if I (or somebody else) can come up with an answer with perl in mind the
solution should work for me in java, too.

> ++ So my original question still stands :)
>
> Doesn't Java have a system() or equivalent command?

oh come on now :) This is 1+ year long project, not a hack.  I can't mess it
up by doing system() :)

sounds like nobody knows the right regexp :(

Thanks,

Otis

-----== 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 23:21:44 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: tough regexp - help needed
Message-Id: <6o0uu9$a38$1@marina.cinenet.net>

otis@my-dejanews.com wrote:
: out of curiosity - why is the regexp not a solution?

Because parsing of grammars allowing arbitrarily nested constructs is
impossible using (just) a regex.  HTML is one such grammar.  Issues
involving context-dependent parsing (e.g., occurrences of tag delimters in
quoted text like <img src="foo.gif" alt="<my img">) also break most regex
approaches.  You really need a true lexer-parser, like HTML::Parse, to
pull this off.

: I posted it here because I assumed (wrong?) that people reading this (perl)
: newsgroup will have the best idea bout the appropriate regexp.

Bad, bad, bad.  A Java or HTML or perhaps CGI newsgroup is the right place
for this.

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


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

Date: 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 3100
**************************************

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