[6954] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 579 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 6 04:07:23 1997

Date: Fri, 6 Jun 97 01:00:35 -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           Fri, 6 Jun 1997     Volume: 8 Number: 579

Today's topics:
     Re: (URGENT HELP!) Formating to SendMail <richard@ccis.adisys.com.au>
     [REQ] WinWord & Exel to HTML or TXT convertor. (Nicholas N. Matveev)
     Re: any editor for perl? <usenet-tag@qz.little-neck.ny.us>
     AUTO-RESPONDER PERL SCRIPT - Sorry for shouting, will t (KJF)
     Re: AUTO-RESPONDER PERL SCRIPT - Sorry for shouting, wi (Andrew Starr)
     call perl script from c program? <xuc@bayfront.org>
     call perl script in c program? <xuc@bayfront.org>
     Re: EBCDIC and Perl (Greg Zevin)
     Re: Error in openning a file ... (Dennis Marti)
     Re: Error in openning a file ... <ajohnson@gpu.srv.ualberta.ca>
     Re: Error in openning a file ... (Chipmunk)
     Re: Error in openning a file ... <ajohnson@gpu.srv.ualberta.ca>
     Re: Finding string length (Chipmunk)
     Re: Finding string length (Chipmunk)
     Re: Help for "date" <ray@icix.net>
     Re: How do you print out only the <tags> in an sgml or  (Tad McClellan)
     HTML Output from Perl (Graham Daniell)
     HTML Output from Perl (Graham Daniell)
     Re: HTML Output from Perl (Andrew Starr)
     Re: HTML Output from Perl (Abigail)
     Re: Is It Possible to Call  the HALT Function in a Perl <rra@stanford.edu>
     Perl 5.004 configure problem before Linux compile <rjberman@mindspring.com>
     Re: Perl5 garbage collection too lazy? <s-max@pacbell.net>
     Re: RegExp tutorial suggestions? <usenet-tag@qz.little-neck.ny.us>
     Re: Second perl book (Bob Wilkinson)
     Re: Suggestion to all frequent posters/answerers (me to (chmod 666)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 6 Jun 1997 04:41:58 GMT
From: "Richie !" <richard@ccis.adisys.com.au>
To: synchro@logos.cy.net
Subject: Re: (URGENT HELP!) Formating to SendMail
Message-Id: <33979516.794BDF32@ccis.adisys.com.au>

A. Kello wrote:
> 
> (URGENT HELP!) Formating to SendMail
> 
> Hi there,
> 
> I'm new to PERL ,can someone please help me with this one:
> I'm trying to send a sort of a columnar report EMail through
> sendmail,but the results are anything but columnar!. I tried FORMAT but
> that doesn't even output any thing and with 'printf()' it doesn't
> display as its counterpart in C , the manual of Perl5 says that 'printf'
> is an exact match for C's  printf. (please Help)
> 
> I'm trying to send something like this:
> 
> Column1               Column2
> ----------------------------------------------
> $dummy1               $dummy2
> 
> I used :     printf (MAIL,"%-40s %10s\n"$dummy1,$dummy2) ;
> 
> Thanks in advance
> 
> A.Kello
> synchro@logos.cy.net

Instead of:

printf (MAIL,"%-40s %10s\n"$dummy1,$dummy2) ;

try:

printf (MAIL,"%-40s %-10s\n", $dummy1, $dummy2);

-- 
Cheers,
Richie !

=====================================================================
From:   Richard Leclair            | You are only young once, but you
        Software Library Manager,  | can stay immature indefinitely.
        ADI Limited.  (Perth, WA)  |---------------------------------
Tel:    (08) 9333 8888  ext. 823   | "Be careful of reading health
Fax:    (08) 9333 8889             | books, you might die of a
E-mail: richard@ccis.adisys.com.au | misprint."     -- Mark Twain
---------------------------------------------------------------------
    o  \ o / _ o        __|    \ /     |__        o _ \ o /  o 
   /|\   |    /\   __\o   \o    |    o/    o/__   /\    |   /|\
   / \  / \  | \  /) |    ( \  /o\  / )    |  (\  / |  / \  / \
=====================================================================


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

Date: 06 Jun 1997 14:09:42 +0700
From: nick@nickm.nsk.inkom.ru (Nicholas N. Matveev)
Subject: [REQ] WinWord & Exel to HTML or TXT convertor.
Message-Id: <m3soyw5hs8.fsf@nickm.nsk.inkom.ru>


Help me!  I'm looking for this scripts.

Mailto: nick@nickm.nsk.inkom.ru  


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

Date: 6 Jun 1997 04:40:26 GMT
From: Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
Subject: Re: any editor for perl?
Message-Id: <5n84bq$6ae$1@news.netusa.net>

Ron Olsen <ronolsen@lucent.com> wrote:
> > Matthew H. Gerlach
> > For me, my needs are best met with vi.
> Very likely they'd be far better met with vim.

Yeah, probably, but I don't think vim gets hard copy (hc in termcap,
should you want to try) terminals right yet. And the implementation
of z windows (useful for speeding screen updates over slow links)
leaves much to be desired.

