[7840] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1465 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 12 23:07:11 1997

Date: Fri, 12 Dec 97 20:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 12 Dec 1997     Volume: 8 Number: 1465

Today's topics:
     1st Script/Where's the bug ? <alexcraig@thebestjobs.com>
     Re: Call a script automatically from a webpage <Lars.Kristensson@ne.su.se>
     Re: Capturing the previous URL? <rootbeer@teleport.com>
     Re: date conversation ??? (Charles DeRykus)
     Re: Error Number 2 <rootbeer@teleport.com>
     Re: failed to close pipe into sendmail <rootbeer@teleport.com>
     File test operators with symbolic links <walton@world.std.com>
     Re: HASH trouble ? *precious help* (Bryan Wilkinson)
     Re: Help with special caracters <rootbeer@teleport.com>
     Improve my Perl Loop <lach@lach.net>
     Improve my Perl Loop <lach@lach.net>
     Re: mkdir command (Abigail)
     Re: Older versions of swatch <rootbeer@teleport.com>
     Re: perl puzzler <rootbeer@teleport.com>
     Re: Perl support for the long long type (Lloyd Zusman)
     PerlMagick, how to concate 2 or more images? <Tmaster@tea.com>
     Re: possible type at C:\Perl\lib\Win32\ODBC.pm <rootbeer@teleport.com>
     Re: Question about the =~ operator (John Stanley)
     Re: setting environment variable within perl script <rootbeer@teleport.com>
     Re: Suidperl <rootbeer@teleport.com>
     Re: unix command in perl (Billy Chambless)
     Re: what does qq() do? <ebohlman@netcom.com>
     Re: Which language pays most 17457 -- C++ vs. Java? (peter olsen)
     Re: Which language pays most 17457 -- C++ vs. Java? <steve@afs.net.au>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 12 Dec 1997 14:42:54 -0500
From: Alex Craig <alexcraig@thebestjobs.com>
Subject: 1st Script/Where's the bug ?
Message-Id: <349193BD.FFAE131F@thebestjobs.com>

Decided to move up from Prism to Perl.

My first script is supposed to simply read a file and strip out any
addresses ending in .uk

Unfortunately it leaves me with a blank file.

Any help would be appreciated.

Here's the script.

**********************************************************
@ARGV = ("c:\\pmail\\mail\\alex\\bulk1.pml");
$^I = ".bak";
while (<>) {
         $where = index($_,".uk\n");
         if ($where != -1) {
            $_ = ''                 # or try substr($_, 0);
         }
}
********************************************
Thanks in advance for any help.

--
Regards,

Alex Craig, General Manager
Technical Placement, Inc.
P.O. Box 23
Pennsburg, PA  18073
Voice:    215-679-4620
Fax:      215-679-5384
Email:    alexcraig@thebestjobs.com
Web Site: http://www.thebestjobs.com




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

Date: Sat, 13 Dec 1997 04:20:34 +0100
From: Lars Kristensson <Lars.Kristensson@ne.su.se>
Subject: Re: Call a script automatically from a webpage
Message-Id: <3491FF02.2ECE0F7E@ne.su.se>

> In article <349150C8.506@builders-connection.com>, Webmaster@builders-connection.com wrote:
> 
> >is there a way to call script automatically from a webpage just by
> >logging on to that page. Say you go to http://mysite.com/thepage.htm
> >and have the script run automatically to redirect you? All the scripts
> >I've seen require some kind of action to make them work.

I'm sure a 

<META HTTP-EQUIV="refresh" CONTENT="0;URL=/path/myscript">

in the <HEAD> section would work for most browsers. Keep a "manual" link
on the original page for "Safety's" sake. Whoever she is...

-- lars.kristensson@ne.su.se, Dept of Economics, Stockholm Univ
Tel:+46-8-16 31 13, Fax:+46-8-15 94 82, Mob:+46-70-667 62 63


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

Date: Fri, 12 Dec 1997 18:43:36 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Brian Godden <bgodden@apple.com>
Subject: Re: Capturing the previous URL?
Message-Id: <Pine.GSO.3.96.971212184217.14102R-100000@user2.teleport.com>

