[16386] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3798 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 25 14:05:50 2000

Date: Tue, 25 Jul 2000 11:05:18 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <964548318-v9-i3798@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 25 Jul 2000     Volume: 9 Number: 3798

Today's topics:
        [Fwd: Yet another Reg Exp problem.] <jimmy.lantz@ostas.lu.se>
    Re: Advanced Perl Programming -- Dated? (Hugh Lawson)
    Re: attach a file to an email using perl. HOW? <asg@natlib.udm.ru>
    Re: attach a file to an email using perl. HOW? (Villy Kruse)
        CGI and CSS, How in Apache ??? <john@thinman.com>
        config httpd.conf to run perl script <chus@netvigator.com>
    Re: config httpd.conf to run perl script <newsposter@cthulhu.demon.nl>
        DBI/DBD version mismatch <eli@napchan.com>
        Directing screen output to a file! (Horse Nuts)
    Re: Directing screen output to a file! <sariq@texas.net>
    Re: help w/ regular expression <lr@hpl.hp.com>
        Include a source in another one gvoc@my-deja.com
    Re: Include a source in another one nobull@mail.com
    Re: Loading of an array (Logan Shaw)
    Re: Need questions for Perl quiz nobull@mail.com
    Re: Need questions for Perl quiz nobull@mail.com
        Net::Telnet help with multiple hosts <steven.e.pass@boeing.com>
    Re: Net::Telnet help with multiple hosts nobull@mail.com
    Re: NetBIOS/nbname ??? (John Stanley)
    Re: Newbie needs advice about security <madebeer@igc.apc.org>
    Re: perl as part of unix distribution <russ_jones@rac.ray.com>
    Re: perl as part of unix distribution <russ_jones@rac.ray.com>
    Re: perl as part of unix distribution (Logan Shaw)
    Re: perl as part of unix distribution (Logan Shaw)
    Re: perl as part of unix distribution (Logan Shaw)
    Re: Perl sequivallent for tidy (HTML fixup program)? (Logan Shaw)
    Re: Perl sequivallent for tidy (HTML fixup program)? (Randal L. Schwartz)
    Re: perl v. tcl <setok@fishpool.com>
    Re: perly.y jdimov@my-deja.com
    Re: perly.y (Mark-Jason Dominus)
    Re: perly.y (Abigail)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 25 Jul 2000 19:12:28 +0200
From: Jimmy Lantz <jimmy.lantz@ostas.lu.se>
Subject: [Fwd: Yet another Reg Exp problem.]
Message-Id: <397DCA7B.A94F23BC@ostas.lu.se>

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

 
--------------D5A396F2D534A285D9E48D34
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

From: "edge" <eggrock@yahoo.com>
Subject: Re: Yet another Reg Exp problem.
Reply-To: "edge" <eggrock@yahoo.com>
Organization: SkyPoint Communications, Inc.
References: <397D90E8.7C522AEF@ostas.lu.se>
Message-ID: <8lkeac$i1$1@shadow.skypoint.net>
Newsgroups: comp.infosystems.www.authoring.cgi
Approved: Self-Moderation <authoring-cgi@boutell.com>
NNTP-Posting-Host: 206.125.69.81
Date: 25 Jul 2000 09:14:06 -0600
X-Trace: 25 Jul 2000 09:14:06 -0600, 206.125.69.81
X-Original-NNTP-Posting-Host: 204.157.220.254
Path: merkurius.lu.se!news.lth.se!newsfeed.sunet.se!news01.sunet.se!erinews.ericsson.se!uab.ericsson.se!newsfeed1.telenordia.se!news.algonet.se!algonet!news.maxwell.syr.edu!nntp.primenet.com!nntp.gblx.net!nntp-cust.primenet.com!huge.aa.net!206.125.69.81
Xref: merkurius.lu.se comp.infosystems.www.authoring.cgi:85342