And if you really want to see inefficient processing, try (^H is
backspace, ^[ is escape):

iaaaaaaaaaa^H^H^H^H^H^H^H^H^Hbbbbbbbbbb^H^H^H^H^H^H^H^H^H^[.........

Don't try that on a 300baud connection to a type 33 teletype.
You might not even want to try it on a 2400 baud vt100.

Elijah
------
crossposted to further propagation of followups


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

Date: Fri, 06 Jun 1997 02:29:03 GMT
From: webmaster@nexus.isp.com.au (KJF)
Subject: AUTO-RESPONDER PERL SCRIPT - Sorry for shouting, will trade :-)
Message-Id: <3397758a.12100828@news.mel.aone.net.au>

I was after a place where there is a catalogue...or assistace with an
autoresponer perl script....

Will trade!!!



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

Date: Fri, 06 Jun 1997 00:44:31 -0600
From: atstarr@seebelow.com (Andrew Starr)
Subject: Re: AUTO-RESPONDER PERL SCRIPT - Sorry for shouting, will trade :-)
Message-Id: <atstarr-0606970044320001@max06-48.qni.com>

In article <3397758a.12100828@news.mel.aone.net.au>,
webmaster@nexus.isp.com.au (KJF) wrote:

> I was after a place where there is a catalogue...or assistace with an
> autoresponer perl script....
> 
> Will trade!!!

http://www.amherst.edu/~atstarr/computers/vacation.html -- I didn't write it.

-- 
Andrew Starr  atstarr (punctuation) amherst (punc) edu
http://www.amherst.edu/~atstarr/eudora has my unoff. Eudora Site
http://www.amherst.edu/~atstarr/eudora/faq.html by Hank Zimmerman
I have no connection to Qualcomm other than being a happy customer!


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

Date: Thu, 05 Jun 1997 14:06:02 -0400
From: Chun Xu <xuc@bayfront.org>
Subject: call perl script from c program?
Message-Id: <3397000A.517A@bayfront.org>

I have two cgi programs, one written in c, another in perl.  Now, the C
program needs to use a subroutine in the perl script.  Is it possible to
call the perl script in the c program?    

Thanks a lot.

--Chun Xu


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

Date: Thu, 05 Jun 1997 14:20:01 -0400
From: Chun Xu <xuc@bayfront.org>
Subject: call perl script in c program?
Message-Id: <33970351.5A9F@bayfront.org>

I have two cgi programs, one written in perl, another in c.  Now, the c
prgram need to use a subroutine in that perl script?  Is it possible to
call a perl script in a c program?  If so, how?

Thanks a lot.

--chun xu


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

