[8395] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2012 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 3 16:14:00 1998

Date: Tue, 3 Mar 98 13:00:25 -0800
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, 3 Mar 1998     Volume: 8 Number: 2012

Today's topics:
    Re: "Learning Perl" or "Programming Perl" <psrjeff@exisnospam.net>
    Re: "Learning Perl" or "Programming Perl" (Martin Vorlaender)
        Anyone using Perl's undump??? (Sunny Siu)
        cgi forms and java <dsutclif@ucsd.edu>
    Re: Conflict in this Newsgroup <bcoleman@mindspring.com>
    Re: Conflict in this Newsgroup <zenin@best.com>
    Re: Conflict in this Newsgroup <NerveGas@see_signature.com>
    Re: Formats and diamond operator (Gregory Snow)
    Re: Help please: Conversion problems from numeric to as (Odie Deth)
    Re: help with regexp xewj@odin.sunquest.com
        I need some Help !!!! <parem@nortel.ca>
    Re: Killfile Triage <bcoleman@mindspring.com>
    Re: NOT matching a string <uri@sysarch.com>
        Open file as a result of form input !! (Baher M. Safwat)
    Re: Open file as a result of form input !! (Brian Wheeler)
        RE: Perl QRG(Perl Quick Reference Guide) <allen@glenturret.co.uk>
        Perl QRG(Quick Reference Guide) <allen@glenturret.co.uk>
        perl's undump (Sunny Siu)
        PerlEmacs (Etienne Grossmann)
    Re: Stripping (Most) HTML tags <Kari.Marttila.@tietogroup.com>
    Re: Summing Up Array Values - How Do I? <westxga@ptsc.slg.eds.com>
    Re: Summing Up Array Values - How Do I? <uri@sysarch.com>
    Re: Summing Up Array Values - How Do I? <uri@sysarch.com>
    Re: The -w switch (was Re: better way to do this?) (gaj)
    Re: The -w switch (was Re: better way to do this?) <bcoleman@mindspring.com>
    Re: The Ineffable Tom C. <NerveGas@see_signature.com>
        What is PERL? Learn JAVA instead? <bslone@earthlink.net>
    Re: What is PERL? Learn JAVA instead? (Kevin B Cohen)
    Re: Why PERL? [Re: Beginner in trouble] xewj@odin.sunquest.com
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 3 Mar 1998 14:51:59 -0500
From: "Jeff Barnes" <psrjeff@exisnospam.net>
Subject: Re: "Learning Perl" or "Programming Perl"
Message-Id: <6dhmv6$l43$1@grouper.exis.net>


steve wrote in message <35007b0f.131669540@news.cent.com>...
>as a  " Windows developer familiar with C, C++, Pascal and all sorts
>of OSs and major and minor languages" i would say neither, i would
>instead suggest "Cross Platform Perl" for Unix and Windows NT" by Eric
>R. Johnson ISBN 1-55851-483-X

As a beginner, I bought the book and learned some from it. However, I very
quickly outgrew the information it presented. It doesn't even discuss the
split operator. If one needs to learn regexp, then I would think that split
should be a part of that block of instruction.

Jeff





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

Date: Tue, 03 Mar 1998 21:14:06 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: "Learning Perl" or "Programming Perl"
Message-Id: <34fc648e.524144494f47414741@radiogaga.harz.de>

Benjamin Smith (benbean@yahoo.com-*nospam*-) wrote:
: I'm trying to get started with Perl and I'd like to purchase a book
: from those fine people at O'Reilly but minimize my initial expenses by
: only getting one. My question is "Learning Perl" or "Programming
: Perl"?

Programming Perl is a *must*. It's _the_ reference.

: They both cover a lot of material. Is there much overlap between the
: two? Do they complement each other or offer different things? Is
: "Programming Perl" more advanced, or does it too start from scratch?

Well, kind of. What do you expect from a reference?

Look at all the POD files in your perl/lib/pod directory; the Camel
is a revised and extended version of these.

: I'm a Windows developer familiar with C, C++, Pascal and all sorts of
: OSs and major and minor languages so I don't need to be completely
: hand-held... I need a quick introduction to bring me up to speed.

I liked