On 12 Dec 1997, Brian Godden wrote:

> I'm trying to capture the last URL accessed by a browser that goes to my
> form and submits. 

If there's a way to do this, there's nothing Perl-specific about doing it.
Try the docs and FAQs about CGI scripting, and (if you still can't find
your answer) you could ask in a newsgroup about CGI. Good luck!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Sat, 13 Dec 1997 00:21:01 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: date conversation ???
Message-Id: <EL3qB3.K17@bcstec.ca.boeing.com>

In article <34914968.30566751@news.remsmurr.de>,
Sigi <sigi@remsmurr.de.delete.this> wrote:
>
>Hello
>
>I was wondering if someone has a fine little script or know of it wich
>takes todays date and says to me what date last friday (sample) had. I
>thank very much for grandiose answers and tips.
>

I believe either of the CPAN modules Date::Calc or 
Date::Manip can help. 

For a list of CPAN sites:

http://www.perl.com/CPAN-local/SITES.html



Regards,
--
Charles DeRykus 


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

Date: Fri, 12 Dec 1997 18:48:11 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: ben <giga@microtec.net>
Subject: Re: Error Number 2
Message-Id: <Pine.GSO.3.96.971212184650.14102T-100000@user2.teleport.com>

On 12 Dec 1997, ben wrote:

> 	I'am new in Perl's world, and when I want to use the CGI.pm, I
> have this message : Can't find string terminator "END_OF_AUTOLOAD"
> anywhere before EOF at /usr/lib/perl5/CGI.pm line 672. 

That's a sure sign that CGI.pm is mis-installed. Probably it was moved
improperly to or from a DOS/Windows-type machine, although there are other
reasons it might not work. Try re-installing it. Good luck!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Fri, 12 Dec 1997 18:13:51 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Ian Kallen <spidaman@well.com>
Subject: Re: failed to close pipe into sendmail
Message-Id: <Pine.GSO.3.96.971212180422.14102G-100000@user2.teleport.com>

On Fri, 12 Dec 1997, Ian Kallen wrote:

> When I set $SIG{CHLD} = 'IGNORE'; or just leave it unset, the zombies
> accumulate (watching 'top') like crazy but the program speeds right along
> doing what I want it to do: write out messages in deferred mode to the
> queue directory.

Yes, that's what zombies do. :-) What you should probably do is use
waitpid() to wait for them individually. 

> Interestingly, the zombies evaporate when I exit the program (I thought
> the definition of a zombie was a process hanging around cause it wasn't
> done when the parent exited).  

Well, a zombie is a process which is dead, but which has not been reaped.
In other words, they will stay around until you wait for them. But if your
process exits, they become children of init, which will reap them at once.

> I tried 
> 'local $SIG{CHLD} = sub { waitpid(-1,&WNOHANG); };'
>  but then I get weird errors 

Yes; that handler was probably reaping other children, alas. (That's
probably where your QUEUE went - along with its status.) But that handler
still won't get rid of all zombies: if two child processes die at about
the same time, you'll get only one signal, so you'll only be waiting for
one. That's why it's better to use waitpid on a process that you know
should be dead by now. Or push each new pid onto @pids, then call this
periodically. (You could call this via $SIG{CHLD}, but that may be
unsafe.) 

    sub reaper {
	# Uses global list @pids, reaps any it can
	@pids = grep waitpid($_,&WNOHANG)==-1, @pids;
    }

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Sat, 13 Dec 1997 02:02:36 GMT
From: Damani Walton <walton@world.std.com>
Subject: File test operators with symbolic links
Message-Id: <3491ECBC.2781@world.std.com>

How can one test the attributes of a symbolic link?  Using the file
test operators, I tell whether a file is a link or not, but tests of
things such as whether the file actually exists and when it was last
modified apply to the file referenced by the link, not to the link
itself. 

What I want to do is test the inode change time of a symbolic link
which references a file which may or not actually exist.  Using the -C
operator doesn't give me the information that I want.  It just gives
me an error about using an uninitialized value, since in the particular
case I testing, the referenced file is absent.

I'm using Perl version 5.003.