Date: 5 Jun 1997 15:11:12 +1000
From: greg@turing.une.edu.au (Greg Zevin)
Subject: Re: EBCDIC and Perl
Message-Id: <5n5hpg$mne@turing.une.edu.au>

Daniel Honig <liquid@izzy.net> writes:

>Has anyone seen or written a perl script to convert
>between EBCDIC and ASCII?

>Or if nothing else a reference page on the web for EBCDIC?

>Thanks!

> Daniel Honig

Daniel, I wrote EBCDIC<->ASCII scripts, but they
were written for  specific purpose and are a part of Y2K
conversion system. However, I saw a generic script somewhere on the
Web. To the search yourself, in unsuccessful, let me know and I'll serach for you :))


Greg


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

Date: 6 Jun 1997 02:39:50 GMT
From: marti@netrail.net (Dennis Marti)
Subject: Re: Error in openning a file ...
Message-Id: <5n7t9m$oun$1@skipper.netrail.net>

Jot Powers (jot@tmp.medtronic.com) wrote:
: [*snip*]

[*snip*]

: >@QUOTES = <Quotes>;
: >$QUOTE = rand @QUOTES;
: >system "cat /$QUOTES[$QUOTE]  >  /quote.txt";

: Your next line is an attempt to access $stuff[2.xxxx].  A fractional index
: to an array isn't going to work. 

Yes it will. Try either one of these:

    perl -le 'print $INC[1.9]'
    perl -le 'print $INC[ rand @INC ]'

: So, what's the problem?  Your understanding of rand() is off.

:      rand EXPR

: Notice, it says EXPR not ARRAY.  So, you want to change that and

Your understanding of EXPR is off.

The fatal problem with the original script (and this was in the error
message provided) was the use of a quote instead of a filename to cat.
(Look for the easy answers first. ;)

Marti



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

Date: Thu, 05 Jun 1997 20:34:56 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Error in openning a file ...
Message-Id: <33976940.4C45D72D@gpu.srv.ualberta.ca>

Daneshjoo wrote:
> 
> Hi :
> 
[snip]
> 
> #!/usr/local/bin/perl  -w
> 
> open (Quotes, "quotes_friends") || die $!;
> @QUOTES = <Quotes>;
> srand;
> $QUOTE = rand @QUOTES;
> 
> system "cat /$QUOTES[$QUOTE]  >  /quote.txt";
> 
> It gives me the error message "can't open /[Here is prints one of the
> lines of the file by random]".  Could it be because of the "wide lines" or
> is it some thing else?  Could some one please help me? TIA

something else...the cat here is expecting a filename and
gets a little bummed out when the argument doesn't turn out
to be a valid file...you don't need the system command here
at all...either open a new file "quote.txt" for writing
and print to it... or just print to STDOUT and redirect
to a file from the command line:
ie; change the last line to be
print $QUOTES[$QUOTE];
and run it from the c-line as (calling it quotes perchance?)
quotes quotes_friends > quote.txt

and maybe don't use the same word with only minor changes
in spelling or capitalization to name every identifier/handle
and file (just a thought) :-)

regards
andrew


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

Date: 6 Jun 1997 05:17:59 GMT
From: Ronald.J.Kimball@dartmouth.edu (Chipmunk)
Subject: Re: Error in openning a file ...
Message-Id: <5n86i7$9li$2@dartvax.dartmouth.edu>

In article <Pine.OSF.3.95.970605160510.12513A-100000@engunx.unl.edu>
Daneshjoo <eermmb@engunx.unl.edu> writes:

> system "cat /$QUOTES[$QUOTE]  >  /quote.txt";
> 
> /////////////////////////////////////////////////////////////////
> \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
> 
> It gives me the error message "can't open /[Here is prints one of the
> lines of the file by random]".  Could it be because of the "wide lines" or
> is it some thing else?  Could some one please help me? TIA