Nigel Chapman: Perl - The Programmer's Companion
Wiley & Sons (sorry, I don't have the ISBN at hand)

, an introduction to Perl aimed specifically at programmers.
This, accompanied by the Camel, should get you started.
And after that, you may want to have a look at "Advanced Perl Programming"
(O'Reilly again).

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: 3 Mar 1998 17:52:30 GMT
From: xxsiu@omega.uta.edu (Sunny Siu)
Subject: Anyone using Perl's undump???
Message-Id: <6dhg0u$sgd$1@news.uta.edu>


http://www.dma.unifi.it/perl/faq/Q3.11.html
---------------------------------------------------------------------------
The undump program comes from the TeX distribution. If you have TeX,
then you may have a working undump. If you
don't, and you can't get one, AND you have a GNU emacs working on your
machine that can clone itself, then you might try
taking its unexec() function and compiling Perl with -DUNEXEC, which
will make Perl call unexec() instead of abort().
You'll have to add unexec.o to the objects line in the Makefile. If you
succeed, post to comp.lang.perl.misc about your
experience so others can benefit from it. 
---------------------------------------------------------------------------

I wonder if anyone in Perl community ever use such a 'undump' utility 
to run a memory dump of a Perl script on Solaris 2.5.1.  

If you are the person who I am looking for, please let me 
know how I can get a copy of undump from source.

-- 
--Sunny Siu
  Unix system admin., ACS
  University of Texas at Arlington
  siu@uta.edu


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

Date: Tue, 03 Mar 1998 11:05:42 -0500
From: Dale Sutcliffe <dsutclif@ucsd.edu>
Subject: cgi forms and java
Message-Id: <34FC2A55.9DE6E663@ucsd.edu>

Anyone have some sample java source code of passing a string to a cgi
form, e.g. formmail, they could send me?

Thanks a bunch!
dale
dsutclif@ucsd.edu





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

Date: Tue, 03 Mar 98 13:56:11 +0400
From: "Ben Coleman" <bcoleman@mindspring.com>
Subject: Re: Conflict in this Newsgroup
Message-Id: <awqmoayqzaynqks.pminews@user-38lc8ho.dialup.mindspring.com>

On 1 Mar 1998 17:19:40 GMT, V. Chandrasekhar wrote:

>8. What about the interests of the newcomers to Perl ? How about
>setting up another newsgroup where atmosphere is definitely not so
>MD ?

For the Win32 people, I think this already exists in the Perl-Win32-*
mailing lists.

Ben
-- 
Ben Coleman NJ8J                     | The attempt to legislatively
Internet: bcoleman@mindspring.com    | micromanage equality results, at
http://bcoleman.home.mindspring.com/ | best, in equal misery for all.





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

Date: 3 Mar 1998 19:48:05 GMT
From: Zenin <zenin@best.com>
Subject: Re: Conflict in this Newsgroup
Message-Id: <888954828.55114@thrush.omix.com>

Jen Lyons <lyonsj@bgnet.bgsu.edu> wrote:
	>snip<
: Keep in mind, though, that the mini-FAQ is one document.  The rest of the
: FAQs that I've seen mentioned are numerous, and if you're new to Perl, you
: may not know where to look.  I agree that the mini-FAQ should be "beefed
: up" a bit.

	Hmm, what about a different direction.  I myself can't stand
	searching the docs by hand, or even with grep/less/web/etc.  They also
	don't oftin show any detail on locally installed modules or such
	that may have an answer.  If I didn't have Text::English(3)
	installed and with it perlindex(1) I'd go mad.

	I would *LOVE* to see Text::English/perlindex as part of the
	standard distribution.  A run of perlindex -index as part
	of the install would be needed as well, and if possible an option
	in the perl build config that would add "perlindex -index" to
	root's weekly crontab.  I think it would make the newbe excuse of
	too much documentation to search through completely null and void.
	-As the standard distribution is now, I have to say I do think it is
	a valid reason to post an FAQ now and then if you're really new to
	perl.

: It's true, there are some people who ask questions that would show up if
: you just look at man perl.  Maybe something like the CGI newsgroup, where
: you're sent the mini-FAQ before your post is accepted...?

	I agree 100%, however I would like moderation as well as a
	auto mini-FAQ.

-- 
-Zenin
 zenin@best.com


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

Date: Mon, 02 Mar 1998 15:53:02 -0700
From: NerveGas <NerveGas@see_signature.com>
Subject: Re: Conflict in this Newsgroup
Message-Id: <34FB384E.6620@see_signature.com>

> > > Nathan> The fact is that the experts have tried really, really hard to
> > > Nathan> preserve the Usenet culture that many of us were a part of in
> > > Nathan> its "hey day" and are probably burned out from having done so.

<snip>

> > Despite the 'really, really hard' efforts of the experts to ' preserve the
> > Usenet culture that many (...) were a part of in its  "hey day" ',  it has
> > NOT worked. Is it possible that this attempt is like tilting at windmills

<snip>

> 1) It isn't working because of a flood of people who don't know what
> they are doing.
> 
> 2) They are (mainly) trying their best to fit that flood into it proper
> place
> 
> 3) If they stop trying, then there's two things that can happen - a.
> They leave and the new comers are left trying to answer their own
> questions, and b. they can go to some kind of moderation.

   
   I saw a very good quote today, that went more or less like this: 