Thanks in advance.

Damani


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

Date: Fri, 12 Dec 1997 17:06:53 GMT
From: nardo@pobox.com (Bryan Wilkinson)
Subject: Re: HASH trouble ? *precious help*
Message-Id: <34936ee0.219787105@news.supernews.com>


>    $fiche{'$k'}=$t;

remove the single quotes and it should do what you want:

$fiche{$k} = $t;



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

Date: Fri, 12 Dec 1997 18:28:12 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Mark S. Reibert" <reibert@mystech.com>
Subject: Re: Help with special caracters
Message-Id: <Pine.GSO.3.96.971212182551.14102J-100000@user2.teleport.com>

On Fri, 12 Dec 1997, Mark S. Reibert wrote:

> read( STDIN, $inputBuf, $ENV{'CONTENT_LENGTH'} );

For many reasons, it's almost always better to use a module (such as
CGI.pm) to process CGI form data, rather than doing it yourself. 

> @varPairs = split( /&/, $inputBuf );
> foreach $pair ( @varPairs ) {
>   ( $name, $value ) = split( /=/, $pair );
>   $value =~ tr/+/ /;
>   $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>   $form{ $name } = $value;
> }

One of the big reasons being that CGI.pm does it correctly. :-)  Hope this
helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Fri, 12 Dec 1997 16:43:51 -0600
From: Lachlan Dunlop <lach@lach.net>
Subject: Improve my Perl Loop
Message-Id: <3491BE27.635DDC94@lach.net>

Hello,

Here his some code it takes a string and parses it into a hash.  Is
there a better way to do this (there always is!!).

I am looking to improve my ability to compress my perl code (no I don't
mean to remove the white space).  I mean to cut down on the number of
statements.  And get rid of work variables (like in the parse
subroutine).

Rip away :))  Thanks

Lach

sub file_loop {

        my ($file) = "data/scaledata/971211s1.pld";
        my (%h);

        @ln =
(aa,9,ab,6,ac,10,ad,16,ae,22,af,18,ag,10,ah,2,ai,3,aj,4,ak,9,al,4,
am,1,an,1,ao,7,ap,14,aq,5,ar,5,as,7,at,8,au,5,av,1,aw,5,ax,5,ay,7,az,7,ba,1,bc,1

,bd,11,be,1,bf,1,bg,22,bh,22,bi,22,bj,12,bk,10,bl,1,bm,11,bn,18,bo,22,bp,22,bq,2

2,bs,22,bt,16,bu,2,bv,10);

        open (SCALEDATA, $file) or die "Can't open ups scale file:
$file\n";

        while (<SCALEDATA>) {
                       %h =    parse($_, @ln);
         }
        close(SCALEDATA);
}


sub parse {
        my($value, @e) = @_;
        my(%result);
        my($startpos)=0;
        my($len);
        my($name);

        while (($name=shift(@e)) ne "") {
                $len = shift(@e);
                $result{$name} = substr($value, $startpos, $len);
                $startpos += $len;
        }

        return %result;
}






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

Date: Fri, 12 Dec 1997 12:58:49 -0600
From: Lachlan Dunlop <lach@lach.net>
Subject: Improve my Perl Loop
Message-Id: <34918969.64DF9E5E@lach.net>

Hello,

Here his some code it takes a string and parses it into a hash.  Is
there a better way to do this (there always is!!).

I am looking to improve my ability to compress my perl code (no I don't
mean to remove the white space).  I mean to cut down on the number of
statements.  And get rid of work variables (like in the parse
subroutine).

Rip away :))  Thanks

Lach

sub file_loop {

        my ($file) = "data/scaledata/971211s1.pld";
        my (%h);

        @ln =
(aa,9,ab,6,ac,10,ad,16,ae,22,af,18,ag,10,ah,2,ai,3,aj,4,ak,9,al,4,
am,1,an,1,ao,7,ap,14,aq,5,ar,5,as,7,at,8,au,5,av,1,aw,5,ax,5,ay,7,az,7,ba,1,bc,1,bd,11,be,1,bf,1,bg,22,bh,22,bi,22,bj,12,bk,10,bl,1,bm,11,bn,18,bo,22,bp,22,bq,22,bs,22,bt,16,bu,2,bv,10);

        open (SCALEDATA, $file) or die "Can't open ups scale file:
$file\n";

        while (<SCALEDATA>) {
                       %h =    parse($_, @ln);
         }
        close(SCALEDATA);
}