The problem is the call to cat.  The argument to the system command cat
is a filename, so you are trying to open the file that has as its name
whatever random quote you selected.
(Try typing
cat blahblahblah
at the command line.)

Instead of using system, write the quote to the file yourself.

open(QUOTE, ">quote.txt") || die "Unable to open /quote.txt for output:
$!";
print QUOTE $QUOTES[$QUOTE];
close(QUOTE);

Chipmunk


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

Date: Thu, 05 Jun 1997 23:48:01 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Error in openning a file ...
Message-Id: <33979681.A15CED5@gpu.srv.ualberta.ca>

Jot Powers wrote:
! 
! [*snip*]

[snip]

! node127% perl -de 1
! 
! Loading DB routines from perl5db.pl version 1 Emacs support
! available.
! 
! Enter h or `h h' for help.
! 
! main::(-e:1): 1 DB<1> open (FILE,'/tmp/xx') or die "$!\n";
! 
!  DB<2> @stuff = <FILE>;
! 
!  DB<3> srand
! 
!  DB<4> $stuff = rand @stuff
! 
!  DB<5> p $stuff 2.268310546875
! 
! This should be your clue that something is terribly wrong.
! The value of $stuff is 2.2XXX.
! 
! Your next line is an attempt to access $stuff[2.xxxx].  A
! fractional index to an array isn't going to work.

actually, had you taken the next step in
your demonstration you'd have found that
fractional indices are dealt with in
an most reasonable fashion:

[danger:ajohnson:~]$ perl -de 1

Loading DB routines from perl5db.pl version 1
Emacs support available.

Enter h or `h h' for help.

main::(-e:1):   1
  DB<1> @stuff=qw(what the heck is this);

  DB<2> srand

  DB<3> $stuff=rand @stuff;

  DB<4> print $stuff
0.326272959355265
  DB<5> print $stuff[$stuff]
what
  DB<6> $stuff=rand @stuff

  DB<7> p $stuff
1.03085323236883
  DB<8> p $stuff[$stuff]
the

! So, what's the problem?  Your understanding of rand() is off.
! 
! node127% man perlfunc
! Reformatting page.  Wait... done
! ...
!      rand EXPR
!  
!      rand    Returns a random fractional number between 0
!              and the value of EXPR. (EXPR should be
!              positive.) If EXPR is omitted, returns a value
!              between 0 and 1.  Automatically calls srand()
!              unless srand() has already been called.  See
!              also srand().
! 
! Notice, it says EXPR not ARRAY.  So, you want to change that
! and you need to round the result (see the FAQ on rounding)

perhaps your understanding of EXPR is off:
@array in scalar context returns the number of elements
in the array---and since $array[$index] uses int($index)
for fractional indices, $index=rand @array seems a perfectly
reasonable way to get a random index into the array.

the problem with the original, had to do with the
system call to 'cat'.

regards
andrew


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

Date: 6 Jun 1997 05:38:01 GMT
From: Ronald.J.Kimball@dartmouth.edu (Chipmunk)
Subject: Re: Finding string length
Message-Id: <5n87np$knk$1@dartvax.dartmouth.edu>

In article <33970279.3F54@ibmoto.com>
Jerry Monsen <jerrym@ibmoto.com> writes:

> Chipmunk wrote:
> > 
> > In article <Pine.OSF.3.96.970604191007.5593B-100000@alf2.tcd.ie>
> > Kieran Tully <tullyk@tcd.ie> writes:
> > 
> > > How can I find the length of a string (or more particularly a line) in
> > > Perl ?
> > 
> > $i = -1;
> > $i++ while (defined substr($string, $i+1, 1));
> > $length = $i;
>
> Um, this is a little easier:
> 
> $length = length($string);

And a lot less interesting.  ;-)

