[12048] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5648 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 13 04:07:18 1999

Date: Thu, 13 May 99 01:01:52 -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           Thu, 13 May 1999     Volume: 8 Number: 5648

Today's topics:
    Re: Help: I find tutorial & doc (Alastair)
    Re: Here documents and indention. (Charles R. Thompson)
    Re: Here documents and indention. (Andrew Johnson)
    Re: Here documents and indention. (Larry Rosler)
    Re: Here documents and indention. (Charles R. Thompson)
    Re: Here documents and indention. <tchrist@mox.perl.com>
    Re: Here documents and indention. (Larry Rosler)
    Re: How can i create DLL from perl script ? feketeroland11@my-dejanews.com
    Re: How do I get a hash slice as a hash in a Perlish wa <a794636757612661@mailcity.com>
    Re: How do I make a sytem() exit on control-C (Alastair)
    Re: how do I run perl?? (Tad McClellan)
        http download of images in perl renorum@my-dejanews.com
    Re: Installing PERL on NT Server (Alastair)
        japh tags todd_b_smith@my-dejanews.com
    Re: japh tags (Tramm Hudson)
    Re: japh tags <rra@stanford.edu>
    Re: Killing a Process (Charles DeRykus)
    Re: Learning Perl - help, please ! (Bob Trieger)
        Lists and Arrays <erik@mind.net>
    Re: Lists and Arrays <swarren@www.wwwdotorg.org>
    Re: Making executables from .pl files? (Ethan H. Poole)
    Re: Matching & substituting escaped characters in a reg (Ronald J Kimball)
    Re: MS-HTML must die! (Larry Rosler)
    Re: MS-HTML must die! (Joseph Hertzlinger)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 13 May 1999 00:03:49 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Help: I find tutorial & doc
Message-Id: <slrn7jk99o.5f.alastair@calliope.demon.co.uk>

Sauro Sgatti <sauro@fol.it> wrote:
>Where I find tutorial and document of Perl?
>I know perl.org and CPAN site.

What about ;

http://reference.perl.com/query.cgi?tutorials

HTH.

-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: Wed, 12 May 1999 22:26:23 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: Here documents and indention.
Message-Id: <MPG.11a3cb6b54b10f219896af@news>

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

In article <al6ch7.dog.ln@magna.metronet.com>, Tad McClellan says...
> : From the point of legibility, this is way off base and while it *works* 
> : fine it does nothing but 'hiccup' the reading of the code, especially if 
> : you have a run of complex structures.
> 
>    You can always make some leading space be part of the terminator:
> foreach(@thing){
>       &dothing;
>       print <<"      END_OF_HTML";
>       <blah>
>       de lots of stuff and lines
>       </blah>
>       END_OF_HTML
> 
> : Who really cares if the end result HTML source itslef is totally whacked 
> : out? Anyone looking in there anyway is trying to figure out what you did 
> : to achieve a certain layout. I say make um work for it. :)
> 
>    Good. Since the above "whacks out" the output (it is all indented)

Hmmm.. I like that solution best, although it does require a bit more 
attention to detail it makes perfect sense.
 
Thanks.
-- 
CT


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

Date: Wed, 12 May 1999 22:37:48 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: Here documents and indention.
Message-Id: <0pn_2.1250$L4.34994@news2.rdc1.on.home.com>

In article <al6ch7.dog.ln@magna.metronet.com>,
 Tad McClellan <tadmc@metronet.com> wrote:
! Charles R. Thompson (design@raincloud-studios.com) wrote:

[snip]
 
!    You can always make some leading space be part of the terminator:
! 
! foreach(@thing){
!       &dothing;
!       print <<"      END_OF_HTML";
!       <blah>
!       de lots of stuff and lines
!       </blah>
!       END_OF_HTML
! 
! : Who really cares if the end result HTML source itslef is totally whacked 
! : out? Anyone looking in there anyway is trying to figure out what you did 
! : to achieve a certain layout. I say make um work for it. :)

of course, you always use the techniques in perlfaq4 to 
remove indentation from the here-doc (so you can indent
the doc further so it stands out like a block):

foreach(@thing){
      &dothing;
      ($html= <<"      END_OF_HTML")=~s/^\s+//mg;
          <blah>
          de lots of stuff and lines
          </blah>
      END_OF_HTML
      print $html;
}