"Learners inherit the world when it changes, the 'learned' find
themselves beautifully prepared to survive in a world that no longer
exists."  Sometimes, I wonder wether the "experts" are not in the latter
category, when all of this ranting and raving takes place.

steve
-- 

----------------------------------------
Domain name for replying is "inconnect".
----------------------------------------


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

Date: 3 Mar 1998 19:03:05 GMT
From: snow@biostat.washington.edu (Gregory Snow)
Subject: Re: Formats and diamond operator
Message-Id: <6dhk59$1fai$1@nntp6.u.washington.edu>

look at the documentation for the "eof" function (perldoc perlfunc),
it gives 2 examples that could easily be modified to do what you want.

do something like:

while(<>){
  print;
  if(eof){  # note not eof()
	...  # send form feed, header, etc.
  }
}


In article <slrn6fmmrg.onf.bspring@j51.com>,
Brian Springstead <bspring@j51.com> wrote:
>I'm using perl to output a number of similar files to the printer by 
>using the diamond operator <> and a format I designed.  I wanted the
>top of the page format to include the filename and the page number(s).
>All works well if I only put one filename on the command line.  If 
>I list more than 1 file and if the information doesn't fill a page, it 
>gets treated as one big file.  How do I force an end of page and get 
>the next filename?  Thanks in advance.
>
>Brian
>-- 
>Brian Springstead | 
>  Looney tunes!   | "Consequences, Schmonsequences, as long as I'm rich." 
> bspring@j51.com  |               -- "Ali Baba Bunny" [1957, Chuck Jones] 
>


-- 
-------------------------------------------------------------------------------
     Gregory L. Snow         |   Any sufficiently advanced technology	
     (Greg)                  | is indistinguishable from magic.
snow@biostat.washington.edu  |			-- Arthur C. Clarke


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

Date: Tue, 03 Mar 1998 19:37:57 GMT
From: odie@algonet.seREMOVE (Odie Deth)
Subject: Re: Help please: Conversion problems from numeric to ascii
Message-Id: <34fc5bdb.2421015@194.213.69.148>

Oops, embarassing...
I was confusing the newsgroups, and thought I was discussing something
completely different...
Sorry.
---
Odie Deth  -  odie@algonet.se  -  http://www.algonet.se/~odie


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

Date: 3 Mar 1998 19:37:23 GMT
From: xewj@odin.sunquest.com
Subject: Re: help with regexp
Message-Id: <6dhm5j$6b6$1@iggy.sunquest.com>

In article <34fc2f2a.635087006@news.osnabrueck.netsurf.de>,
Collin Rogowski <collin@rogowski.de> wrote:
>I have a line like this:
>param1=value1, param2=value2, param3=value3, param4=value4, ...
>I want to extract value3, so I thought I could something like this:
>if (/param3=(.*),/) {
>  $value = $1
>}
>print $value;	#this shows	 value3, param4=value4, ...
>this menas the regexp matches on the ",", which is most right. But I
>want it to match on the most left.
>How can I do this?

by default, regex is greedy.
/param3=(.*?), / #makes regex less greedy

>Thanks in advance

you're welcome afterwards. :)


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

Date: Tue, 03 Mar 1998 15:34:50 -0500
From: Martin Pare <parem@nortel.ca>
Subject: I need some Help !!!!
Message-Id: <34FC6969.B984C9BF@nortel.ca>

Hi everyone,

I am trying to do something that is not really trivial (to me!) and
couldn't make it work up to now,
here is a description of my environment:

I have a Hiearchy of packages: Pack1, Pack2, Pack3, .... in the Package
Pack1, I am using a function called Run() from my Package Pack2. This
function reads a Datafill and returns a list of functions like this:
Pack1::CreateBlaBla, Pack2::CreateBloBlo. I would like my function Run
to execute the function name returned by my Init command
(i.e.Pack1::CreateBlaBla)

Here is a copy of my code, all the problems rely in those two functions
Run and Init:

sub Run {
 [...] Stuff missing
## Initialize the FuncRefs array
 Init($self);

 ## Invoke the functions sequentialy
  CALL: foreach $Func (@{$self->{FuncRefs}}) {
    $FuncCount++;
    last CALL if ($Res = &$Func($self)) ne 0; ### Returns if one
function is not zero
  }

[...] othere stuff deleted

}

sub Init {
  my $self = shift;
    ## Create the list of references to functions
  @TmpFunc = split ' ', $self->{FuncNames}; ### FuncNames are :
Pack1::CreateBlaBla
  FUNC: foreach $Func (@TmpFunc) {
    next FUNC if $Func =~ /^#/o; # Skip commented out functions
    push(@{$self->{FuncRefs}}, \&$Func); ### It should put the Address
of the content of $Func into

### my global array
  }
  LogIt($self, "$FuncLog\n");
}


Initially I was deryving  Pack1 from Pack2 but it is not making any
sense at all to do that in my
environment. What I want is to execute the content of what Pack2->Init()
is returning. The problem
(I think) is due to the fact that Pack2 as no clue of the functions
addresses in Pack1. Also it seems
like I can not even execute packages in Pack2.

If you have any suggestions or clue on how to do that, Please let me
know.

- Martin Pare (parem@nortel.ca,  parem@cyberus.ca)



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

Date: Tue, 03 Mar 98 14:14:38 +0400
From: "Ben Coleman" <bcoleman@mindspring.com>
Subject: Re: Killfile Triage
Message-Id: <kytoaueygeojafk.pminews@user-38lc8ho.dialup.mindspring.com>

In <slrn6fddna.42f.guckes@rudin.math.fu-berlin.de>, on 02/27/1998
   at 12:51 PM, guckes@math.fu-berlin.de (Sven Guckes) said:

>Now, what would happen if everyone just used a valid address?

We'd get used to reading email headers and reporting spammers to
their ISPs/netfeeds(I already have).

Ben
-- 
Ben Coleman NJ8J                     | The attempt to legislatively
Internet: bcoleman@mindspring.com    | micromanage equality results, at
http://bcoleman.home.mindspring.com/ | best, in equal misery for all.





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

Date: 03 Mar 1998 15:24:09 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: NOT matching a string
Message-Id: <x7en0jzfo6.fsf@sysarch.com>


this is an interesting question and since you claim to have searched
diligently, i will deign to answer you. the wizard has spoken! just
bring me the head of bill gates before you ask another one!

miko@idocs.com writes:

> I am trying to create a regex in which part of the expression matches any
> amount of text that is NOT some expression.
> 
> For example, I would like an expression that essentially says "X" followed by
> anything that isn't "test", so that it matches everything up to but not
> including "test".
> 
> For the string "X hi there temp test" it would find "X hi there temp ".
> For the string "Xtest" it would find "X".
> For the string "Xtetetest" it would find "Xtete".
> 
> I have tried
> 
>        /X(?!test)/
> 
> but that only matches the X, not all the stuff following it.  I also tried
> "/X(?!test)*/" but that is no better.

the last one makes no sense to me. 0 or more negative lookaheads is
illogical.

you are close but no cigar. you don't have anything to match the text
BETWEEN X and test. you just match X followed by not 'test'. nothing

try this (tested)

/(X.*)test/
print $1 ;

this works on all your examples.

hope it helped,

uri

-- 
Uri Guttman                     SYStems ARCHitecture and Software Engineering
uri@sysarch.com                                          Have Perl, Will Hack
http://www.sysarch.com                (781) 643-7504 x*2  FAX: (781) 643-2710
Try the Best Search Engine on the Net -------->  http://www.northernlight.com


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

Date: Tue, 03 Mar 1998 18:44:17 GMT
From: bsafwat@egyptonline.com (Baher M. Safwat)
Subject: Open file as a result of form input !!
Message-Id: <34fc4aa3.40988918@news>

I am new to Perl,
I use netscape enterprise server as a web server
runninig on Solaris 2.5.1
I designed a simple page to get users input
as a result of that input I will open some file and add to it
but ...
it generate a server error