$tmpfile = "length.tmp";
open(TEMP, ">$tmpfile") || die "Unable to open $tmpfile: $!";
foreach (split(//, $string)) {
    print TEMP "\n";
}
close(TEMP);
open(TEMP, "<$tmpfile") || die "Unable to open $tmpfile: $!";
1 while(<TEMP>);
$length = $.;
close(TEMP);
unlink $tmpfile;

Chipmunk


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

Date: 6 Jun 1997 05:00:36 GMT
From: Ronald.J.Kimball@dartmouth.edu (Chipmunk)
Subject: Re: Finding string length
Message-Id: <5n85hk$9li$1@dartvax.dartmouth.edu>

In article
<Pine.GSO.3.96.970605121229.14730D-100000@kelly.teleport.com>
Tom Phoenix <rootbeer@teleport.com> writes:

> On 5 Jun 1997, Chipmunk wrote:
> 
> > Kieran Tully <tullyk@tcd.ie> writes:
> > 
> > > How can I find the length of a string (or more particularly a line) in
> > > Perl ?
> > 
> > $i = -1;
> > $i++ while (defined substr($string, $i+1, 1));
> > $length = $i;
> 
> Stop that! This person really wanted to know. If you're going to give a
> joke answer, Usenet Rule #42 requires you to include a smiley "or
> equivalent emoticon such as to show the tyro that the response is intended
> as humorous and not intended to be used." 

Thhhpppbbbttt!  This person should be able to figure out the most
reasonable answer from the 10 other responses to his question,
regardless of whether I've included a smiley in my post.

> (And your code doesn't give a reliable answer.) 

How so?

Chipmunk


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

Date: Wed, 04 Jun 1997 15:55:33 -0400
From: Ramon Castillo <ray@icix.net>
To: John Bokma <jbokma@caiw.nl>
Subject: Re: Help for "date"
Message-Id: <3395C835.7828@icix.net>

I've been using this instruccion with Solaris you can try it in your
system:

>perl -e 'print (`date '+%y%m%d'`);'

If it works, go to man date, for more details.


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

Date: Thu, 5 Jun 1997 22:02:05 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: How do you print out only the <tags> in an sgml or html file.
Message-Id: <dju7n5.c5c.ln@localhost>

John Kalogridis (jkalogri@thomtech.com) wrote:

: I need to print out only the tags in an SGML file with each tag in a line
: by itself.

: A tag is anything enclosed between the angle brackets <>.

: There are no nested tags.

: In the following line of text:

: 	sample text <tag1>sample text</tag2> sample text

: the output should be:

: 	<tag1>
: 	</tag2>

: The phrase: 
: 	<tag1>sample text</tag2>

: should not match even though it begins with a "<" and ends with a ">"

: I wrote the following perl script but it doesn't work:

: while (<>)
: {
:  print("$&\n") if m/(\<.+\>)/g;
: }


print("$1\n") while m/(<.+?>)/g;

1) using $& _anywhere_ in your script slows down _all_ pattern
   matches in your script. I never use it. Stick parens in, and
   use $1, $2, ...

2) you want "while" so that more than one can be printed.

3) you want "non-greedy" matching (but you really don't. See #4 ;-)

4) non-greedy matching is often slower, so I avoid that whenever
   possible too:

print("$1\n") while m/(<[^>]+>)/g;


: I've searched the news groups and looked through perl books to find
: something similar but was not able to find it.  Any help will be
: appreciated.

: Thanks in advance.

You're welcome.


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Thu, 05 Jun 1997 13:43:24 GMT
From: gdaniell@wt.com.au (Graham Daniell)
Subject: HTML Output from Perl
Message-Id: <3396c26c.1928532@news.wt.com.au>

Hi,

I am an absolute beginner with PERL, trying to learn it and discover
how it works.  I have the book " Intriduction to CGI/Perl" by Brenner
& Aoki.  In it they give an example of a Perl program as follows:
---------------------------
#!/usr/ucb/perl

print "Content-type: text/html\n\n";