"Jimmy Lantz" <jimmy.lantz@ostas.lu.se> wrote in message
news:397D90E8.7C522AEF@ostas.lu.se...
: Hi guys,
: I'm pulling my last strands of hair out on this reg exp.
: I have RTFM and searched for more , but the problem still eludes me.
:
: The following problem
: I'm matching with:
:
: $line =~ /\s.*([A-Z]+)\s.*(\d\d\d\d\d\d).*/s
:
: also tried:
:
: $line =~ /\s.*([A-Z]+)\s.*(\d\d\d\d\d\d).*\s/s
: and many more similar.
:
: the lines to be matched looks like this
:   2000-05-27   P                    111111
:   2000-05-27   F                    222222
: AAAAA   BBB  J88
:
: when matching this in a file it's no problem but when sent with a POST
: form and physical wrapping
: it doesn't work.
: It just matches the second and not the first line.
: But at soon as I put a blank step after the 111111 or write something it
: matches that line as well.
: But I need it to match both lines with or without trailing text.

I'm assuming the "AAAAA BBB J88" line is 'trailing text'...

$line =~ /^\s.*([A-Z]+)\s+(\d{6})/

Again, assuming that the line will always have a leading space and the
format will be exactly the same.

Try comp.lang.perl.misc

Edge


--
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content. You can SELF-APPROVE your first posting
by writing the word 'passme' on a line by itself.

--------------D5A396F2D534A285D9E48D34--



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

Date: Tue, 25 Jul 2000 16:41:28 GMT
From: hlawson@triad.rr.com (Hugh Lawson)
Subject: Re: Advanced Perl Programming -- Dated?
Message-Id: <slrn8nrhv3.8er.hlawson@localhost.localdomain>

What about Ch. 14, "User Interfaces with Tk", and Appendix A, "Tk Widget
Reference"?

I wrote a beginner program that quizzes me on new French words I have to
look up while reading.  I've never written any kind of graphic interface,
but I'd like to try setting up one for this program, mainly as a learning
exercise.  Is this chapter satisfactory for a beginner's use, or should I
look elsewhere for an introduction?

-- 
Hugh Lawson
Greensboro, North Carolina
hlawson@triad.rr.com



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

Date: 25 Jul 2000 15:24:26 GMT
From: Sergey Aleshin <asg@natlib.udm.ru>
Subject: Re: attach a file to an email using perl. HOW?
Message-Id: <8lkbfa$4b0$2@dfree.natlib.udm.ru>

zephyrus9 <zephyrus9@juno.com> wrote:
> I already have a form mailer, but I would also like to attach a file to
> the mail that gets sent out.  How might one do that with Perl?  Is it
> even possible.  Please help.  Thanks.

perldoc MIME::Lite


--
Sergey Aleshin
e-mail: asg@natlib.udm.ru
ICQ UIN: #73148842


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

Date: 25 Jul 2000 16:45:13 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: attach a file to an email using perl. HOW?
Message-Id: <slrn8nrh0o.ul.vek@pharmnl.ohout.pharmapartners.nl>

On 25 Jul 2000 15:24:26 GMT, Sergey Aleshin <asg@natlib.udm.ru> wrote:
>zephyrus9 <zephyrus9@juno.com> wrote:
>> I already have a form mailer, but I would also like to attach a file to
>> the mail that gets sent out.  How might one do that with Perl?  Is it
>> even possible.  Please help.  Thanks.
>
>perldoc MIME::Lite
>



Probably need to get this package from the nearest CPAN mirror site
before this would work.



Villy


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

Date: Tue, 25 Jul 2000 15:35:08 GMT
From: John van V <john@thinman.com>
Subject: CGI and CSS, How in Apache ???
Message-Id: <8lkc3d$oj8$1@nnrp1.deja.com>



Hi all,

I got really excited when I got at least a few cgi features working.

But apache appears to be looking for the CSS file in the cgi directory,
where of course it cant be seen by the UA(netscape).

I tried to put it in the html directory but it didn't get it there
either.

TIA,