when I comment the "open" line and "close" line
the program return default result Correctly!

can anyone advise me how to do that correctly

thanks
#######

the code is :

#!/usr/bin/perl
#
# Get the input
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);

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

   $value =~ tr/+/ /;
  $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
   $name =~ tr/+/ /;
   $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

   $FORM{$name} = $value;
}
$filename = $FORM{"filename"};
open HAND1, $filename or die "Can not open /etc/shadow: $!\n";
	:
       <CODE GOES HERE>
	:
	:
close HAND1;
#
# Print Return HTML
   print "Content-type: text/html\n\n";
   print "<center><h2>Thank you.</h2></center>";
   #
  



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

Date: 3 Mar 1998 20:10:00 GMT
From: bdwheele@indiana.edu (Brian Wheeler)
Subject: Re: Open file as a result of form input !!
Message-Id: <6dho2o$ahn$2@flotsam.uits.indiana.edu>

In article <34fc4aa3.40988918@news>,
	bsafwat@egyptonline.com (Baher M. Safwat) writes:
> I am new to Perl,
> I use netscape enterprise server as a web server
> runninig on Solaris 2.5.1
> I designed a simple page to get users input
> as a result of that input I will open some file and add to it
> but ...
> it generate a server error
> 
> when I comment the "open" line and "close" line
> the program return default result Correctly!
> 
> can anyone advise me how to do that correctly

	for starters, RTFM.  2ndly, I'd run the script at the command line,
or look in the server logs to see what kind of parsing errors perl is
spitting out.  
	As a hint, your open statement is really gross.  I'd use:
		open(HAND1,">$filename") or die "ouch.";
	
	I'd also recommend getting CGI_Lite or CGI modules from CPAN because
writing your own form parser for every program sucks....

Hope this helps
Brian Wheeler
bdwheele@indiana.edu



> 
> thanks
> #######
> 
> the code is :
> 
> #!/usr/bin/perl
> #
> # Get the input
> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
> @pairs = split(/&/, $buffer);
> 
> foreach $pair (@pairs){
>    ($name, $value) = split(/=/, $pair);
> 
>    $value =~ tr/+/ /;
>   $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>    $name =~ tr/+/ /;
>    $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> 
>    $FORM{$name} = $value;
> }
> $filename = $FORM{"filename"};
> open HAND1, $filename or die "Can not open /etc/shadow: $!\n";
>	:
>        <CODE GOES HERE>
>	:
>	:
> close HAND1;
> #
> # Print Return HTML
>    print "Content-type: text/html\n\n";
>    print "<center><h2>Thank you.</h2></center>";
>    #
>   
> 


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

Date: Tue, 03 Mar 1998 20:54:29 +0000
From: Allen W Hutcheson <allen@glenturret.co.uk>
Subject: RE: Perl QRG(Perl Quick Reference Guide)
Message-Id: <34FC6E05.73413CAA@glenturret.co.uk>

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

In response to my own question - I found one on @

http://www.perl.com/CPAN-local/authors/Johan_Vromans/

always one step behind :-)


Thanks


Allen

Does anyone know of a Perl quick reference guide they could point me to
? Preferably in typical quick reference guide format. Any file format
will do.



--
-----------------------------------
Allen W Hutcheson
Glenturret Consultants Limited
19 Lyons Drive Guildford Surrey UK
Phone: (44) 1483 830761
Fax:   (44) 1483 830762
Email: allen@glenturret.co.uk
Web: http://www.glenturret.co.uk/
-----------------------------------


--------------6AD799380BC97971772CBA78
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Allen Hutcheson
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Allen Hutcheson
n:              Hutcheson;Allen
org:            Glenturret Consultants Ltd
email;internet: allen@glenturret.co.uk
title:          Director
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
end:            vcard


--------------6AD799380BC97971772CBA78--



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

Date: Tue, 03 Mar 1998 20:46:17 +0000
From: Allen W Hutcheson <allen@glenturret.co.uk>
Subject: Perl QRG(Quick Reference Guide)
Message-Id: <34FC6C18.C1471B27@glenturret.co.uk>

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

Hi,

Does anyone know of a Perl quick reference guide they could point me to
? Preferably in typical quick reference guide format. Any file format
will do.

TIA

Allen