print "<html>\n";
print "<head>\n";
print "<title>Hello World with Perl</title>\n;
print "</head>\n";
print "<body>\n";
print "<h1>Hello World</h1>\n";
print "</body>\n";
print "</html>\n";
------------------------
 I have typed this in as ptest.cgi, and done chmod 777 ptest.cgi on
it.  My question is: ...
How do I call this script from a HTML page in order to get it to
return the "Howdy World" to the browser?

Any help will be much appreciated.

Graham Daniell
Perth, Western Australia
gdaniell@wt.com.au


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

Date: Thu, 05 Jun 1997 13:54:38 GMT
From: gdaniell@wt.com.au (Graham Daniell)
Subject: HTML Output from Perl
Message-Id: <3396c51a.2615177@news.wt.com.au>

Hi,

I am an absolute beginner with PERL, trying to learn it and discover
how it works.  I have the book " Intriduction to CGI/Perl" by Brenner
& Aoki.  In it they give an example of a Perl program as follows:
---------------------------
#!/usr/ucb/perl

print "Content-type: text/html\n\n";

print "<html>\n";
print "<head>\n";
print "<title>Hello World with Perl</title>\n;
print "</head>\n";
print "<body>\n";
print "<h1>Hello World</h1>\n";
print "</body>\n";
print "</html>\n";
------------------------
 I have typed this in as ptest.cgi, and done chmod 777 ptest.cgi on
it.  My question is: ...
How do I call this script from a HTML page in order to get it to
return the "Howdy World" to the browser?

Any help will be much appreciated.

Graham Daniell
Perth, Western Australia
gdaniell@wt.com.au


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

Date: Fri, 06 Jun 1997 00:42:59 -0600
From: atstarr@seebelow.com (Andrew Starr)
Subject: Re: HTML Output from Perl
Message-Id: <atstarr-0606970043000001@max06-48.qni.com>

You want to put ptest.cgi in your public_html (or whatever directory you
usually put your html files in) directory and then call it as
http://www.example.com/ptest.cgi or
http://www.example.com/gdaniell/ptest.cgi
or something like that.

In other cases, you can call a script from an html file by using a form
with get or post. I suppose you could do that here too, but since there
are no variables referred to in the script, you should just call it from
your browser.

-Andrew

In article <3396c51a.2615177@news.wt.com.au>, gdaniell@wt.com.au wrote:

> I am an absolute beginner with PERL, trying to learn it and discover
> how it works.  I have the book " Intriduction to CGI/Perl" by Brenner
> & Aoki.  In it they give an example of a Perl program as follows:
> ---------------------------
> #!/usr/ucb/perl
> 
> print "Content-type: text/html\n\n";
> 
> print "<html>\n";
> print "<head>\n";
> print "<title>Hello World with Perl</title>\n;
> print "</head>\n";
> print "<body>\n";
> print "<h1>Hello World</h1>\n";
> print "</body>\n";
> print "</html>\n";
> ------------------------

-- 
Andrew Starr  atstarr (punctuation) amherst (punc) edu
http://www.amherst.edu/~atstarr/eudora has my unoff. Eudora Site
http://www.amherst.edu/~atstarr/eudora/faq.html by Hank Zimmerman
I have no connection to Qualcomm other than being a happy customer!


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

Date: Fri, 6 Jun 1997 07:07:13 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: HTML Output from Perl
Message-Id: <EBCEG1.ABK@nonexistent.com>

Graham Daniell (gdaniell@wt.com.au) wrote on 1374 September 1993 in
<URL: news:3396c51a.2615177@news.wt.com.au>:
++
++ How do I call this script from a HTML page in order to get it to
++ return the "Howdy World" to the browser?

<URL:http://www.w3.org/MarkUp/html-spec/html-spec_7.html#SEC7>