John
--
      ##############################################
      #    CXN, Inc. Contact:  john@thinman.com    #
      #      Proud Sponsor of Perl/Unix of NY      #
      #            http://puny.vm.com              #
      ##############################################


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


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

Date: Wed, 26 Jul 2000 00:21:23 +0800
From: "Chu" <chus@netvigator.com>
Subject: config httpd.conf to run perl script
Message-Id: <8lkeeb$66l4@imsp212.netvigator.com>

Dear Perl Specialist,

    I have just install Red Hat, which has a apache server.

    How to configure the httpd.conf to run the Perl script?

Eddie Chu
chus@netvigator.com




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

Date: 25 Jul 2000 16:22:44 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: config httpd.conf to run perl script
Message-Id: <8lkesk$n2r$1@internal-news.uu.net>

In comp.lang.perl.misc Chu <chus@netvigator.com> wrote:

>     I have just install Red Hat, which has a apache server.

>     How to configure the httpd.conf to run the Perl script?

Read the documentation that comes with Apache.

Erik




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

Date: Tue, 25 Jul 2000 16:36:22 +0100
From: Eli Napchan <eli@napchan.com>
Subject: DBI/DBD version mismatch
Message-Id: <vlcrnsskdi2kd5dvo3njgb1q2jr1ulqike@4ax.com>

When I run a script that used  and which uses an mSQL database I get
the following two errors:
1. DBI/DBD internal version mismatch (DBI is v94/s108, DBD mSQL.xsi
expected v93/s108) you probably need to rebuild the DBD driver (or
possibly the DBI). 
2. install_driver(mSQL) failed: [Tue Jul 25 16:30:02 2000] dbu.pl:
DBI/DBD internal version mismatch (DBI is v94/s108, DBD mSQL.xsi
expected v93/s108) you probably need to rebuild the DBD driver (or
possibly the DBI). at /usr/local/etc/httpd/cgi-bin/dbu.pl line 50 

The problem is that I do not know which modules need to be updated,
and more inportantly, where are these modules. I do have access to
most directories in the web server, but do not know where to change
(and what to change).

Could anybody suggest how can I do it? Or, how can I insert debug
lines to check which modules (and their locations) are being called?

The start of the perl script is: 
use DBI();
use CGI qw (:standard);
use CGI::Carp qw(fatalsToBrowser);
my $DEBUG = 0;
my $driver = "mSQL";
my $database = "codes";
my $hostname = "localhost";

Thanks very much.
Eli


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

Date: Tue, 25 Jul 2000 17:09:25 GMT
From: hx_101@hotmail.com (Horse Nuts)
Subject: Directing screen output to a file!
Message-Id: <3980c995.606228830@news.dal.ca>

How do I go about directing screen output to a file???? 


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

Date: Tue, 25 Jul 2000 12:43:53 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Directing screen output to a file!
Message-Id: <397DD1D9.9C10BC52@texas.net>

Horse Nuts wrote:
> 
> How do I go about directing screen output to a file????

open() it.

- Tom


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

Date: Tue, 25 Jul 2000 10:43:59 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: help w/ regular expression
Message-Id: <MPG.13e771b8cfe2515c98abe5@nntp.hpl.hp.com>

In article <7tkqns81juhiqj1908qb5o9og0donogs4o@4ax.com> on Tue, 25 Jul 
2000 08:46:58 GMT, Bart Lateur <bart.lateur@skynet.be> says...
> Larry Rosler wrote:

 ...

> >'x' =~ /(.)/;
> >print $1 =~ tr/x//, "\n";

 ...

> Maybe it depends on the program. Last time I tested it, it didn't work.
> It came up in the thread about counting identical characters in two
> strings.
> 
> 	sub overlap {
> 	    return ("$_[0]" ^ "$_[1]") =~ tr/\0//;
> 	}
> 	print overlap "This is one", "This is two";
> -->
> Can't modify bitwise xor (^) in transliteration (tr///) at test.pl line
> 3, near "tr/\0//;"
> Execution of test.pl aborted due to compilation errors.
> 
> See? And this on Perl 5.6.

