[9937] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3530 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 24 22:02:36 1998

Date: Mon, 24 Aug 98 19:00:19 -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           Mon, 24 Aug 1998     Volume: 8 Number: 3530

Today's topics:
    Re: "protocol not supported" with socket() <zenin@bawdycaste.org>
    Re: "protocol not supported" with socket() <gregor@novoironlight.com>
    Re: #!usr/bin/perl is ignored, WHY? <ljz@asfast.com>
    Re: better way to truncate string after certain number  <tchrist@mox.perl.com>
    Re: Blat and Filehandle main::MAIL opened only for inpu (Tony Toews)
    Re: COBOL and Perl (Gary L. Burnore)
    Re: Perl compiler (Craig Berry)
    Re: Perl compiler (Sam Holden)
    Re: Perl documentation (John Callender)
    Re: Perl documentation (David Hawker)
    Re: Perl documentation no.unsoliciteds@dead.end.com
    Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFO <palincss@tidalwave.net>
    Re: Perl on linux--running scripts w/out the perl or ./ vibes8785@my-dejanews.com
        Problem with perl.h compilation. <chandrak@ml.com>
    Re: Question using pack (Gregory Tod)
    Re: subsorting a report <rootbeer@teleport.com>
    Re: Threading/forking simple(?) programs (Duke)
    Re: Threading/forking simple(?) programs <zenin@bawdycaste.org>
    Re: Using modules on a server <rootbeer@teleport.com>
    Re: Why dont people read the FAQs (Gary L. Burnore)
    Re: Why dont people read the FAQs (Gary L. Burnore)
        Y2K Date Support <mhanson@arrowweb.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 25 Aug 1998 00:06:37 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: "protocol not supported" with socket()
Message-Id: <904003512.444484@thrush.omix.com>

[posted & mailed]

Gregor Mosheh <gregor@novoironlight.com> wrote:
        >snip<
: Output of "perl -v":

        FYI, -v is different then -V.  -V gives much, much more information
        about your exact build, which is why I asked for it.

: And here's the script (named "client"), copied from "Programming PERL"
: by ORA:

        Odd, this works fine on my system (FreeBSD 2.2.7/perl5.00404).

        Check /etc/protocols and see if tcp actually is enabled (not
        commented out).  You might want to import the AF_INET and
        SOCK_STREAM constants from the Socket module, as the values shown
        may not be correct for your system.

        Also, see if this version works better:

        #!/usr/local/bin/perl -w
        use IO::Socket;
        my $socket = new IO::Socket::INET ( PeerAddr => 'janice:smtp(25)' )
            or die $@;

        $socket->autoflush;

        sub dokill {
            kill 9, $child if $child;
        }

        if ($child = fork) {
            while (<STDIN>) {
                print $socket $_;
            }
            sleep 3;
            dokill();
        }
        else {
            while (<$socket>) {
                print;
            }
        }
        __END__

        Granted, this won't teach you as much about socket programming,
        but it might get the job done faster. :-)

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Mon, 24 Aug 1998 17:53:23 -0700
From: Gregor Mosheh <gregor@novoironlight.com>
Subject: Re: "protocol not supported" with socket()
Message-Id: <35E20B03.2826A615@novoironlight.com>

>         FYI, -v is different then -V.  -V gives much, much more information

My mistake.


Your script worked A-OK. I've used the older one (the one I posted) on
several systems without trouble - but not on Solaris. Thanks for the
script - much nicer version of the original. :)


- Gregor Mosheh
Novo/Ironlight


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

Date: 24 Aug 1998 20:23:35 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: #!usr/bin/perl is ignored, WHY?
Message-Id: <ltiujhaozc.fsf@asfast.com>

tigger@io.nospaam.com writes:

> Well, without seeing the actual error message from doing a './test.pl', I
> can't say for sure, but my guess is that either your #!/usr/bin/perl isn't
> on the very first line of your script, or it has some bad characters in
> it. Try deleting the first line of the script and redoing it.
> HTH,
> 
> Paul Archer
> 
> > Could it be that the first command
> > #!usr/bin/perl
> > is ignored?
> 
> > Being in the cgi-bin directory (Unix shell), I tried to start another
> > script using:
> > ./test.pl
> > It didn't work, as well. But using:
> > usr/bin/perl test.pl
> > it worked perfectly...