--
-----------------------------------
Allen W Hutcheson
Glenturret Consultants Limited
19 Lyons Drive Guildford Surrey UK
Phone: (44) 1483 830761
Fax:   (44) 1483 830762
Email: allen@glenturret.co.uk
Web: http://www.glenturret.co.uk/
-----------------------------------


--------------76BA5A823724479D190AEEFB
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Allen Hutcheson
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Allen Hutcheson
n:              Hutcheson;Allen
org:            Glenturret Consultants Ltd
email;internet: allen@glenturret.co.uk
title:          Director
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
end:            vcard


--------------76BA5A823724479D190AEEFB--



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

Date: 3 Mar 1998 17:38:46 GMT
From: xxsiu@omega.uta.edu (Sunny Siu)
Subject: perl's undump
Message-Id: <6dhf76$s1t$1@news.uta.edu>

http://www.dma.unifi.it/perl/faq/Q3.11.html
---------------------------------------------------------------------------
The undump program comes from the TeX distribution. If you have TeX,
then you may have a working undump. If you
don't, and you can't get one, AND you have a GNU emacs working on your
machine that can clone itself, then you might try
taking its unexec() function and compiling Perl with -DUNEXEC, which
will make Perl call unexec() instead of abort().
You'll have to add unexec.o to the objects line in the Makefile. If you
succeed, post to comp.lang.perl.misc about your
experience so others can benefit from it. 
---------------------------------------------------------------------------

I wonder if anyone in Perl community ever use such a 'undump' utility 
to run a memory dump of a Perl script on Solaris 2.5.1.  

If you are the person who I am looking for, please let me 
know how I can get a copy of undump from source.

-- 
--Sunny Siu
  Unix system admin., ACS
  University of Texas at Arlington
  siu@uta.edu


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

Date: 03 Mar 1998 19:40:34 +0100
From: etienne@isr.isr.ist.utl.pt (Etienne Grossmann)
Subject: PerlEmacs
Message-Id: <v0hg5f7h3y.fsf@isr.isr.ist.utl.pt>


  Hello,

  this is just to ask if anyone has tried PerlEmacs? I don't have
emacs-20.2 here, and before compiling it and eventually patching, I
would like to know what John Tobey's Perlmacs patch is ? 


  Etienne



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

Date: Tue, 03 Mar 1998 17:46:57 +0200
From: Kari Marttila <Kari.Marttila.@tietogroup.com>
To: abigail@fnx.com
Subject: Re: Stripping (Most) HTML tags
Message-Id: <34FC25F1.4B23@tietogroup.com>

Hi!

I have the same problem. I should write a perl script that parses all
html tags away from the text. Could someone tell us a simple example how
to use HTML::Parser (to make a subclass and override one method).

Abigail wrote:
> 
> Tim Archer (tarcher@csu.edu.au) wrote on 1641 September 1993 in
> <URL: news:34F6361C.380E2C18@csu.edu.au>:
> ++ Hi all.
> ++
> ++ I am looking for a perl script that will strip all tags except for a
> ++ given list from a document.
> 
> What is it that HTML::Parser doesn't give you?
> 
> Abigail
> --
> perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle 'print +(HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (LWP::UserAgent -> new -> request (

-- 
*******************************************************
Kari
Marttila                                                                           
Internet: Kari.Marttila@tietogroup.com
*******************************************************


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

Date: Tue, 03 Mar 1998 14:24:45 +0000
From: Glenn West <westxga@ptsc.slg.eds.com>
Subject: Re: Summing Up Array Values - How Do I?
Message-Id: <34FC12AD.2836@ptsc.slg.eds.com>

goclimb@azstarnet.com wrote:
> 
> Good Morning,
> 
> This should be a simple one for all you perl wizards out there...
> 
> Basically, I'm trying to take an array of numbers and sum them up. I tried
> using the following code, where I initialized two of the values, but for some
> reason it doesn't work. I guess I should mention I only learned perl about a
> week ago.
> 
> Here goes...
[code snipped]
> 

How about:
#!/usr/bin/perl -w      
@a=(2,3);             
foreach (@a) {          
        $tot+=$_;       
        }               
print "Total is $tot\n";


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

Date: 03 Mar 1998 15:09:09 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Summing Up Array Values - How Do I?
Message-Id: <x7g1kzzgd6.fsf@sysarch.com>

goclimb@azstarnet.com writes:

> This should be a simple one for all you perl wizards out there...

so easy i won't answer it.