This seems like a botched patch, because there are varying degrees of 
lvalue-ness being discovered.  If the operand is simply "$_[0]" (with 
the quotes), the diagnostic says Can't modify string ...

A correct patch would recognize that lvalue-ness is irrelevant in every 
circumstance, because the operand cannot be changed by the 'count' 
operation.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 25 Jul 2000 15:25:40 GMT
From: gvoc@my-deja.com
Subject: Include a source in another one
Message-Id: <8lkbhd$o4d$1@nnrp1.deja.com>

I know this is quite a stupid question but up to now I couldn't find an
answer.
How can I include a Perl source in another one, es. the way the C
#include directive works ?
Thank you
Gaetano Vocca


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


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

Date: 25 Jul 2000 17:53:08 +0100
From: nobull@mail.com
Subject: Re: Include a source in another one
Message-Id: <u9d7k2cft7.fsf@wcl-l.bham.ac.uk>

gvoc@my-deja.com writes:

> I know this is quite a stupid question but up to now I couldn't find
> an answer.

How have you tried? I note you are posting from deja.com.  Have you
tried a search of articles in this newsgroup with "include" in the
subject line?  No, I thought not.

> How can I include a Perl source in another one, es. the way the C
> #include directive works ?

Ignoring the fact that you _can_ use C preprocessor for Perl because
nobody really does this these days the nearest thing is "do". 

Actually "require" or "use" is probably better.  For details RTFM.

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


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

Date: 25 Jul 2000 12:06:39 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Loading of an array
Message-Id: <8lkhev$hso$1@provolone.cs.utexas.edu>

In article <MPG.13e67b27d677a76c98abe3@nntp.hpl.hp.com>,
Larry Rosler  <lr@hpl.hp.com> wrote:
>In article <8liiup$f8u$1@provolone.cs.utexas.edu> on 24 Jul 2000 
>18:19:53 -0500, Logan Shaw <logan@cs.utexas.edu> says...
>
>...
>
>> You could read the stuff in by using "split" to build an array
>> from your string based on delimiters.  Something like this:
>> 
>> 	while (<>)
>> 		{
>> 		@row = split (/|/);
>> 		push @allrows, [@row];
>> 		}
>
>Something like that, but not that.  `perldoc perlre` to see what that 
>split is really using.

Oooops.  Forgot my backslash.  So, something more like this:

	while (<>)
		{
		@row = split (/\|/));
		push @allrows, [@row];
		}

  - Logan


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

Date: 25 Jul 2000 17:42:19 +0100
From: nobull@mail.com
Subject: Re: Need questions for Perl quiz
Message-Id: <u9lmyqcgb8.fsf@wcl-l.bham.ac.uk>

"Daniel Foster" <daniel@blackomega.com> writes:

> I'm compiling a quiz on Perl to test people's knowledge.  The
> questions need to be multiple choice, with 4 or 5 answers, like this
> one...
> 
> If an anonymous subroutine is created with "$coderef = sub {print
> "Hello world\n";};" then how should it be called?
> 1. &coderef;
> 2. $coderef->call;
> 3. &{$coderef};
> 4. anoncall($coderef);
> 
> The other answers are clearly made up, with only one correct answer
> (even though there are clearly multiple ways of doing anything).

s/how should/how could/; # :-)

After all the tidyest formats IMNSHO are:

  $coderef->(); # With @_ handling
  &$coderef;    # Without @_ handling

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


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

Date: 25 Jul 2000 17:49:48 +0100
From: nobull@mail.com
Subject: Re: Need questions for Perl quiz
Message-Id: <u9em4icfyr.fsf@wcl-l.bham.ac.uk>

"Daniel Foster" <daniel@blackomega.com> writes:

> I'm compiling a quiz on Perl to test people's knowledge.  The
> questions need to be multiple choice, with 4 or 5 answers,

You mean things like this:

Which of the following pairs are not equivalent.

  1.  ${$a}[1]     $a->[1]
  2.  $a{x}{y}     $a{'x'}->{'y'}
  3.  @{\@c}[@x]   @c[@{\@x}]
  4.  $d->{x}->()  &{${$d}{x}}()
  5.  ${e}{x}{y}   ${e}->{x}->{y}

What about longer questions?  For example you can test understanding
of my() and local() in a MCQ only by asking what does a particular bit
of code output:the following output:

use strict;
use vars '$x';
$x=1;
my $y=1;
sub foo { print "$x $y " }; 
foo();
{
  local $x=2;
  $y=2;
  foo();
  my ($x,$y)=(3,3);
  foo();
}
foo();

1. 1 1 2 1 2 1 1 2 
2. 1 1 2 2 2 2 1 2
3. 1 1 2 2 3 3 1 1
4. 1 1 2 1 3 3 1 2

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


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

Date: Tue, 25 Jul 2000 15:45:14 GMT
From: "Steve Pass" <steven.e.pass@boeing.com>
Subject: Net::Telnet help with multiple hosts
Message-Id: <Fy9FrF.8G5@news.boeing.com>

I've been developing a script that goes through a While loop that telnets
into each host(catalyst) and gets the version information and sticks it in a
file. I was wondering if there was a way to print a message that the host
could not be reached and have it continue onto the next host without the
program terminating.  I'm running this on Windows NT workstation and so far
when a host cannot be reached in the list the program reports a "unknown
remote host: (catalyst name) at (script name) line #. (Which is expected
with the current code.)....Thanks in advance.

#!/usr/bin/perl
my($t, $global);
print "What is the global password? ";
  $global = <>;

open(FILE,"catlist.txt") || die "cannot open file";
open(VERSION, ">shversion.txt") || die "cannot open file";
 while(<FILE>) {
  chop;
    #Start the telnet connection
  use Net::Telnet;
  $t = new Net::Telnet (Timeout=>10,
         Errmode => 'die');
  $t->open (Host => $_);
  $t->waitfor('/password: $/i');
  $t->print($global);
  $t->waitfor('/> $/i');
  $t->print("set len 0"), "\n";
  $t->waitfor('/ $/i');
  print "$_", "\n";
  $t->print("sh ver");
#Stick the version info into an array.
  @info = $t->getlines;
#Crude formatting for the VERSION file
  print VERSION ($_), ":", " ";
#I just want the first line. It has the software info I need
  print VERSION "$info[1]";
     $t->print("exit"), "\n";
  }

 close (FILE);
 close (VERSION);
exit;








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

Date: 25 Jul 2000 17:59:08 +0100
From: nobull@mail.com
Subject: Re: Net::Telnet help with multiple hosts
Message-Id: <u9bszmcfj7.fsf@wcl-l.bham.ac.uk>

"Steve Pass" <steven.e.pass@boeing.com> writes:

> I've been developing a script that goes through a While loop that telnets
> into each host(catalyst) and gets the version information and sticks it in a
> file. I was wondering if there was a way to print a message that the host
> could not be reached and have it continue onto the next host without the
> program terminating.

You appear to be asking how to trap exceptions in Perl.

See "perldoc -f eval" (the second form).

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


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

Date: 25 Jul 2000 17:03:28 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: NetBIOS/nbname ???
Message-Id: <8lkh90$a7k$1@news.NERO.NET>