In addition to the suggestion offered above by Paul Archer, you might
also try to put a forward slash in front of `usr/bin/perl', as
follows:

  #!/usr/bin/perl
    ^
    here

It's possible that you used this slash in your script but perhaps
accidentally left it off when posting your message here.  But if you
indeed left it out of your script, there's a good chance that this was
your problem.

Good luck.

-- 
 Lloyd Zusman   ljz@asfast.com
 perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'


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

Date: 25 Aug 1998 01:52:45 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: better way to truncate string after certain number of "."
Message-Id: <6rt5dd$rv2$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    shahada abubakar <shahada@icky.pc.my> writes:
:I'm looking for an efficient way to do this... given a newsgroup name
:and a "depth" integer, truncate the newsgroup name after "depth" number
:of periods. For example,
:
:    &truncname ('comp.lang.perl.announce', 1) eq 'comp.';
:    &truncname ('comp.lang.perl.announce', 2) eq 'comp.lang.';
:    &truncname ('comp.lang.perl.announce', 3) eq 'comp.lang.perl.';
:    &truncname ('comp.lang.perl.announce', 4) eq
:'comp.lang.perl.announce';
:    &truncname ('comp.lang.perl.announce', 5) eq
:'comp.lang.perl.announce';
:
:Any ideas?

#!/usr/bin/perl
#
# checknews -- pipe to words for formatting.
# by Tom Christiansen <tchrist@perl.com>

&getwin;

#$ARGV[0] eq '-c' && ($chopit++, shift);
$chopit++;

$WIDTH = ($cols > 80) ? 20: 13;

die "can't fork: $!" unless defined ($pid = open(WORDS, "|-"));
if ($pid) {
    select(WORDS);
    open(RN, "trn -t -s750 -c @ARGV|");
    @newsgroups = <RN>;
    $chopit = 0  if @newsgroups < 5;
    for (@newsgroups) {
	next unless ($_, $count) = /^(\S+): (\d+)/;
	0 while $chopit && $WIDTH < length && s/\b(\w)[^.]+\./$1./;
	$_ = sprintf("%4d %s\n", $count, $_);
	s/ +$//;
	print;
    }
    close WORDS;
    wait;
    exit $?;
} 


##################################################################
# from here on in is my basic "words" script...  included here
# so that checknews is self-contained.  some versions of pr
# are smart enough to do this.  sadly, ours is not one of them.

sub eol { ($elt+1) % $cols == 0; }	# is this the last elt on line?

$maxlen = 1;	# widest string yet seen



while (<STDIN>) { 	# read stdin into $_
    s/\s+$//;
    $maxlen = $mylen if (($mylen = length($_)) > $maxlen);
    push(list, $_);
} 

$maxlen += 1;  # spaces

$cols = int($cols / $maxlen);
$rows = int(($#list+$cols) / $cols);
$mask = sprintf("%%-%ds ", $maxlen);

for ($elt = 0; $elt < $rows * $cols; $elt++) { 
    $target =  ($elt%$cols) * $rows + int(($elt/$cols));
    $piece = sprintf($mask, $target < ($#list+1) ? $list[$target] : "");
    $piece =~ s/\s+$// if do eol();  # don't blank pad to eol of line
    print $piece;
    print "\n" if do eol();
}

print "\n" if do eol();

exit 0;

sub getwin {
    $TIOCGWINSZ = 0x40087468;  # should be require sys/ioctl.pl
    $winsize = ' ' x 1000;
    if (ioctl(STDOUT, $TIOCGWINSZ, $winsize)) {
	($rows, $cols, $xpixel, $ypixel) = unpack('S4', $winsize);
    } else {
	$cols = 80;
    }
}
-- 
I am a little more weird today than normal.  --Andrew Hume


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

Date: Tue, 25 Aug 1998 01:36:54 GMT
From: ttoews@telusplanet.net (Tony Toews)
Subject: Re: Blat and Filehandle main::MAIL opened only for input
Message-Id: <35e2140d.28095328@news.calgary.telusplanet.net>

sholden@pgrad.cs.usyd.edu.au (Sam Holden) wrote:

>>open(MAIL,"$mailprog") || die print "Cannot open mailprog";
>
>It might help to open a pipe to the program rather than trying to open a file
>called blat.exe...
>open(MAIL,"|$mailprog");

Ok, thanks, wonder how the example worked then?  (Just went and looked
and nope, no | in that example.)

>>Filehandle main::MAIL opened only for input at
>>C:\Inetpub\scripts\sendform.pl line 8.
>And look perl told you exactly what was wrong anyway...

Oh?  I can see no relationship between this error message and needing
to open a pipe.  For an experienced Perl programmer who knows what
they are doing.  Sure.  But I'm a newbie to Perl.  

Thanks, Tony
----
Message posted to newsgroup and emailed.
Tony Toews, Independent Computer Consultant
The Year 2000 crisis: Will my parents or your grand parents still be receiving
their pension in January, 2000?  See www.granite.ab.ca/year2000 for more info.
Microsoft Access Hints, Tips & Accounting Systems at www.granite.ab.ca/accsmstr.htm


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

Date: Mon, 24 Aug 1998 23:58:27 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: COBOL and Perl
Message-Id: <35e2fc1f.12756253@nntpd.databasix.com>

On Mon, 24 Aug 1998 13:58:13 +0100, in article
<35E16365.CF280FEC@hankel.mersinet.co.uk>, Charles F Hankel
<charles@hankel.mersinet.co.uk> wrote:

>huntersean@hotmail.com wrote:
>> 
>> In article <6rldhj$na5@lotho.delphi.com>,
>>   paulr@bix.com (paulr) wrote:
>> 
>> > On the other paw,
>> > I sure wouldn't use COBOL for a text scanning or SGML
>> > application. <grin>
>> 
>> Neither would I.  I wouldn't use COBOL for anything else, either.  Neither do
>> the company I work for, nor any of the major banks here in London AFAIK.
>
>I think you should reconsider that last statement.  A large number of
>the major banks use COBOL extensively in their systems, in my direct
>experience.

I must agree.  Many of the international banks I've worked with use several
different platforms with several different programming languages. COBOL being
one of them.  Some of them were exclusively COBOL until only a relatively
short time ago.  As in Charles' case, this is from direct experience.


>> > If you have started into C, then go ahead into PERL.
>> > You will find COBOL is a very different world than either of
>> > those two languages, but a very rewarding one to learn.
>> > In fact, learning ANY programming language is a rewarding
>> > experience.
>> 
>> Amen to that sentiment.  Perhaps if you tried to learn something about perl
>> before posting you would not post such utter nonsense to the usenet.
>
>I have comparatively little experience of Perl but it seems to me that
>Perl relies extensively on additional libraries to gain any level of
>effectiveness, rather than just the pure language itself.  It is also
>interpretive, which is not necessarily a desirable thing in a production
>environment.

The cross-platform ability is a primary reason for it's use in the banking
industry.

>
>True, you may think that it's jolly good but it really doesn't match
>COBOL in some areas.  I work on mainframe systems (you know, the ones
>that do a lot of boring work) and in this environment, COBOL is probably
>the leading language as such.  We use utility software such as Selcopy
>and Easytrieve for the more mundane tasks such as data extraction and
>reporting.

>It would seem to me, so far, that Perl does little more than Selcopy can
>do and, as such, I'm not particularly impressed.  One reason for lack of
>impression is that Selcopy is simply an easy-to-use tool and yet Perl is
>touted as a language.  

Well it's certainly nice for taking data from a COBOL based program files,
Informix and Oracle databases, mashing them all together and producing pretty
nifty web pages.

>So what makes Perl a language and Selcopy a utility?  I would guess that
>it's the environments and the different ways that we view things.  Or
>could it be that Perl is promoted as a language, while Selcopy is sold
>as a "multiple information retrieval" utility?  As far as I can tell,
>though, there is little difference between the two in functional terms
>other than the documentation.  My Selcopy manual has 242 concise pages
>and is easy to use; my Perl 5 book has 938 verbose pages, and finding
>useful things can take a while when wading through the dross.

I always thought of Selcopy as a language.  
>
>You are wrong to slag off COBOL.  It is neither better nor worse than
>Perl, and it is an argument that you will never win; the contextual
>arguments will see to that.

It's comparing apples to oranges.  I've heard for nearly 15 years that COBOL
is a dying language.  It'll be here for a long time to come as it works and
it's easy to learn and some places refuse to give it up.  At one bank, I made
the mistake of referring to one of the COBOL based databases as a legacy
system.  I only said it once.
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups.          |     Official Proof of Purchase
===========================================================================


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

Date: 25 Aug 1998 00:47:59 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl compiler
Message-Id: <6rt1jv$9fu$1@marina.cinenet.net>

Tom Christiansen (tchrist@mox.perl.com) wrote:
: But why are you trying to stop others from learning?  That's *evil*.

You charge for the classes you teach, correct?  And for your consulting
services?  If so, I expect a humble retraction of the above.  If not,
pardon me.  Charging for your courses is just as much 'stopping others
[who can't afford to attend] from learning' as obfuscating/compiling code
is.

: Let's just burn books instead.  Or take away Perl unless you pay for it.
: Or restrict access to its documentation.

The latter two would have been fairly reasonable things to do; Larry and
the gang had a different philosophy (free software) and business model
(make money on the consulting/teaching end), and for that I'm glad; it
fits my needs well, being more of the lone-learner type.  But it's not
morally superior.

: Is that what you'd like
: to see the world come to?  What you're talking about is anti-science,

Science is not a fair comparison.  Science is (in the ideal sense) about
the quest for Truth, for the secrets of the world in which we live.  It
strives toward a culture of openness and sharing.  Perl is a tool used (by
many -- or most -- of us) in our daily, grubby quest for money.  We happen
to love it, and enjoy using it, but money drives the process, by and
large. 

: anti-usenet,

Usenet is an irrelevant comparison.  Usenet is a particular scheme for
broadcasting messages between many computer systems, and for keeping them
organized; Perl is a programming language.  I fail to see how one has much
to do with the other, in any sense relevant to the 'free software' topic
under discussion.

: and anti-perl.

Anti-the-core-perl-developer-community-consensus, yes.  Most of those
involved in promulgating and extending the language have a strong Gnu-ish
free software bent; not surprisingly, given that Perl is itself free
software.  However, is there no room for those with a more proprietary
outlook on software IP under the wide Perl umbrella?

: That is the spirit that gives us fleeceware
: in all its wicknessless, not the spirit that gave us the open freeware
: that runs the net.

In my daily work and play, I use both freeware and proprietary, paid-for
software.  I find that both have useful roles.  I've yet to find a word
processor that suits my needs better than Microsoft Word on WinNT; I've
yet to find a C++ development toolset I like better than Gnu's.  I've seen
plenty of bad freeware and good payware.  The correlation between quality
and freeness is slight if it exists, and I'd hesitate to guess on its
sign.

: You lose karma points by withholding.  You gain prestige not by what
: you sell nor by what you buy, but rather by what you freely give away
: to others, and how beautiful and useful that thing is.

A noble sentiment, and a nice community model -- and one with which I
personally happen to agree, though not with the zealous fervor of some.
However, I can see a strong case for maintaining proprietary software and
payware under many circumstances.  Each individual, each business, each
cooperating group of developers must make their own decision on this.  And
again, there is no moral dimension to the decision.  If I write a program,
it's mine to give away, sell, lease, trade, or rm -rf at my whim.

: While you are
: certainly under no obligation to do so, neither are we under any sort of
: obligation to help you in your embarrassing pursuit of shameful hoarding.

Oh, please.  Turn the rhetoric nob back down to about 7, please, you're
hurting my ears. :)  Is a carpenter failing to give away tables and
cabinets 'hoarding'?  In your world, he'd give away the cabinets, then
make his money off dropping by to maintain and polish them, and to point
out hidden drawers the client might not have noticed. Different business
model, that's all it is.  Or don't you eat? 

: I do not wish you luck, because I am morally opposed to the choice you
: are attempting to make.

I'll be interested to see the moral system that leads to this extreme a
position...

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: 25 Aug 1998 01:28:32 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl compiler
Message-Id: <slrn6u44q0.t6i.sholden@pgrad.cs.usyd.edu.au>

On 25 Aug 1998 00:47:59 GMT, Craig Berry <cberry@cinenet.net> wrote:
>Tom Christiansen (tchrist@mox.perl.com) wrote:
>: But why are you trying to stop others from learning?  That's *evil*.
>
>You charge for the classes you teach, correct?  And for your consulting
>services?  If so, I expect a humble retraction of the above.  If not,
>pardon me.  Charging for your courses is just as much 'stopping others
>[who can't afford to attend] from learning' as obfuscating/compiling code
>is.

I suspect but of course don't know that Tom doesn't mind people who
attended one of his courses from sharing their knowledge with others. He can
charge for the course, you can charge for the software.

You however, want to stop the chain at the first link, whereas I doubt Tom
does.

>
>: Let's just burn books instead.  Or take away Perl unless you pay for it.
>: Or restrict access to its documentation.
>
>The latter two would have been fairly reasonable things to do; Larry and
>the gang had a different philosophy (free software) and business model
>(make money on the consulting/teaching end), and for that I'm glad; it
>fits my needs well, being more of the lone-learner type.  But it's not
>morally superior.

I agree with you here, except that I would hope that if perl was sold and
was put under a license which made in non-redistributable, that it would still
come with source...

>
>: Is that what you'd like
>: to see the world come to?  What you're talking about is anti-science,
>
>Science is not a fair comparison.  Science is (in the ideal sense) about
>the quest for Truth, for the secrets of the world in which we live.  It
>strives toward a culture of openness and sharing.  Perl is a tool used (by
>many -- or most -- of us) in our daily, grubby quest for money.  We happen
>to love it, and enjoy using it, but money drives the process, by and
>large. 

I still can't understand how letting people see the source leads to less money.

>
>: anti-usenet,
>
>Usenet is an irrelevant comparison.  Usenet is a particular scheme for
>broadcasting messages between many computer systems, and for keeping them
>organized; Perl is a programming language.  I fail to see how one has much
>to do with the other, in any sense relevant to the 'free software' topic
>under discussion.

Usenet is also a community of people who tend to have a open and sharing
mentallity, that probably arises from the fact that that was how the computing 
world was way back when...

>
>: and anti-perl.
>
>Anti-the-core-perl-developer-community-consensus, yes.  Most of those
>involved in promulgating and extending the language have a strong Gnu-ish
>free software bent; not surprisingly, given that Perl is itself free
>software.  However, is there no room for those with a more proprietary
>outlook on software IP under the wide Perl umbrella?

Of course there is room, but releasing source to those who purchase your 
product is the nice thing to do. Licenses do actually work most of the time.
Even if you don't there is nothing to stop you using perl, but since you 
break the help each other chain, by not letting others learn from your source,
you can't expect everyone to rush to help you...

>
>: That is the spirit that gives us fleeceware
>: in all its wicknessless, not the spirit that gave us the open freeware
>: that runs the net.
>
>In my daily work and play, I use both freeware and proprietary, paid-for
>software.  I find that both have useful roles.  I've yet to find a word
>processor that suits my needs better than Microsoft Word on WinNT; I've
>yet to find a C++ development toolset I like better than Gnu's.  I've seen
>plenty of bad freeware and good payware.  The correlation between quality
>and freeness is slight if it exists, and I'd hesitate to guess on its
>sign.

I agree there is room for both... however I would argue that open source
software will be of higher quality in the long run due to more people looking
at the code and finding bugs. Note the cost/price of the software has nothing
to do with whether I can see the source code.

>
>: You lose karma points by withholding.  You gain prestige not by what
>: you sell nor by what you buy, but rather by what you freely give away
>: to others, and how beautiful and useful that thing is.
>
>A noble sentiment, and a nice community model -- and one with which I
>personally happen to agree, though not with the zealous fervor of some.
>However, I can see a strong case for maintaining proprietary software and
>payware under many circumstances.  Each individual, each business, each
>cooperating group of developers must make their own decision on this.  And
>again, there is no moral dimension to the decision.  If I write a program,
>it's mine to give away, sell, lease, trade, or rm -rf at my whim.
>
>: While you are
>: certainly under no obligation to do so, neither are we under any sort of
>: obligation to help you in your embarrassing pursuit of shameful hoarding.
>
>Oh, please.  Turn the rhetoric nob back down to about 7, please, you're
>hurting my ears. :)  Is a carpenter failing to give away tables and
>cabinets 'hoarding'?  In your world, he'd give away the cabinets, then
>make his money off dropping by to maintain and polish them, and to point
>out hidden drawers the client might not have noticed. Different business
>model, that's all it is.  Or don't you eat? 

An unfair comparison, I didn't hear any complaints about you charging for
your software, just about trying to hide the perl code from those who might
be able to learn from it.

How does people seeing the source code reduce the income you generate from it?

I can just as easily copy a binary and illegaly use it as I can source code...
You can license the code so that it can not be copied or redistributed in 
exactly the same way as you license the executable. Of course there may be
some who break the law, but that applies to both the source and the executable.

A Carpenter will sell you the cabinet, just as you might sell your perl 
program. The carpenter won't stop you examining how the cabinet is put together,
but you would stop him from examining how your code works. The carpenter will
try to stop you ripping of some engraved artwork he did on the cabinet, just
as you will try to stop someone ripping of the source code that you wrote. 

He doesn't go as far as to try to make it hard to see how the cabinet is put
together.
>
>: I do not wish you luck, because I am morally opposed to the choice you
>: are attempting to make.
>
>I'll be interested to see the moral system that leads to this extreme a
>position...

I don't understand this whole 'hide-the-source' mentality. OK some people might
steal from you by illegaly redistributing or using the source, but a simple
licensing agreement will stop all but those who would steal your executable
version anyway.

Look at the GPL it is based on the assumption that people will honour the
license and not use GPL code without following the agreement and putting there
copde under GPL as well. Of course I'm sure some people have broken the
agreement and broken the law - but that is on their conscience...

Sam



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

Date: 24 Aug 1998 17:46:02 -0700
From: jbc@west.net (John Callender)
Subject: Re: Perl documentation
Message-Id: <6rt1ga$r08@acme.sb.west.net>

Christian Brink (strat@pacifier.com) wrote:
: I was
: shutdown for a day due to a munged address where  someone used my domain
: name.

This happens to me, too. I never realized when I registered the domain 
name 'lies.com' how many people there were out there who randomly choose 
it as the domain of their bogus reply when someone asks them for an email 
address.


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

Date: Tue, 25 Aug 1998 00:57:19 GMT
From: dhawker@bigfoot.com (David Hawker)
Subject: Re: Perl documentation
Message-Id: <35e70ab8.1380897@news.cableol.net>

On Sun, 23 Aug 1998 20:17:02 GMT, gburnore@databasix.com (Gary L. Burnore)
felt the need to post:

>>>>Or instead you can use a fakebouncer - make the spammers think your address
>>>>is invalid. I have made the only one I know exists.
>>>
>>>Yawn.  Old stuff. Works sometimes, others not. Easy to do in sendmail.
>>
>>It really relies on having a working return address in the spam - anyone
>>ever had one of those???
>
>No, sorry, but it doesn't.  It relies on your server's ability to determine
>where IT received the mail from.  

Which gets passed to you in the header fields as a "working" return address
:)

>It's easy to set up a score filter to
>determine the likelyhood that it's SPAM and drop it either in /dev/null or in
>a file for later action or automatically forward a canned complaint to the
>site that allowed it to be sent to you.

If you have control of your mailserver. :)

>>>Still, the article needs to get to your server for the process to work. By
>>>putting an invalid address in the from line, the email never GETS to your
>>>system.
>>
>>But these days spamming programs can be clever and scan for stuff like
>>"removethis" or "NOSPAM"
>
>But not smart enough for other sayings or misspelled words or
>_NON_EXISTANT_DOMAINS_.

Ah but how long before someone goes and registers those domains?

Although granted, something like fg678dg6f7dg6f78dg6fd.com is never going
to get registered. :-)

You'd still have to include your correct domain in there though, in a way
that people could see what to get rid of.

--
dhawker@bigfoot.com | ICQ 7222349
http://dhawker.home.ml.org


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

Date: Tue, 25 Aug 1998 10:51:07 +0900
From: no.unsoliciteds@dead.end.com
Subject: Re: Perl documentation
Message-Id: <35E21890.8377E1E3@dead.end.com>

Mark-Jason Dominus wrote:
> No, completly wrong.  Here it is again: I am dismayed that you are in
> such a hurry to badmouth people you don't like that you don't bother
[snip]
Whether you think clarification is necessary or not:
if you had actually read what I'd written instead of firing off a kneejerk
reply to the first five lines to defend the honour of your friends and the
integrity of the NG you would have seen I clarified as to whom exactly I was
referring. In the interests of avoiding repetition by quoting my own posting I
suggest you re read it, if however you are still unable to distinguish them
then I suggest you ask around, but then it's only fair to warn you, you might
get flamed for not researching the archives before asking.


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

Date: Mon, 24 Aug 1998 21:39:40 -0700
From: Steve Palincsar <palincss@tidalwave.net>
Subject: Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFORE POSTING
Message-Id: <35E2400C.40E0@tidalwave.net>

no.unsoliciteds@dead.end.com wrote:

> Check out the posting "Statistics for comp.lang.perl.misc" the bulkiest
> threads were those that degenerated into petty verbal mud slingings caused by
> somebody knowing too much Perl and not enough common sense.

Well, if the shoe fits...  You certainly are responsible for lots of it.
However I suspect in your case the problem is not "knowing too much
Perl."

By the way -- if you have a name, are you ashamed to use it?  

Steve Palincsar


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

Date: Tue, 25 Aug 1998 01:29:16 GMT
From: vibes8785@my-dejanews.com
Subject: Re: Perl on linux--running scripts w/out the perl or ./ 'filename'
Message-Id: <6rt41c$cnq$1@nnrp1.dejanews.com>

In article <6rk1bm$o7n@nnrp2.farm.idt.net>,
  kthor@mail.idt.net wrote:
> Hi!  I've been writing perl scripts for awhile on Win95, but recently
> decided to install linux on my computer.  Now I can't even get a
> simple script to run!  Perl is located at /usr/bin/perl, but when I
> add this command as the first line of the script, it doesn't work :
> #!/usr/bin/perl.  The error message says something like program not
> found. When I run the following from the command line though, it works
> great:
>
> 	/usr/bin/perl perltest.pl
>
> Whats going on here?  i didn't install perl myself, it came with the
> RedHat 5.1 installation.  Any ideas?
>
Hello there! here is a useful tidbit for running your script! your right perl
is in /usr/bin/perl but-- you need you home path set to read your script!
  Use your script editor(I like vi) and in your home dir type vi .bash_profile
next go down to env= and also path= and add :$HOME to the end of the argument
 Exit and save and it should work just fine :)
       ViBeS~~
> 	Kevin Thorley
> 	kthor@idt.net
>
>


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Mon, 24 Aug 1998 20:32:16 -0400
From: Chandrakanth Kandiakounder <chandrak@ml.com>
Subject: Problem with perl.h compilation.
Message-Id: <35E2060F.7AC0F79C@ml.com>

Hi,

 I am trying to compile this small program in solaris 2.5 C++
Compiler. I am getting a bunch of errors.

 If I use the gcc compiler the code gets compiled without any
problem. I have to get it compiled using the Solaris compiler. Any
help will be highly appreciated. Thanks.

-Chandrakanth



$ cat my.c

#include "iostream.h"
#include "EXTERN.h"
#include "perl.h"

main()
{
    cout << "This is a test\n";
}


==============================================================================



[fisad022]chandrak$ [fisad022]chandrak$ c++ -Dexplicit= my.c
-I/opt/local/lib/perl5/sun4-solaris/5.003/CORE

c++ -Dexplicit= my.c -I/opt/local/lib/perl5/sun4-solaris/5.003/CORE

==============================================================================

Solaris C++ Compiler output:

[fisad022]chandrak$ CC -Dexplicit= my.c
-I/opt/local/lib/perl5/sun4-solaris/5.003/CORE

CC -Dexplicit= my.c -I/opt/local/lib/perl5/sun4-solaris/5.003/CORE
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 45: Error:
"{" expected instead of "__attribute__".
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 45: Error:
The function __attribute__ must have a prototype.
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 45: Error:
The function format must have a prototype.
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 45: Error:
noreturn is not defined.
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 55: Error:
Badly formed expression.
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 64: Error:
Unexpected type name "OP" encountered.
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 64: Error:
The function Perl_die must have a prototype.
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 64: Error:
Badly formed expression.
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 223: Error:
Badly formed expression.
"/opt/local/lib/perl5/sun4-solaris/5.003/CORE/proto.h", line 466: Error:
Badly formed expression.
"my.c", line 8: Error: "}" expected instead of "end of file".

--
==============================================================================

The woods are lovely dark and deep
But I have promises to keep
And Miles to go before I sleep
And Miles to go before I sleep.





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

Date: 25 Aug 1998 00:53:59 GMT
From: gtod@netspace.net.au (Gregory Tod)
Subject: Re: Question using pack
Message-Id: <6rt1v7$2ac$2@otis.netspace.net.au>

On Mon, 24 Aug 1998 Cliff R. Warren <warren@poci.amis.com> wrote:
>I'm pulling my hair out trying to convert simple decimal numbers
>into hexadecimal and binary...

>Assuming that I use pack for this, I'm can't seem to get the template
>correct for the input decimal number. From the Camel book, I assume
>it to be "I", as in:

Problem there, that specifier will turn your arg into an 'unsigned
integer value' -- something you computer understands but which wont
mean much to you.

Read up on 'hex' in the Camel and you'll see:

    sprintf "%lx", $number;

for converting a number to a hex string.

-- 
Gregory Tod   gtod@netspace.net.au


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

Date: Tue, 25 Aug 1998 01:31:13 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: subsorting a report
Message-Id: <Pine.GSO.4.02A.9808241830250.4382-100000@user2.teleport.com>

On Mon, 24 Aug 1998, Alan Melton wrote:

> Would like to sort report on $sku
> 
> or do a double sort, first on date, then on sku.

What's stopping you? :-)

There's good documentation on sort, including multi-level sorts, in the
manpages. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 25 Aug 1998 00:09:35 GMT
From: duke@co.kittitas.wa.us (Duke)
Subject: Re: Threading/forking simple(?) programs
Message-Id: <35e20050.373044970@mars.co.kittitas.wa.us>

On 24 Aug 1998 22:04:43 GMT, Zenin <zenin@bawdycaste.org> wrote:

<SNIP>
>        The system() function doesn't come back until the process it
>        ran is done.  I'd recommend forking the bar part and then blocking
>        on system(foo).  When system(foo) is done, block on waitpid(bar),
>        or start another fork(bar) to handle the last system(foo).
>
>        Good luck!
>
>-- 
>-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
>BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
>Berkeley or thereabouts.  Similar in many ways to the prescription-only
>medication called "System V", but infinitely more useful. (Or, at least,
>more fun.)  The full chemical name is "Berkeley Standard Distribution".

Thanks for the answer, but...
pardon me for being completely daft, but I'm not sure how to use your
answer.  Perhaps I projected more intelligence on my part than was
warranted.

I have (roughly):
   sub foo
   {
      # run foo with it's paramters
   }
   sub bar
   {
      # run bar with it's parameters
   }

#pseudomain
#{
      # find the operating parameters here
      ....
   foreach $iteration (@iteration)
   {
      foo;
      bar;
   }
#}

So, how do I implement your answer?
I've read the sections on man perlipc and the 'talking to yourself'
from the Camel book (ch. 6) - about the same info- , but it's just not
sinking in properly.  Help one more time please?

Thanks very much for your response.
Duke



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

Date: 25 Aug 1998 00:58:04 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Threading/forking simple(?) programs
Message-Id: <904006599.447852@thrush.omix.com>

Duke <duke@co.kittitas.wa.us> wrote:
        >snip<
> So, how do I implement your answer?

        Hmm, maybe something like:

        ## Build first set of data for first bar() to work on
        my $iteration = shift @iteration;
        foo ($iteration); ## Blocks until done.
        ...your rename file code here...

        foreach my $iteration (@iteration) {
            ## Standard fork() code
            my $pid = fork();
            defined $pid or die "fork(): $!";

            ## These run at the same time.  The bar() processes the
            ## data from the *last* foo(), not this foo().  In the
            ## first iteration, this would be from the foo() before
            ## the foreach() loop.
            if ($pid) {
                ## Parent
                bar();
            }
            else {
                ## Child
                exit foo();    ## To run $iteration foo's data
                ## Exit value the return value of foo().  Remember, 0 is
                ## "good" and > 0 is "bad".
            }

            ## Sync everything
            waitpid ($pid, 0);  ## Block until foo() is done
            die "Child error: $?" if $?;
            ...your rename file code here...
        }

        bar();  ## To process last iteration of foo's data

        __END__

        In effect, if we have to do this 5 times we get:
        
            run Foo1
            run Bar1 and Foo2
            run Bar2 and Foo3
            run Bar3 and Foo4
            run Bar4 and Foo5
            run Bar5

        So, at any point in time you're running at most two processes, but
        the first and last iteration are special cased as the first Bar
        can't start until the first Foo is done, and this ends up offsetting
        the entire loop so that the Bar to handle the last Foo gets run
        on its own.

        Like I said, if Foo was a filter this would be *so* much easier...
        :-/
-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Tue, 25 Aug 1998 01:27:17 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Using modules on a server
Message-Id: <Pine.GSO.4.02A.9808241825380.4382-100000@user2.teleport.com>

On Mon, 24 Aug 1998, Luke Steele wrote:

> Given that I can't place the modules in question in the perl/lib
> directory (where I presume they would normally go, and where the
> hosting compay won't let me put them!), how do I tell my script to
> look elsewhere?

See section 8 of the FAQ about keeping your own directory of modules. Hope
this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 25 Aug 1998 00:01:20 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: Why dont people read the FAQs
Message-Id: <35e4feaf.13412872@nntpd.databasix.com>

On Mon, 24 Aug 1998 11:28:27 -0500, in article
<fl_aggie-2408981128270001@aggie.coaps.fsu.edu>, fl_aggie@thepentagon.com (I R
A Aggie) wrote:

>In article <35e2eabb.135535060@news.mmc.org>, drummj@mail.mmc.org wrote:
>
>+ Sigh. Pointlessly combatative and (unfortunately) predictable. I guess I
>+ should thank you for so tidily reinforcing my point.
>
>Burnore can be safely ignored.
>
>James

fl_aggie is a jerk

*plonk* (should have done that a long time ago but his idiotic posts were far
to funny to miss, now he's just a jerk.
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups.          |     Official Proof of Purchase
===========================================================================


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

Date: Tue, 25 Aug 1998 00:04:05 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: Why dont people read the FAQs
Message-Id: <35e5ff1c.13521119@nntpd.databasix.com>

On 24 Aug 1998 18:13:06 GMT, in article <6rsafi$t2v$1@srv38s4u.cas.org>,
lvirden@cas.org wrote:

>
>According to Jeffrey Drumm <drummj@mail.mmc.org>:
>:lvirden's post, as quoted in your reply:
>:>>I sure wish folk WOULD wait a few weeks instead of sending 7, 8 or more
>:>>copies of the same posting to this newsgroup.
>:
>:Now, *I* read this, and saw lvirden making a general comment about posting
>:multiple copies of articles, and *I* chose to believe he either didn't
>:check the headers or was uneducated as to the workings of Usenet. Not a
>:crime in my book, and certainly nothing to warrant something like "stfu."
>
>and from lvirden's point of view...
>
>I was reading thru comp.lang.perl.misc.  I see lots of copies of the
>same msg by the same person.
>
>I look at headers.  They all look like they are coming from the same
>place.  I am unaware of any way to determine whether this location has
>anything to do with the original poster or not - lots of folk have
>a posting address of one thing and a nntp host site somewhere else.
>
>So, after seeing more and more of this type of thing from the same user,
>I check around, find out that the poster's site doesn't know what's
>causing the problem.

You're mistaken with this statement.  DataBasix did indeed know that the
problem wasn't with databasix.com from the start. 


>  Then, later, I finally see the same phenom relating
>to a poster whom I a) know is experienced with usenet and b) know would
>appreciate knowing what is going on.  I contact the poster directly along
>with the postmaster of the site thru which the duplicates are coming,
>asking if anyone knows what is going on.
>
>I get a nice thank you note back from the clpm poster, letting me know
>how much he appreciates finding this out.
>
>I certainly would not have expected any such reply from a number of
>others on this newsgroup.
>
>And I _still_ would prefer to see folk read a thread for a few
>weeks instead of sending multiple copies of the same posting.  Has
>nothing to do with the thread in question - I see the phenom around
>usenet on many groups.  They get errors back from their poster, start
>hitting send several more times, then realize a few days later what
>they have done - and then post nasty msgs or apologies...

So are you saying your post was a crack at me for the multiple posts or not?
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups.          |     Official Proof of Purchase
===========================================================================


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

Date: Mon, 24 Aug 1998 21:05:40 -0500
From: Mike <mhanson@arrowweb.com>
Subject: Y2K Date Support
Message-Id: <35E21BF4.6B46@arrowweb.com>

How do you get the date and allow it to support the Year 2000? I have
been using the following code but it only goes to 1999.

@days =
('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
@months =
('January','February','March','April','May','June','July','August','September','October','November','December');
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
if ($hour < 10) { $hour = "0$hour"; }
if ($min < 10) { $min = "0$min"; }
if ($sec < 10) { $sec = "0$sec"; }
$date = "$days[$wday], $months[$mon] $mday, 19$year at
$hour\:$min\:$sec";


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

Date: 12 Jul 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 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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