You might also want to look into the manual of your server, on how to
configure that programs are being run. How knows, your server might use
CGI. If your server uses CGI, and you have more questions, I would
normally recommend the newsgroup comp.infosystems.www.authoring.cgi;
but since you can't post something only once, you better not post
again. Untill you have mastered your newsreader.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$=new Math::BigInt+qq;$$783$[$%9889$47$|88768$596577669$%$5$3364$[$$$|838747$[8889739$%$|$673$%$98$76777$=56;;$=$]*(q.25..($=@))=>do{print+chr$%$;$/=$}while$!=$'


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

Date: 05 Jun 1997 23:48:34 -0700
From: Russ Allbery <rra@stanford.edu>
To: $j,u?OE" <swsung.bbs@cis.nctu.edu.tw>
Subject: Re: Is It Possible to Call  the HALT Function in a Perl Program??? How???
Message-Id: <m367vs6xbx.fsf@windlord.Stanford.EDU>

[ Posted and mailed. ]

j,u?OE" <swsung.bbs@cis.nctu.edu.tw> writes:

> So far no any answers. I would like to be more specific about my system:

> When I ran the perl -V command, I got the following:
> salmon:~# perl -V
> Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration:

Umm...what's halt?  I can think of a number of things you can do in Perl
that may be equivalent, but halt could mean a great number of different
things.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Fri, 06 Jun 1997 01:26:19 -0500
From: Bob Berman <rjberman@mindspring.com>
Subject: Perl 5.004 configure problem before Linux compile
Message-Id: <33975F41.C3034FD@icehouse.com>

I have gcc 2.7.2.1 and ld.so 1.9.2 on a Linux 2.0.29 system.  While running
 ./Configure to build perl 5.004, it bombs out telling me it can't find -ldl when
it tries to compile try.c.  The problem seems to be that, in fact, I do not have
a static library libdl.a. Apparently ld.so 1.9.2 does not build one. I do have
the proper shared lib and link in /lib.

If I remove -ldl from the list of libraries, everything goes OK until Perl's
configure discovers that I do not have dld.h either! Well, it's not in the ld.so
distribution. So what do I need to do to get perl to build on my Linux system?
Why does it need to statically link with libs such as libm, libgdbm etc, anyway?
What's wrong with using the shared lib versions of those?

I checked an old distribution of ld.so I had around - 1.7.3 or soemthing like
that - and that didn't have the missing header file either. I do have a working
version of Perl 5.002 although I forget how I got that to build, but it seems
that that went fairly smoothly at the time. Could someone please enlighten me?
I'm sure this is not an original problem.

Thanks

Bob (rjberman@mindspring.com)


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

Date: 05 Jun 1997 20:11:29 -0700
From: Scott Maxwell <s-max@pacbell.net>
Subject: Re: Perl5 garbage collection too lazy?
Message-Id: <m3lo4ov31a.fsf@localhost.localdomain>

Douglas Seay <seay@absyss.fr> writes:

> As a side note, I have heard that the linux implementation of free() can
> release memory, but I've never looked to see if this was true or just
> another rumor.

I tried this on my Linux box (kernel 2.0.29, perl 5.003), and in a C
program, free() did cause the process's SIZE (as reported by ps) to
decrease to its value before the malloc().

I saw similar results in a perl script, but they're not as clear: I
undef()ed the variable and the SIZE decreased but was still more than
before the variable was created.  Still, the upshot is that undef()ing
large variables in a perl script really should cause your script's
memory usage to decrease under Linux.



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

Date: 6 Jun 1997 04:15:11 GMT
From: Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
Subject: Re: RegExp tutorial suggestions?
Message-Id: <5n82sf$5it$1@news.netusa.net>

James Hanlon <tcubed@MCS.COM> wrote:
> Tom Lynch  <toml@synnet.com> wrote:
> :Jason A. Soloff wrote:
> :> Does anyone know of a good regexp tutorial or FAQ online?
> :> Doesn't have to be incredibly perl heavy, just explain how to
> :> set up and use the regexps...
> :I think  you want to get the O'Reilly Book Mastering Regular Expressions
> :by Jeffrey E.F. Friedl take a look at the Web page at:

I have no idea how good that would be for a beginner. I skipped
the first few chapters, though. 

It is hard to find in bookstores in my experience. Even ones with
large O'Reilly sections don't seem to have it. Last I checked
Amazon.com had it very cheap, though.

> Seconding that, I used to think I was a regex buff, almost a regex wizard.
> No more. It's Jeffrey Friedl, he has authored the definitive work on
> regular expressions, with a big chapter on Perl regex's. Buy this book,

It needs to cover more regexp flavors to be "definitive" in my book.
Procmail has an esoteric variety that will trip most people using it,
particularly if they believe the manpages. It can be described in a
page or two relative to perlre's however. And that's just one example.
Unfortunately the testing involved in finding out from scratch how
each RE language works is a lot of work. (And error prone when you
do things like substitute elvis REs for vi REs as Friedl did.)

> and entertain your friends for hours on the performance implications of
> implementing a regex engine as a nondeterministic finite state automaton.

Procmail uses a DFA for comparision.

I found the book not very helpful teaching me REs, but it was really
helpful optimizing them, particularly in perl which I see as a friendly
RE wrapper around progamming.

Elijah
------
#!/usr/bin/perl -w
$_="<j!y~f^v* >h.g=c+m\@q[p;r} ?x/t|d:l# )e\\p.d-s]p{c<,\n";$j=0;while(
s"[^\w\s,](.*)"($u=$1,$u=~s;(\w);(($s=ord($1)-97),chr((($s+$j++)%26)+97
));gex,$u)"ex){}exit !print;#18/5/97:etb


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

Date: Wed, 04 Jun 1997 14:32:51 +0100
From: b.wilkinson@pindar.co.uk (Bob Wilkinson)
Subject: Re: Second perl book
Message-Id: <b.wilkinson-0406971432510001@ip57-york.pindar.co.uk>

In article <19970531181221347500@rhrz-ts3-p1.rhrz.uni-bonn.de>,
uzs90z@uni-bonn.de (Michael Schuerig) wrote:

> I only casually use perl and without Programming Perl next to me I'm
> virtually lost. Although by now I know that there's always more than one
> way to do it in perl I'm looking for a description of good perl
> programming style. Somebody's gotta know, I gather, as there a people
> around who do write exceptionally clean (even readable) perl code. Has
> anyone of them written a book or is there some place on the web where I
> ought to look?
> 
> Michael
> 
> ---
> Michael Schuerig        I was thrown out of college for cheating on the
> mailto:uzs90z@uni-bonn.de      metaphysics exam; I looked into the soul
> http://www.uni-bonn.de/~uzs90z/  of the boy next to me.    -Woody Allen

Hello,

      Type "perldoc perlstyle" at your prompt.

Bob

-- 
I have become death, destroyer of the worlds.


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

Date: Fri, 6 Jun 1997 05:26:08 GMT
From: ashton@netcom.com (chmod 666)
Subject: Re: Suggestion to all frequent posters/answerers (me too)
Message-Id: <ashtonEBC9rK.8Es@netcom.com>

jahwan@supernova.math.lsa.umich.edu (Jahwan Kim) writes:

>    One thing I noticed is, there're quite a lot of postings which contain
>only RTFM/RTF/check CPAN.  While these postings will help and guide the
>original poster, they do not interest regular READERS like myself so much.
>    So I suggest/ask you with all my respect to include RTFM/RTF/CCPAN in
>the subject line, when your posting does not have anything else at all.

Just kill all followups :>

If it's really that prevelent then taking a tag
(and I'd hope that it could really be one tag rather than a TMTOWTDI)
on the end of the subject would be easy enough.

(Although I do know that few things are more sacred to AbUsenet than threadrift)

You forgot CGI!
My suggestion for that is to post the answer in 
comp.infosystems.www.authoring.cgi
and followup with a pointer that the answer lies in that group ...

AShub


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

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

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