sub parse {
        my($value, @e) = @_;
        my(%result);
        my($startpos)=0;
        my($len);
        my($name);

        while (($name=shift(@e)) ne "") {
                $len = shift(@e);
                $result{$name} = substr($value, $startpos, $len);
                $startpos += $len;
        }

        return %result;
}


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

Date: 13 Dec 1997 03:36:27 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: mkdir command
Message-Id: <slrn6940p5.50c.abigail@betelgeuse.wayne.fnx.com>

Russ Allbery (rra@stanford.edu) wrote on 1564 September 1993 in
<URL: news:m3hg8f7x86.fsf@windlord.Stanford.EDU>:
++ [ Posted and mailed. ]
++ 
++ Kitty Smith <smith@twsuvm.uc.twsu.edu> writes:
++ 
++ > I am having trouble with the mkdir command.  I can't figure out what the
++ > permissions should be for the command to achieve a directory with 770.
++ > I have a umask of 022 set.  I get permissions of 775 when I use the
++ > following command:
++ 
++ > 	mkdir("newdir", 777);
++ 
++ If you do the following:
++ 
++         umask(022);
++         mkdir("newdir", 0777);
++ 
++ verbatim exactly as written (no additional quotes and including the
++ leading zeroes), does it do what you expect?  Modes for umask and mkdir
++ have to be in octal and Perl recognizes octal numbers by looking for bare
++ (unquoted) numbers beginning with 0.

Given the fact Perl often uses function names that come from someplace
else, and Perl isn't afraid to make exceptions, just "to do as you 
expect it to do", I don't think it is unreasonable to expect that
C<umask 022; mkdir "newdir", 777;> creates a directory with permissions
rwxr-xr-x.


Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


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

Date: Fri, 12 Dec 1997 18:46:02 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Nobody, Really" <salvation@triple.homicide.org>
Subject: Re: Older versions of swatch
Message-Id: <Pine.GSO.3.96.971212184520.14102S-100000@user2.teleport.com>

On 12 Dec 1997, Nobody, Really wrote:

> Only problem is there isn't a c compiler on there I can use.

You can get and install one of those as well, unless your vendor is
restrictive about giving out header files. In that case, you should port
Linux to your hardware. :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Fri, 12 Dec 1997 18:38:51 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Max Luther Tuinstra <tuinstra@ti.com>
Subject: Re: perl puzzler
Message-Id: <Pine.GSO.3.96.971212183818.14102N-100000@user2.teleport.com>

On Fri, 12 Dec 1997, Max Luther Tuinstra wrote:

> Why does $var have the value undef rather than "tarzan" in the print
> statement below? 

A bug in your version of Perl, perhaps? :-)  What version are you using?

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 13 Dec 1997 03:03:41 GMT
From: ljz@asfast.com (Lloyd Zusman)
Subject: Re: Perl support for the long long type
Message-Id: <slrn693uf5.i7.ljz@ljz.asfast.net>

On Thu, 11 Dec 1997 20:43:51 -0800, Tom Phoenix <rootbeer@teleport.com> wrote:
> On Thu, 11 Dec 1997, Vincent Joseph wrote:
> > The 5 byte integer that I wish to convert is actually Unix time in 100th
> > of a seconds.  (By Unix time I mean the value returned by the time
> > function.) 
> 
> [ ... ]
>
>     sub toSeconds {
> 	# Given a five-byte bitstring with an unsigned integer
> 	# value less than or equal to 429,496,729,599, returns that
> 	# value divided by 100, as a long unsigned integer
> 	[ ... remainder of algorithm deleted ... ]
>     }
> 
> Hope this helps!