In article <MPG.13e781398895beb7989688@news>,
jason <elephant@squirrelgroup.com> wrote:
>(and just quietly .. IF he got YOUR system name then it would also a 
>Windows thing over NetBIOS because that's the ONLY way he (Steve Gibson) 
>tries to get system names on the web site mentioned by the originator .. 

Well, apparently not, since he got the system name and there is no
Windows "thing" to ask for it.



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

Date: Tue, 25 Jul 2000 08:21:06 -0700 (PDT)
From: Michael de Beer <madebeer@igc.apc.org>
Subject: Re: Newbie needs advice about security
Message-Id: <APC&1'0'50775de2'546@igc.apc.org>

I think this is secure.
-Mike


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

Date: Tue, 25 Jul 2000 10:27:44 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: perl as part of unix distribution
Message-Id: <397DB1F0.9D81242@rac.ray.com>

"Alan J. Flavell" wrote:
> 
> On Tue, 25 Jul 2000, Russ Jones wrote:
> 
> > To paraphrase Oscar Madison, it took me thirty minutes to figure out
> > that IANAL meant "I am not a lawyer."
> 
> If this is meant to be a joke, a Google search took me about 5 seconds
> wall-clock time to provide the answer.  "Use the Web, Luke".
> 
> (This was only a demonstration.  I already knew it.)
> 

Actually it took me about two seconds to figure out (with only my poor
little pea brain and no web searches) that it meant "I am not a
lawyer," and wasn't a reference to Isaac Asimov's classic venture into
porn, "I Anal." Did YOU get the "FU" reference?

Sarcasm is wasted here, ain't it?

-- 
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747

Quae narravi, nullo modo negabo. - Catullus


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

Date: Tue, 25 Jul 2000 10:29:09 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: perl as part of unix distribution
Message-Id: <397DB245.3F31C4D@rac.ray.com>

Tom Christiansen wrote:
> 
> 
> --tom


IT'S ALIVE!!! IT'S ALIVE, I TELL YOU!!!

-- 
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747

Quae narravi, nullo modo negabo. - Catullus


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

Date: 25 Jul 2000 11:33:55 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: perl as part of unix distribution
Message-Id: <8lkfhj$hki$1@provolone.cs.utexas.edu>

In article <%I4f5.141402$t91.1083759@news4.giganews.com>,
NP <nitty28@excite.com> wrote:
>On 24 Jul 2000 17:43:05 -0500, Logan Shaw <logan@cs.utexas.edu> wrote:
>: 
>: Not only does Solaris 8 ship with perl, you can't not install it.
>
>Yes you can.  Well, let me rephrase; you can "get jiggy wit"
>/var/sadm/install/contents and toast it from there, along with
>/var/sadm/pkg once you've been forced to install it.  :-)

Yes, -but- presumably Sun has decided to install it not only for your
convenience but for theirs as well.  Sun does lots of things (like
installpatch but there's more) in ksh right now, and my guess is they
want to go to perl for some of those things.

So, if you remove perl completely, you then would break any such
scripts.  And if you replace perl with a different version, you might
or might not break things, but if you leave perl as installed, then you
are running the version of perl that they test their scripts with.

And that is why I have perl in /usr/local/bin, and it's also why I
believe perl doesn't necessarily belong in /usr/bin.

  - Logan


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

Date: 25 Jul 2000 11:55:43 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: perl as part of unix distribution
Message-Id: <8lkgqf$hou$1@provolone.cs.utexas.edu>

In article <slrn8npv5p.9on.tjla@thislove.dyndns.org>,
Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote:
>When windows NT crashed and stranded that naval warship did they sue
>microsoft? Ever read the EULA on a piece of commercial software
>recently? You're lucky they let you keep the shirt on your back.

It's true, they're not legally liable.  However, if you are a large
customer, you may still have some influence.  In theory, the vendor
wants to maintain a good relationship with you so they continue to get
revenue from you.

Telling Larry Wall or the perl porters that you're not going to give
them any money in the future isn't very effective since you're not
giving them any money in the present.

Of course, there are limitations -- telling Microsoft you're not going
to buy any more of their products isn't effective because:

  (a) they are probably too large to respond meaningfully anyway, and

  (b) they will just think something like, "We expect to lose a million
      next year, too.  You know Mr. Thatcher, at the rate of a million
      a year, we'll have to close this place in sixty years.", and

  (c) they know you're bluffing anyway because if you really cared
      about your freedom to switch to a competitor, you wouldn't be
      using their products in the first place.

Well, that's my opinion anyway.

  - Logan


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

Date: 25 Jul 2000 12:02:16 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: perl as part of unix distribution
Message-Id: <8lkh6o$hs2$1@provolone.cs.utexas.edu>

In article <397d9aab@cs.colorado.edu>,
Tom Christiansen <tchrist@perl.com> wrote:
>In article <8li2a5$2tk$1@nnrp1.deja.com>,  <dgallardo@my-deja.com> wrote:
>>Is perl part of any standard unix distribution?  Are there any moves in
>>this direction.
>
>When last I looked at this very question a few months ago, all of
>AIX, BeOS, BSDI, Debian, DG/UX, DYNIX/ptx, FreeBSD, IRIX, LynxOS,
>Mac OS X, OpenBSD, OS390, RedHat, SINIX, Slackware, Solaris, SuSE,
>and Tru64 shipped with Perl as part of their standard distributions.
>I'm sure more have been added since then.  (And that doesn't even
>count the millions of other Linux operating systems.)

Tom's being modest and not pointing out that when he first looked at
this question, there were no operating systems shipping with perl, but
he made sure something was done about that.

(Or maybe Tom's not being modest and I've got my facts mixed up.
Hopefully not.)

Oh yeah, you can also add Mandrake to the list.

  - Logan


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

Date: 25 Jul 2000 12:14:51 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Perl sequivallent for tidy (HTML fixup program)?
Message-Id: <8lkhub$hti$1@provolone.cs.utexas.edu>

In article <397da662.460115870@news.rmi.net>,
William Herrera <posting.account@lynxview.com> wrote:
>Hi, I am currently looking at running some program HTML output (from a text or
>MS word to HTML translator) through tidy via system() in a perl program. Is
>there a native perl equivalent to the tidy program for cleaning up HTML? 

You can use HTML::Parser to parse the HTML as-is, and then do whatever
cleanup you want to on it yourself, but it's not going to be as
complete as what tidy.exe does.

  - Logan


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

Date: 25 Jul 2000 10:34:56 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Perl sequivallent for tidy (HTML fixup program)?
Message-Id: <m1n1j6kta7.fsf@halfdome.holdit.com>

>>>>> "Logan" == Logan Shaw <logan@cs.utexas.edu> writes:

Logan> You can use HTML::Parser to parse the HTML as-is, and then do
Logan> whatever cleanup you want to on it yourself, but it's not going
Logan> to be as complete as what tidy.exe does.

The problem with HTML::Parser is that it can't tell you anything about
tags that have no closing tags.  For that you need HTML::TreeBuilder.
You'll need that if you want to make XHTML out of HTML, since in
XHTML, the ending tags must be explicit.

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: 25 Jul 2000 16:36:51 GMT
From: Kristoffer Lawson <setok@fishpool.com>
Subject: Re: perl v. tcl
Message-Id: <8lkfn3$1bob$4@news.bbnetworks.net>

In comp.lang.tcl Morten Skaarup Jensen <morten@nospam.org> wrote:

: Yes. I mean processing forms, retrieving and saving data in databases, or
: possibly managing this data oneself. I would just use pure HTML for static
: web pages.

I recomment trying out the TclHttpd server from the scriptics dev website.
I've been playing around with it a bit for various projects and I must
say that web development has never been so easy and straightforward...


-- 
         -     ---------- = = ---------//--+
         |    /     Kristoffer Lawson      |  www.fishpool.fi|.com
         +-> |    setok@fishpool.com       |  - - --+------
             |-- Fishpool Creations Ltd - /         |
             +-------- = - - - = ---------      /~setok/


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

Date: Tue, 25 Jul 2000 15:18:04 GMT
From: jdimov@my-deja.com
Subject: Re: perly.y
Message-Id: <8lkb36$nm7$1@nnrp1.deja.com>



Sorry, I guess that was pretty vague.  The whole parsing Perl topic
bothers me greatly.  I mean...  I don't mind the fact that it's done in
a completely unorthodox manner, and that the parser:smoke:mirrors
distribution is more like 1:9:99...  I'm all for that, but why would
NOBODY ever dare to explain or even comment on the whole process??  The
source of toke.c and perly.y is remarkably far from clear.

I guess what I'm trying to do is extract the parsing functionality into
my own Perl5 parser, and I'd like to know how it's done.  The reason
for my doing this is that I want to.  The other reason is to piss all
them people that always tell me 'well just use Perl to parse Perl'.
And the yet another reason is that I want to be able to parse code for
which I don't have all the parts (modules) and which was written for
different platform (realizing that complete parsing under those
circumstances is impossible, but that's fine with me - I still wanna be
able to partially parse what I do have).

And can anyone give me the real reson for Perl people to say that
specifying a proper grammar for Perl is impossible?

In article <8lhukr$vvc$1@nnrp1.deja.com>,
  jdimov@cis.clarion.edu wrote:
> So...  How do I get this little beast to actually perform lexical
> analysis on something and spit out parsed code?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


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


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

Date: Tue, 25 Jul 2000 16:15:50 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: perly.y
Message-Id: <397dbd35.5b6$1e5@news.op.net>

In article <8lkb36$nm7$1@nnrp1.deja.com>,  <jdimov@my-deja.com> wrote:
>I guess what I'm trying to do is extract the parsing functionality into
>my own Perl5 parser, and I'd like to know how it's done.  

You might want to talk to Simon Cozens.  I understand that he has a
nearly-complete implentation of a Perl parser written in Perl.

>And can anyone give me the real reson for Perl people to say that
>specifying a proper grammar for Perl is impossible?

Well, just to take a couple of examples:

        $x = foo;

parses the same as

        $x = 'foo';

but if it was preceded by

        sub foo  { ... }

then it parses instead as if you had written

        $x = foo();

Now, suppose you want to parse the following program:

        use Module;
        $x = foo;

and suppose that Module.pm contains the following:

        package Module;

        sub import {
          if (twin_primes_conjecture_is_true()) {
            *main::foo = sub { 1 };   # Export function definition into main
          }
        }

        sub twin_primes_conjecture_is_true {
          ...
        }

        1;

Now you can't parse "$x = foo" unless you know whether the famous Twin
Primes conjecture is true, because the parse is

        $x = foo();

if it is true and

        $x = "foo";

if it isn't.  But the Twin Primes conjecture has been a famous open
problem of mathematics for several hundred years.

This is a rather silly example, but it may give you some idea of the
difficulties involved.  One of the largest difficulties is that a
compile-time declaration like 'use' might load in *and execute*
arbitrary Perl code, with subsequent parsing depending on the result
of the execution.  This means that in general you can't parse paerl
code correctly without being able to execute arbitrary Perl code;
hence the saying that 'only perl can parse Perl'.

There are a lot of similar oddities.  Consider


        $x = new Carrot (color => 'orange');

Is this parsed the same as this?

        $x = "Carrot"->new(color => 'orange');

Or is it parsed the same as this?

        $x = new(Carrot(color => 'orange'));

The answer, again, is 'it depends'.  I forget just what it depends on.   



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

Date: 25 Jul 2000 12:49:47 EDT
From: abigail@foad.org (Abigail)
Subject: Re: perly.y
Message-Id: <slrn8nrh95.vcg.abigail@alexandra.foad.org>

Mark-Jason Dominus (mjd@plover.com) wrote on MMDXX September MCMXCIII in
<URL:news:397dbd35.5b6$1e5@news.op.net>:
{} 
{} There are a lot of similar oddities.  Consider
{} 
{} 
{}         $x = new Carrot (color => 'orange');
{} 
{} Is this parsed the same as this?
{} 
{}         $x = "Carrot"->new(color => 'orange');
{} 
{} Or is it parsed the same as this?
{} 
{}         $x = new(Carrot(color => 'orange'));
{} 
{} The answer, again, is 'it depends'.  I forget just what it depends on.   


Whether there's a subroutine called 'new' in the current package.



Abigail
-- 
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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

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

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


------------------------------
End of Perl-Users Digest V9 Issue 3798
**************************************


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