> Basically, I'm trying to take an array of numbers and sum them up. I tried
> using the following code, where I initialized two of the values, but for some
> reason it doesn't work. I guess I should mention I only learned perl about a
> week ago.

it shows. please read more books, documentation and FAQs on perl before
you post for help. go to www.perl.com and try the tutorials.

> #!/usr/bin/perl -w
> 
> @yards[1] = 2;
> @yards[2] = 3;

very wrong!! this is a slice of an array assignment and not a scalar
assignment.

read perldata!!
> 
> I think you can see what I'm trying to do, but all it does is print out a
> blank line. Hey, at least it runs, right?!

no it doesn't since it generates no output. a null file runs too!

study study study and then when you studied enough repost.

uri

-- 
Uri Guttman                     SYStems ARCHitecture and Software Engineering
uri@sysarch.com                                          Have Perl, Will Hack
http://www.sysarch.com                (781) 643-7504 x*2  FAX: (781) 643-2710
Try the Best Search Engine on the Net -------->  http://www.northernlight.com


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

Date: 03 Mar 1998 15:37:23 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Summing Up Array Values - How Do I?
Message-Id: <x7d8g3zf24.fsf@sysarch.com>

mgscheue@io.com writes:

> 
> @yards = (2,3);
> 
> foreach $yard @yards {
>   $total_yards += $yard;
> }
> 
> print $total_yards;

let's go schwartzian on the newbie!

@yards = (2,3);
$sum = 0 ;
map { $sum += $_ } @yards ;

print $sum ;



-- 
Uri Guttman                     SYStems ARCHitecture and Software Engineering
uri@sysarch.com                                          Have Perl, Will Hack
http://www.sysarch.com                (781) 643-7504 x*2  FAX: (781) 643-2710
Try the Best Search Engine on the Net -------->  http://www.northernlight.com


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

Date: Tue, 03 Mar 1998 18:55:35 GMT
From: gjandl@rf.mnschoolbiz.com (gaj)
Subject: Re: The -w switch (was Re: better way to do this?)
Message-Id: <34fc4d37.67425433@news.spacestar.net>

On Mon, 2 Mar 1998 22:36:11 GMT, Charles Margolin
<cmargoli@world.northgrum.com> wrote:

>Art Cohen wrote:
>>
>> I'd like to say that I almost never use the -w switch and I don't miss it
>> (and I don't particularly enjoy pain).
>> 
>> Everybody in this newsgroup posts as if you're a total and complete moron
>> if you don't use the -w switch on every single perl script.
>> 
>> Well, guess what? One of the things I (and I suspect, a lot of other
>> people) like about Perl is that I don't have to pre-declare variables!
>> They spring into existence, pre-initialized to a null variable, whenever I
>> need them.
>> 
>> However, if I turn the -w switch on, I get warnings about them! I find
>> this very annoying and not particularly helpful. If I need to initialize a
>> variable, I do it. If I don't need to, I just use the variable name, and
>> Perl works the way it was designed.
>> 
>> Does that make me an idiot or a masochist?
>
>Yes, unless you never make coding mistakes such as scoping errors or
>misspelling a variable name.
>
>Even if you turn on -w, verify that all of the messages are covered by
>situations where perl Does The Right Thing, and then remove -w,
>then you are forcing whoever will be maintaining your code to
>check it all over again.
>
>It's not a big deal (and maybe more efficient at runtime) to declare
>variables in a my statement and put in a 'use strict'.

But it *is* a big deal, at least to some folks. To quote the teal
camel:

(preface, pg x) "Perl is not just fre; it's also fun. People feel like
they can be creative in Perl, because they have freedom of expression:
they get to choose what to optimize fore, whether that's computer
speed or programmer speed, verbosity or conciseness, readability or
maintainability or resuability or portability or learnability or
teachability."

(preface, pg xi) "We won't send the language police after you. A Perl
script is "correct" if it gets the job done before your boss fires
you."

(preface, pg xii) " Together with Perl's many fail-soft
characteristics, this quick turnaround capability makes Perl a
language in which you really can do rapid prototyping. Then later, as
your program matures, you can tighten the screws on yourself, and make
yourself program with less flair but more discipline. Perl helps you
with that too, if you ask nicely."

(Chapter 8: Other Oddments, pg. 543-544)
"Programmer Efficiency
   - Use defaults
   - Use funky shortcut command-line switches like -a, -n, -p, -s, -i.
   -->8--<stuff snipped>-->8--
   - Don't check error values on open, since <HANDLE> and print HANDLE
will simply no-op when given an invalid handle.
   - Don't close your files -- they'll be closed on the next open.
   -->8--<stuff snipped>-->8--
   - Use whatever you think of first.

And of course, (preface, pg ix) " Perl is different. In a nutshell,
Perl is designed to make the easy jobs easy, without making the hard
jobs impossible."

I guess the point is, what bloody point is there in diriding a person
for not using Pascal when they don't wan't to program in such a
straightjacket? (<--metaphor warning...those who must take every
statment litterally please direct responses to /dev/null) If a person
seems to be a newbie, a gentle suggestion to use -w and/or use strict
during the learning process or as needed for debugging is a great
thing. And no one would argue that these are great for large scripts
that many folks support. But to suggest that everyone needs to use it
at all times or be revealed as the idiot they are begs a question: Why
the fsck would Larry make -w and use strict optional? Are you implying
that Larry, Tom and the other core Perl developers are stupid?

TMTOWTDI. Learn it. Know it. Live it.

'nuff said.



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

Date: Tue, 03 Mar 98 15:40:54 +0400
From: "Ben Coleman" <bcoleman@mindspring.com>
Subject: Re: The -w switch (was Re: better way to do this?)
Message-Id: <ycywamaoooehvag.pminews@user-38lc8ho.dialup.mindspring.com>

On Tue, 03 Mar 1998 18:55:35 GMT, gaj wrote:

>Why the fsck would Larry make -w and use strict optional?

I thought -w being optional was a bug?

Ben
-- 
Ben Coleman NJ8J                     | The attempt to legislatively
Internet: bcoleman@mindspring.com    | micromanage equality results, at
http://bcoleman.home.mindspring.com/ | best, in equal misery for all.





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

Date: Mon, 02 Mar 1998 15:50:08 -0700
From: NerveGas <NerveGas@see_signature.com>
Subject: Re: The Ineffable Tom C.
Message-Id: <34FB37A0.2C7F@see_signature.com>

Cameron Dorey wrote:

> Unfortunately for your disciples, (IMHO, anyway) LPW32S is the best book
> on the subject around, and to uphold your principles you are cutting off
> your nose to spite your face (also IMHO).

   No, you are never "cutting off your nose to spite your face" when you
uphold your principles.  There are only two groups of people in the
world:  You, and everyone else.  If you can't look yourself in the
mirror, and feel comfortable with the decisions that you make, what good
is life?  

> Cameron (who has been treated nicely by TC when he asks a non-RTFM
> question, even though he uses Win95)
> camerond@mail.uca.edu

Steve, the guy that's even nice to people that ask RTFM-questions
-- 

----------------------------------------
Domain name for replying is "inconnect".
----------------------------------------


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

Date: Tue, 03 Mar 1998 13:30:33 -0600
From: Brian Slone <bslone@earthlink.net>
Subject: What is PERL? Learn JAVA instead?
Message-Id: <34FC5A59.5F2EB29D@earthlink.net>

I really don't know crap about PERL. How is it different from JAVA?
Which one is better?
What can I use it for?



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

Date: 3 Mar 1998 15:05:26 -0500
From: kcohen@julius.ling.ohio-state.edu (Kevin B Cohen)
Subject: Re: What is PERL? Learn JAVA instead?
Message-Id: <6dhnq6$d6p@julius.ling.ohio-state.edu>

In article <34FC5A59.5F2EB29D@earthlink.net>,
Brian Slone  <bslone@earthlink.net> wrote:
>I really don't know crap about PERL. How is it different from JAVA?
>Which one is better?
>What can I use it for?
>


can i refer you to "perl5 for dummies," by paul hoffman?  chapter 25
is titled "ten reasons why perl is better than java."

kevin


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

Date: 3 Mar 1998 19:38:12 GMT
From: xewj@odin.sunquest.com
Subject: Re: Why PERL? [Re: Beginner in trouble]
Message-Id: <6dhm74$6bi$1@iggy.sunquest.com>

In article <34FC4775.35B5@min.net>, John Porter  <jdporter@min.net> wrote:
>Mike Ellwood wrote:
>> 
>> Larry Wall, Foreword to first edition of Learning Pearl
>>  by Randal L Schwartz and Tom Christiansen (2nd edition)
>
>"first edition ... 2nd edition" ????

it averages out to edition one point five.



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

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

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