Here's another one ... it's shorter and doesn't use multiplication:

 sub toSeconds {

   # Split the 5 bytes into a high-order 4-byte unsigned long
   # and a low-order 1-byte unsigned char ...

   my ($uchar, $ulong) = unpack('CL', shift);

   # Get the quotient and remainder which result from dividing
   # the high-order value by 100 ...
   
   my $quotient = int($ulong / 100);
   my $remainder = ($ulong % 100);

   # To truncate the resultant seconds ...
   return ( ($quotient << 8) +
            int( (($remainder << 8) + $uchar) / 100 ) );

   # To round the resultant seconds ...
   #return ( ($quotient << 8) +
   #         int( (($remainder << 8) + $uchar + 50) / 100 ) );
 }

The 8-bit shift of '$quotient' is guaranteed not to overflow a 4-byte
unsigned long as long as the 5-byte input is truly a value whose magnitude
cannot be larger than (2^32 - 1)*100, which would indeed be the case
if this truly is the number of hundredths of seconds since 1/1/1970.

'$remainder' is a value between 0 and 99, and hence, its 8-bit shift
couldn't possibly overflow a 4-byte unsigned long.

I'll email the mathematical proof for this algorithm, if you're
interested ... and I'll post this mathematical proof if any readers of
the newsgroup are interested.

Good luck!

-- 
 Lloyd Zusman
 ljz@asfast.com


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

Date: Fri, 12 Dec 1997 12:12:02 -0600
From: T-Master <Tmaster@tea.com>
Subject: PerlMagick, how to concate 2 or more images?
Message-Id: <34917E72.64B55F00@tea.com>

I know i can use the montage call to do it, but then it only reads from file, I
mean I need to play with the images before I concate them.  Is there a way I can
do it without writing the images to new files, then call the montage function.

Here is a sample code:

use Image::Magick;

my $p = new Image::Magick;
my $q = new Image::Magick;

$img = "/users/skang/pics/asian.jpg";
$icon = "/users/skang/pics/il-icon.gif";


$p->Read($img);
$p->Read($icon);
$p->[0]->Scale(width=>'400',height=>'50');
$p->[1]->Scale(width=>'50',height=>'50');

# this is the part that i can't seem to make it to work.  
$q->Montage(geometry=>'450x50', -mode=>'Concatenate', tile=>'2x1',
filename=>$p);

$q->Write('yes.jpg');

undef $q,$p;

The above, montage doesn't work for me.  

another question,

Identifier "main::wh" used only once: possible typo at /home/skang/bin/imgsize
line 53.

whenever i use the -w option, i get this kind of annoying warning.  I know I use
the $wh for only once, but why does it complain when i use it only once?   

if somebody has any experience with this, please help.  thanks. 