there are other here-doc fixers in that faq as well.

regards
andrew


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

Date: Wed, 12 May 1999 15:59:15 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Here documents and indention.
Message-Id: <MPG.11a3a7a0d820b32f989a53@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <MPG.11a3cb6b54b10f219896af@news> on Wed, 12 May 1999 
22:26:23 GMT, Charles R. Thompson <design@raincloud-studios.com> says...
> In article <al6ch7.dog.ln@magna.metronet.com>, Tad McClellan says...
> >    You can always make some leading space be part of the terminator:
> > foreach(@thing){
> >       &dothing;
> >       print <<"      END_OF_HTML";
> >       <blah>
> >       de lots of stuff and lines
> >       </blah>
> >       END_OF_HTML
> > 
> > : Who really cares if the end result HTML source itslef is totally whacked 
> > : out? Anyone looking in there anyway is trying to figure out what you did 
> > : to achieve a certain layout. I say make um work for it. :)
> > 
> >    Good. Since the above "whacks out" the output (it is all indented)
> 
> Hmmm.. I like that solution best, although it does require a bit more 
> attention to detail it makes perfect sense.

Then I think you will like this solution even better.  (It has been 
around before, a lot.)

   print do { (my $x = <<"      END_OF_HTML") =~ s/^      //gm; $x };
      <blah>
      de lots of stuff and lines
      </blah>
      END_OF_HTML

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


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

Date: Wed, 12 May 1999 23:15:27 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: Here documents and indention.
Message-Id: <MPG.11a3d6e7339736179896b0@news>

In article <MPG.11a3a7a0d820b32f989a53@nntp.hpl.hp.com>, Larry Rosler 
says...
> Then I think you will like this solution even better.  (It has been 
> around before, a lot.)
> 
>    print do { (my $x = <<"      END_OF_HTML") =~ s/^      //gm; $x };
>       <blah>
>       de lots of stuff and lines
>       </blah>
>       END_OF_HTML

Yet another one for "The Larry Files". Neato.

-- 
CT


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

Date: 12 May 1999 17:27:01 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Here documents and indention.
Message-Id: <373a0e45@cs.colorado.edu>

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

In comp.lang.perl.misc, 
    lr@hpl.hp.com (Larry Rosler) writes:
:Then I think you will like this solution even better.  (It has been 
:around before, a lot.)
:
:   print do { (my $x = <<"      END_OF_HTML") =~ s/^      //gm; $x };
:      <blah>
:      de lots of stuff and lines
:      </blah>
:      END_OF_HTML

Goodness me!  That's a great deal of work.  You are insufficiently
lazy.  Please try much less next time! :-)

print <<Fin_de_HTML =~ /\S.*\n/g;
    <blah>
	de lots of stuff and lines
    </blah>
Fin_de_HTML

--tom
-- 
 "A momentary lapse of stupidity"
		 -- Dean Roehrich


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

Date: Wed, 12 May 1999 17:12:30 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Here documents and indention.
Message-Id: <MPG.11a3b8c773a2885e989a54@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <373a0e45@cs.colorado.edu> on 12 May 1999 17:27:01 -0700, Tom 
Christiansen <tchrist@mox.perl.com> says...
> In comp.lang.perl.misc, 
>     lr@hpl.hp.com (Larry Rosler) writes:
> :Then I think you will like this solution even better.  (It has been 
> :around before, a lot.)
> :
> :   print do { (my $x = <<"      END_OF_HTML") =~ s/^      //gm; $x };
> :      <blah>
> :      de lots of stuff and lines
> :      </blah>
> :      END_OF_HTML
> 
> Goodness me!  That's a great deal of work.  You are insufficiently
> lazy.  Please try much less next time! :-)
> 
> print <<Fin_de_HTML =~ /\S.*\n/g;
>     <blah>
> 	de lots of stuff and lines
>     </blah>
> Fin_de_HTML

That is because I was trying to preserve any indentation *after* the 
margin, forgetting that this was identified as HTML, not program code 
for example (or Bilbo's poem).  Note that I didn't use s/^\s+//gm which 
is in the FAQ.

Also, we wanted the end-marker to line up with the indentation.

Now that you have shown us the beauty of printing a list instead of a 
scalar, that would be:

  print <<'     EVER_ON_AND_ON' =~ /^     (.*\n)/gm;
     Now far ahead the Road has gone,
        And I must follow, if I can,
     Pursuing it with eager feet,
        Until it joins some larger way
     Where many paths and errands meet.
        And whither then? I cannot say.
              --Bilbo in /usr/src/perl/pp_ctl.c
     EVER_ON_AND_ON

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


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

Date: Thu, 13 May 1999 07:42:12 GMT
From: feketeroland11@my-dejanews.com
Subject: Re: How can i create DLL from perl script ?
Message-Id: <7hdvok$pdu$1@nnrp1.deja.com>

Thank you, Collin!
It's working!
Roland

In article <3739D7A2.AD42C2E0@colorado.edu>,
  Collin Starkweather <collin.starkweather@colorado.edu> wrote:
> This is a multi-part message in MIME format.
> --------------29F6624F4987B999DD8D4ACB
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Purchase the ActiveState (http://www.activestate.com) Perl Developer's
> Kit (PDK) and read the docs on PerlCtrl.
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Collin Starkweather                                 (303) 492-4784
> University of Colorado            collin.starkweather@colorado.edu
> Department of Economics          http://ucsu.colorado.edu/~olsonco
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> feketeroland11@my-dejanews.com wrote:
> >
> > Help me! Help me!
> > Can i create windows 95/NT .dll from a perl script?
> > If it's possible, how ???
> > Thanks for the time,
> > Roland
> >
> > --== Sent via Deja.com http://www.deja.com/ ==--
> > ---Share what you know. Learn what you don't.---
> --------------29F6624F4987B999DD8D4ACB
> Content-Type: text/x-vcard; charset=us-ascii;
>  name="collin.starkweather.vcf"
> Content-Transfer-Encoding: 7bit
> Content-Description: Card for Collin Starkweather
> Content-Disposition: attachment;
>  filename="collin.starkweather.vcf"
>
> begin:vcard
> n:Starkweather;Collin
> tel;work:(303) 492-4784
> x-mozilla-html:FALSE
> url:http://ucsu.colorado.edu/~olsonco
> org:University of Colorado;Department of Economics
> version:2.1
> email;internet:collin.starkweather@colorado.edu
> title:Research Assistant
> adr;quoted-printable:;;University of Colorado=0D=0ACampus Box
0256;Boulder;Colorado;80309-0256;USA
> fn:Collin Starkweather
> end:vcard
>
> --------------29F6624F4987B999DD8D4ACB--
>
>


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: Wed, 12 May 1999 15:37:45 -0700 (PDT)
From: Dwayne Retsky <a794636757612661@mailcity.com>
Subject: Re: How do I get a hash slice as a hash in a Perlish way?
Message-Id: <0926548664e9f02311ea459dd976a74403c90d2e4a@mailcity.com>

In article <MPG.11a389671f0475ef989a4c@nntp.hpl.hp.com>,
lr@hpl.hp.com (Larry Rosler) writes:
>In article <373edbfb.5495630@news.skynet.be> on Wed, 12 May 1999 
>20:00:30 GMT, Bart Lateur <bart.lateur@skynet.be> says...
>> A nicer syntax is probably possible when using function prototypes.
>
>Why the function call at all?
>
>      my %nerfherder = map { $_ => $gundark{$_} } qw/a e i o u/;

This is what I wanted.  I knew about map, but I did not realize how
much Perl mushes arrays and hashes.  In fact, since I'm really working
with references, I can now say

	&scruffify( { map { $_ => $$gundark{$_} } qw{ a e i o u } } );

>By the way, thanks to all who clued me in on the variable names.  The 
>Force rules!

Yes.

>> As Larry R. would say: pretty slow. As I would say: fast enough if you
>> don't need to do this too often.
>
>For sure.  But hash slices are so cute, they need all the exposure they 
>can get.

How slow is it?

>> p.s. This will create hash entries that weren't in the original hash, if
>> those were requested. I don't know if you mind.
>
>>From an earlier post of his:
>
>> ... It will make 'u' into a key of %nerfherder
>> all the time, though, even when it isn't a key of %gundark, doesn't
>> it?  That's OK for my purposes, though, since all the vowels should be
>> there.  But it's not quite right.
>
>So:
>
>      my %nerfherder = map { exists $gundark{$_} ?
>                    ($_ => $gundark{$_}) : () } qw/a e i o u/;

So:

	&scruffify( { map { exists $$gundark{$_} ?
	                    ($_ => $$gundark{$_}) : () } qw{ a e i o u } } );

>
>It takes more code with a hash slice (but still cute :-):
>
>      my %nerfherder;
>      my @vowels = grep exists $gundark{$_} => qw/a e i o u/;
>      @nerfherder{@vowels} = @gundark{@vowels};

So:

	&scruffify( { map { $_ => $$gundark{$_} }
	            grep { exists $$gundark{$_} } qw{ a e i o u } } );

I think that works.

#include <iostream>
int main() <%std::cout << "Not another Perl hacker!\n";%>

-- 
Dwayne Retsky
Mail sent to the address on this posting is rarely, if ever, read.
Please respond to the proper newsgroup.


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

Date: Wed, 12 May 1999 23:58:39 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: How do I make a sytem() exit on control-C
Message-Id: <slrn7jk903.5f.alastair@calliope.demon.co.uk>

Merrill Lynch <anybody@ml.com> wrote:
>Hi 
>
>Does anyone have a solution on how to make a system() exit on control-C?
>
>I am on using perl5.00503 activestate perl for NT4 service pack 3.

You need to take a look at methods of catching signals basically - CTRL-C is
just a SIGINT. See ;

perldoc perlipc

because it has a section on signals. I can also recommend the Perl Cookbook from
O'Reilly.

HTH.

-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: Wed, 12 May 1999 12:41:45 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: how do I run perl??
Message-Id: <90bch7.3vg.ln@magna.metronet.com>

david (anaton@ibm.net) wrote:
: I am new to perl and scripts...
: I have been reading some perl tutorials..and the instructions set.

: I wonder hwo can I run my sample programs?..I understand that I have to
: write a perl program using a text editor..and where do I go from
: there?...do I have to downlod a program..or an interpreter..in short
: what do I have to have and do to run my very first perl codes??


   Yes, you need to download the perl interpreter.


: I read that i have to look for perl..using the "where perl"
: statment...does this have to be done on DOS?..btw I am a windows 95
: user..

: I know it sounds silly ..but i simply dont know where to go..


   To get Perl for Win32 systems, go to:

      http://www.activestate.com/


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


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

Date: Thu, 13 May 1999 00:43:43 GMT
From: renorum@my-dejanews.com
Subject: http download of images in perl
Message-Id: <7hd77s$6rq$1@nnrp1.deja.com>

I am trying to set up a server to send out image downloads via HTTP.
(so that the browser neither tries to display them nor opens an
associated application)  It seems that if I write a
header such as Content-type: application/x-madeupname with UserAgent
and HTTP::Request GET from LWP, the file is saved, but only using the
name of the script all of this is written from!

Alternately, the workaround I just learned of:

<FORM ACTION='script.cgi/image03.gif'><INPUT TYPE=SUBMIT> where
script.cgi is a page that prints the aforementioned content type

seems to save the images with the correct path name, but without their
extention!  aahhhhh...So close but yet so far.

What is the best way of accomplishing this?  Any advice much
appreciated.


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: Wed, 12 May 1999 23:59:56 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Installing PERL on NT Server
Message-Id: <slrn7jk92g.5f.alastair@calliope.demon.co.uk>

Jason Levine <jason@hyperspot.com> wrote:
>Does anyone know of a good resource for problems with installing PERL on
>NT Server

The first one I'd check would be dejanews (or 'deja' now) ;

http://www.deja.com/home_ps.shtml


-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: Thu, 13 May 1999 02:02:11 GMT
From: todd_b_smith@my-dejanews.com
Subject: japh tags
Message-Id: <7hdbr3$b2u$1@nnrp1.deja.com>

Let's get a thread going with people's tag lines that print "Just
Another Perl Hacker." I've seen lots, but now I want to see them all!

here's a rather long one I took from somebody and modified:

eval join' ','print"',(map$.->(++$_,$|,$|-1),map join('',chr$=+$.->($_,
$|,$|+2),substr$_,$|+2),@$_[$|..@$_]),"\n\""if$.=sub{eval'substr '.
join', ',map"\$_[$_]",$|..$=/30}and$_=[(split$.->($.,$|,$|+1),
"20erkzC14usszC37notheqzC44ackeqz")[$|^1,2,0^$|,3]] ;

I don't like it and stopped using it because it was too long (although I
obfuscated it nicely (my favorite part is where $. is a coderef to
substr)) and you can tell where the words will be coming from.

The original code that I stole with permission from Andreas Gross, is:

@_=("24ussz","47notheqz","30erkz","54ackeqz");print join(" ",map
substr(++$_,0,-1),map join("",chr(substr($_,0,2)+50),
substr($_,2)),@_[0..scalar(@_)]);

well, that's all I have. We can see who has the best. I want to see one
where it's not obvious where the words come from.

____________________
Todd Smith -japh
ITC^DeltaCom
tbsmith@deltacom.net


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: 12 May 1999 23:38:34 -0600
From: hudson@swcp.com (Tramm Hudson)
Subject: Re: japh tags
Message-Id: <7hdogq$9nu@llama.swcp.com>

[posted and cc'd to cited author]

 <todd_b_smith@my-dejanews.com> wrote:
> Let's get a thread going with people's tag lines that print "Just
> Another Perl Hacker." I've seen lots, but now I want to see them all!

That reminds me -- where has Abigail gone?  

Anyway, here are my two entries, which are archived from the last time this
topic was discussed here:

	http://www.deja.com/=dnc/[ST_rn=qs]/getdoc.xp?AN=433591674

#!/usr/bin/perl
print map{($c,$o)=('X',' '); (map{ if(/[0-9]/){ ($c,$o)=($o,$c); $c x $_} }
map{(/[^A-Z]/&&$_)||split(//,scalar("1"x(ord($_)-ord('A')+1)));}split //),"\n"}
qw( 3E22A34A2A2A2A23E3A3 3G4A4D2F2A2E3C 3F32A43C2D2A23A3A2 H3A2A4F2D2A2E3C
    2A3A223A4E2A2A3A2D3B21 0 4223A32A4C2A32E3A3 4E3C2A4I3E3C
    4222223A43A3B322222 4A3A3C2A4I3E3C 4A33B2B32G22E3B2A);
__END__


I especially am proud of this one.  How many -w and strict compliant
jph sigs are there?  Plus it spells my name in big letters.  I haven't
gone through the RLL recently to strip out the extraneous border on
the right side.  And why can't I do -Mstrict?  This one should win an
award for "most gratuitous use of map in a non-void context".

#!/usr/bin/perl -w
use strict; my $l=0; print map{/[A-F0-9]/&&do {my $n=hex$_;((map{$_?"X":" "}
(map{$n&$_}(map{1<<$_} (reverse (0..3))))),++$l%16?"":"\n")}} (split //,
"2A6E1  249D    5    D   C  0   0   0   1 2   A 842B   5495  140  0   0
   1    2  A   E 4   3A D4  9D D8   0   0 0   1 A   A 2     4   2 AD  4
   9    514   0   0  0 1 4  4 C 4   2A489 5   D 2   0 00119 D   C 8 5 2
   3    5  7  70000  1 1 5  1 4 8   5   5 4   5 4   5     0 0   0 0  11
   9    9   8 8   7  7 4 6  6 6 0   0   0 01 U1 1   1     4 8   5 5   4
   5    4   5 0   0  0   0  1   1   1   D  2E5  5357   480   001  "   );
__END__


But if you demand it in four lines of code, so be it.  I even went through
and cleaned up some unecessary bits and fixed the dangling border problem.
Don't see the fnords!

#!/usr/bin/perl
print map{/[A-F0-9]/&&do{my $n=hex$_;((map{$_?"X":" "}(map{$n&$_}(map{1<<$_}
(qw(3 2 1 0))))),++$l%12?"":"\n")}}(split//,"2A6E1249D5DfnordC2A842B5495142A
E43AD49D hudson at swcp.com D8AA242AD49514 http://www.swcp.com/~hudson/ 44C4
2A4895D219DC85235770151485545fnord450199887746660U11148554545011D2E5535748")
__END__


-- 
  o   hudson@swcp.com                 tbhudso@cs.sandia.gov   O___|   
 /|\  http://www.swcp.com/~hudson/          H 505.266.59.96   /\  \_  
 <<   KC5RNF @ N5YYF.NM.AMPR.ORG            W 505.284.24.32   \ \/\_\  
  0                                                            U \_  | 


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

Date: 12 May 1999 19:16:13 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: japh tags
Message-Id: <ylwvydhfyq.fsf@windlord.stanford.edu>

todd b smith <todd_b_smith@my-dejanews.com> writes:

> well, that's all I have. We can see who has the best. I want to see one
> where it's not obvious where the words come from.

Hasn't anyone built a canonical archive of these things yet?  Anyway, see
my sig, although it's technically not quite a JAPH since that's not all it
prints out.  :)

-- 
#!/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: Wed, 12 May 1999 22:17:52 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Killing a Process
Message-Id: <FBn4Ls.16q@news.boeing.com>

In article <7hcpam$ioq$1@samba.rahul.net>,
Todd McLaughlin  <toddm@waltz.rahul.net> wrote:
>I have Perl get the output from Lynx:
>
>$data = `lynx -dump http://....`
>
>Sometimes Lynx hangs or has problems getting the data so my script
>hangs.  Is there anyway to have Perl kill the process if it hasn't
>finished after 30 seconds?  Or perhapes a command line option for
>Lynx that I don't know about?  Thanks!
>

Here's a useful how-to from the perl docs (perldoc -f alarm): 


 eval {
        local $SIG{ALRM} = sub { die "alarm\n" };       # NB \n required
        alarm $timeout;
        $nread = sysread SOCKET, $buffer, $size;
        alarm 0;
    };
    die if $@ && $@ ne "alarm\n";       # propagate errors
    if ($@) {
        # timed out
    }
    else {
        # didn't
    }



hth,
--
Charles DeRykus


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

Date: Wed, 12 May 1999 22:56:43 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Learning Perl - help, please !
Message-Id: <7hcvrb$on0$3@holly.prod.itd.earthlink.net>

[ courtesy cc sent by mail if address not munged ]
     
"Carol Herbert" <carol@herb4.freeserve.co.uk> wrote:

>I am ending the input of the string with ctrl+z (as recommended) - should I
>be ending with something else ?
>
>I am running Active Perl on an IBM pc running Windows 95.  I know the Perl
>is working as other scripts work ok.


use ctrl-d and enter.



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

Date: 12 May 1999 17:48:17 -0700
From: Erik Arneson <erik@mind.net>
Subject: Lists and Arrays
Message-Id: <m1pv45kd66.fsf@mother.mind.net>

Help me!

A friend and I, both avid Perl coders, are in a bit of a disagreement.
One of us is continually referring to arrays as lists, and it is
confusing the other.  My question is, what is the difference between
arrays and lists?  Is there a difference?  Why call an array an array,
and not a list?

We're looking for information which will end our disagreement, and
hopefully help us learn more about these sorts of things.

Thanks in advance!

-- 
# Erik Arneson       erik@mind.net       Network Engineer #
# Infostructure   http://www.mind.net/     (541) 488-1962 #
# "My brain is my second favorite organ."  -- Woody Allen #


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

Date: Thu, 13 May 1999 03:39:55 GMT
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: Lists and Arrays
Message-Id: <fQr_2.641$6x6.935@news.rdc1.sfba.home.com>

Erik Arneson <erik@mind.net> wrote in message
news:m1pv45kd66.fsf@mother.mind.net...
> Help me!
>
> A friend and I, both avid Perl coders, are in a bit of a disagreement.
> One of us is continually referring to arrays as lists, and it is
> confusing the other.  My question is, what is the difference between
> arrays and lists?  Is there a difference?  Why call an array an array,
> and not a list?
>
> We're looking for information which will end our disagreement, and
> hopefully help us learn more about these sorts of things.

It's in perlfaq4: What is the difference between a list and an array?

on http://www.perl.com/, then link to FAQ, then section 4.

--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com                http://www.techhouse.com/
mailto:swarren@wwwdotorg.org                http://www.wwwdotorg.org/
              MIME, S/MIME and HTML mail are acceptable





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

Date: Mon, 10 May 1999 14:29:11 -0400
From: ehpoole@ingress.com (Ethan H. Poole)
Subject: Re: Making executables from .pl files?
Message-Id: <t5Es$Lxm#GA.202@rejz.ij.net>

[Posted and Emailed]  In article <7h638m$l66$1@nnrp1.deja.com>, 
smnayeem@my-dejanews.com says...
>
>In article <slrn7jcsp8.ms8.chris@holly.dyndns.org>,
>  chris@holly.dyndns.org (Chris Costello) wrote:
>>    Plus, of course, with perlcc, you can create your own binary
>> executable!
>
>hmm where can i find this perlcc? i checked the activeperl
>documentation, all it has is perl2exe but that never gave me the right
>exes, well it gives me an exe but i cant ever run it if i use any
>modules, it just says cant locate such and such modules and aborts.

You have to tell Perl2Exe which modules to include when you create the exe, 
otherwise the executable will attempt to load the modules (externally) at run 
time.

-- 
Ethan H. Poole              | Website Design and Hosting,
                            | CGI Programming (Perl & C)..
========Personal=========== | ============================
* ehpoole @ ingress . com * | --Interact2Day, Inc.--
                            | http://www.interact2day.com/
=======FREE WEBSITE DESIGN PROMOTION UNTIL 5/31/99!=======



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

Date: Thu, 13 May 1999 00:49:48 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Matching & substituting escaped characters in a regexp.
Message-Id: <1drpu07.nspe1t1dyr6yvN@p0.tc19a.metro.ma.tiac.com>

Larry Rosler <lr@hpl.hp.com> wrote:

> And extraordinarily ugly.  :-)
> 
>     s/\\(\d+)/&#${\(oct $1)};/g;
> 
> or, for the faint at heart,
> 
>     s/\\(\d+)/'&#' . oct $1 . ';'/eg;

Neither of those work for the original poster's case, in which
"the escaped character doesn't register as 4 distinct characters".
His input contains the actual characters, not their escaped octal
representations.

So, to match the literal characters:

s/([\x80-\xFF])/'&#' . ord $1 . ';'/eg;

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
perl -e '$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'


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

Date: Wed, 12 May 1999 18:22:05 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: MS-HTML must die!
Message-Id: <MPG.11a3c919ee049868989a58@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <1999May12.115009@ukwit01> on Wed, 12 May 1999 11:50:09 BST, 
Lack Mr G M <gml4410@ggr.co.uk> says...
+ In article <MPG.11a2d09ffa328077989a37@nntp.hpl.hp.com>,
+    lr@hpl.hp.com (Larry Rosler) writes:
+ |> 
+ |> I promised to redo the demoroniser (British spelling) in one page.
+ 
+    Now why is this though to be the British spelling?
                          ^t

'Cause us Murkins don't use no such funny spellin'.  I didn't know that 
the rest of you-all shouldn't ought to be using it neither nohow.

+                                                        I quote, from
+ Usage&Abusage (Eric Partridge: Penguin Books, ISBN 0 14 051.024 9):
+ 
+ "-ize and -ise, ver-endings.
+ 
+  Fowler, in "Modern English Usage", has an admirable article on the
+  subject. The following summary rule is based on "The O.E.D's" article
+  (at -ize).  You will be safe if you make every verb, every derivation
+  noun or participal adjective, conform to the -z type, for this suffix
+  comes, whether direct or via Latin or French, from the Greek -izein;
+  to employ -ise is to flout etymology and logic.  Moreover, whether
+  the spelling be -ise, or -ize, the pronunciation is -ize; another
+  for using it."

Thanks for the eye-opener.  I'll recheck my Fowler.

+    (And another reason for using -ize is to exercise the "z" key on
+ the keyboard.)

Heh, heh.

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


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

Date: 13 May 1999 03:04:07 GMT
From: jhertzli@ix.netcom.com (Joseph Hertzlinger)
Subject: Re: MS-HTML must die!
Message-Id: <7hdff7$kfi@dfw-ixnews9.ix.netcom.com>

On 11 May 1999 11:07:49 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:

>In reading over your otherwise fascinating and useful website, I noticed
>documents that your web server alleges to be of content-type "text/html",
>but which in fact are not.  The HTML standard uses the 8-bit ISO Latin-1
>character set, but you include characters that are outside of that, such
>as those whose decimal values are in the 146-149 range.  This renders
>your pages in an illegal, non-standard, proprietary HTML variant, and
>consequently illegible to millions of your readers.

I have seen a web site (http://www.americanjobfairs.com) which has spaces
in URLs instead of %20. This makes it unusable with Netscape or Lynx.
(It can be viewed with Explorer. Microsoft apparently designs browsers
that can be used with sites designed by the clueless.)


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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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