-- 
-----------------------------------------------------------------------------
Kang Soon Lai	skang_at_granax.com	| "If there is any religion that would
http://www.granax.com/~skang/		| cope with modern scientific needs
(913) 385 5481				| it would be Buddhism."
Software Engineer			|		--Albert Einstein
------------------------------------------------------------------------------
`When you say "I wrote a program that crashed Windows", people just stare at
you blankly and say "Hey, I got those with the system, *for free*".'
							--Linus Torvalds


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

Date: Fri, 12 Dec 1997 18:32:50 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Henry Hartley <henry@DotRose.com>
Subject: Re: possible type at C:\Perl\lib\Win32\ODBC.pm
Message-Id: <Pine.GSO.3.96.971212183201.14102L-100000@user2.teleport.com>

On Fri, 12 Dec 1997, Henry Hartley wrote:

> Although my script runs, having -w on (which I do), produces the
> following messages:
> 
> Name "Win32::ODBC::CacheConnection" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 30.
> Name "ODBCPackage::Version" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 28.
> Name "Win32::ODBC::CacheConnection" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 30.
> Name "main::ODBC" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 29.
> 
> Now, I suspect there aren't really typos in ODBC.pm but I'm curious
> about these warnings.  I don't like to ignore messages since they are
> usually there for a reason.  What would cause this?

The author of ODBC.pm didn't use something like 'use vars' when writing
the module. You should probably send the author a patch to fix this. :-)
Thanks!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 13 Dec 1997 02:57:48 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Question about the =~ operator
Message-Id: <66stjc$j43$1@news.orst.edu>

In article <eejalaqilaaaknu.pminews@user-38lcphd.dialup.mindspring.com>,
Ben Coleman <bcoleman@mindspring.com> wrote:
>On 12 Dec 1997 19:26:07 GMT, John Stanley wrote:
>
>>Exactly what harm has the domain owner done to you that makes you think
>>it's ok to do whatever you want with his domain name?
>
>Calm down, John.

Calm down yourself, Ben. 

>1.  I haven't done anything with his domain name, and I don't think
>the original poster has either, in any meaningful sense.

Yes, he was creating bogus addresses within that domain. "Meaningful
sense" is an objective determination and is simply your opinion. I've
been there. It's meaningful because it can cost people money. You can
take great pains not to advertise an address so you don't have to pay
for spam, and one jerk forging addresses within your domain (so HE won't
have to deal with spam) wastes all that effort. 

>2.  Since when is personal harm a prerequisite for disapproval of
>someone else's actions?  (note that if it were a prerequisite, your
>own complaint would be ruled out of bounds on that basis alone).

If you read what I read very closely, you might note that I did not say
you could not dissapprove of whatever you wanted. You were, however,
condoning someone's action based on the meaningless criterion that it
was harmful only to a "domain hoarder" or some such term. I simply asked
you what harm he had caused you that you would approve of someone else
harming him. It's a simple question, and I would think that you could
answer it. Maybe you don't need an excuse.

>3.  In any case, your original complaint is specious, at best.  It's
>not much different from any other anti-spam mangling of a From
>address into a bogus address.  

Yes, there is a difference between "mangling" a From address into a
completely bogus address and fabricating addresses within an existing
domain. 

>The worst that can result from it is a
>few hits on OKDirect.com's DNS servers.  

This is marvelous. In once sentence you mention spam, and in the next
dismiss it. The "worst" that can happen is that the spammers happily
record the bogus address and start dumping spam there. The address gets
burned into a CDROM and sold forever. When the domain owner decides to
add hosts to his network, wham, spam, thank you ma'am.

>Unless you're making a habit
>of objecting to all anti-spam From address mangling, ...

You might find it useful to read what has been written and limit your
imagination to that. Telling someone that they are wrong for fabricating
addresses in a currently existing domain is a long, long way from
objecting to all munging.

>... I'm not exactly sure why you made the comment in the first place.

Because someone was forging addresses in an existing domain which is
not a friendly thing to do. It's pretty obvious why I made the comment;
the comment itself says why. 



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

Date: Fri, 12 Dec 1997 18:50:29 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: rgay@palmetto.net
Subject: Re: setting environment variable within perl script
Message-Id: <Pine.GSO.3.96.971212184841.14102U-100000@user2.teleport.com>

On Fri, 12 Dec 1997 rgay@palmetto.net wrote:

> Can anyone tell me the proper way to set an environment variable
> within a perl script?

The Perl FAQ talks about this, and so does the perlvar manpage.

> I have a script written that mails the contents of a form and
> additionally utilizes pgp to encrypt a portion of the mail message.

Why aren't you using a module? That's probably easier, more convenient,
and already debugged. Hope this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Fri, 12 Dec 1997 18:41:48 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Craig A. Keefner" <keefner@kinetic.com>
Subject: Re: Suidperl
Message-Id: <Pine.GSO.3.96.971212184125.14102Q-100000@user2.teleport.com>

On Fri, 12 Dec 1997, Craig A. Keefner wrote:

> I haven't found any doc on using suidperl. 

Try perlsec(1). Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 13 Dec 1997 02:01:14 GMT
From: billy@cast.msstate.edu (Billy Chambless)
Subject: Re: unix command in perl
Message-Id: <66sq9a$e7i$1@NNTP.MsState.Edu>

In article <348CBC86.1CF8CD6@nycport.com>, hedon <hedon@nycport.com> writes:



|>        I have one terse ,nevertheless,
|>        important question .
|>        How can  a unix command be
|>        executed in perl script ???
|>          I knew one way , however ,this

         Do you still ,know that way?
	 Did it quit working ,or did
	   you forget it ???

|>        ,from no appearent reason, doesn't
|>          work for me  .

	 If the way you knew how to do it
	 ,didn't work any more ,maybe
	 you
	 should use the other one .

[ with respect to Andrew, Beckwith and ralph silverman ]



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

Date: Sat, 13 Dec 1997 03:11:31 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: what does qq() do?
Message-Id: <ebohlmanEL3y77.3Dn@netcom.com>

Ken Holm <rets@meta3.com> wrote:
: To be absolutely blah about the whole thing:

: $A = "Hello there";

:  and

: $A = qq!Hello there!;

:  are the same thing.  Perhaps there is some ultra-wiz, deep, neat-o kind
: of reason why they are different, but it shouldn't affect your code at
: all.

The main reason for having qq is that sometimes you need to quote 
something that includes lots of literal quote marks, and you don't want 
to get "leaning toothpick syndrome" by backwhacking all of them.

We all know how to do

perl -e 'print "hello, world!\n"'

on Unix systems, but on DOS/Windows systems the shell requires double, 
rather than single quotes to keep a space-containing argument together.

perl -e "print "hello, world!\n""

obviously won't cut it.  You *might* write

perl -e "print \"hello, world!\n\""

but that's rather awkward (and come to think of it, I'm not sure how MS 
shells deal with backwhacked quotes anyway).  Much easier to write

perl -e "print qq(hello, world!\n)"



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

Date: 12 Dec 1997 15:58:05 -0500
From: olsen@topdog.cs.umbc.edu (peter olsen)
Subject: Re: Which language pays most 17457 -- C++ vs. Java?
Message-Id: <66s8gt$8c8@topdog.cs.umbc.edu>

In article <199712121931.LAA25389@sirius.infonex.com>,
Mix  <mixmaster@remail.obscura.com> wrote:
>Please accept my apologies for the anonymous way of posting. I will
>graduate from a college very soon with a Computer Science degree under
>my belt and I need a career advice from seasoned professionals.
>
>Unfortunately, my college taught languages that were "scientifically"
>correct but useless practically. 

I get the impression that you may have missed some of your classes ---
or at least misunderstood the lessons.

Being able to write programs in a particular language might be a
valuable skill, but being able to analyze what must be done, pick (or
develop) the right algorithm (and sometimes right language) to do it,
and build a program to implement that algorithm reliably will be a far
more valuable one.

These days I write in FORTRAN and APL rarely; C and C++ sometimes;
LISP, MATLAB, and PostScript frequently, and Java increasingly,
depending on what I'm trying to do.  I'd be foolish to try to write a
high-speed numerical program in Java when I have access to FORTRAN
just as I'd be foolish to try to implement an INTERNET server in FORTRAN
when I have access to Java.

Java is hot now, but I've been around enough to wonder if it's
destined to be the "USCD Pascal of the future."  (Remember that?)  My
suggestion is to be thankful that you've been exposed to such a wide
selection of programming tools.  It will help you learn Java's
successors.

Peter
-- 
--
Peter Olsen, P.E.                        410-997-8584/301-596-8455 (FAX)
    Engineering is the art of applying a professional knowledge of 
 mathematics and the physical sciences to improve the quality of life.


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

Date: Sat, 13 Dec 1997 14:05:35 +1100
From: Stephen Taylor <steve@afs.net.au>
Subject: Re: Which language pays most 17457 -- C++ vs. Java?
Message-Id: <3491FB7F.624D@afs.net.au>

Mix wrote:

> Please accept my apologies for the anonymous way of posting. I will
> graduate from a college very soon with a Computer Science degree under
> my belt and I need a career advice from seasoned professionals.

Ok - here's my advice. It's important to learn not to antagonise people
for no reason. For instance, crossposting a "which language will earn me
the most money" message to a whole bunch of language newsgroups will
serve to do little more than start a fight.


                                  Steve

------------------------------------------------------------------
Steve Taylor                          steve@afs.net.au
Applied Financial Services
Phone: +61 3 9670 0233
Fax:   +61 3 9670 5018


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

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

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