[10542] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4134 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 2 18:07:18 1998

Date: Mon, 2 Nov 98 15:00:22 -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           Mon, 2 Nov 1998     Volume: 8 Number: 4134

Today's topics:
        Additional Perl-centric resource... <bill@fccj.org>
    Re: Deleting .htaccess (brian d foy)
    Re: Easy Question: Rounding Numbers <chris_N0SPAM@trsilvius-co.com>
    Re: How do i remove Carriage Returns og Newlines from a <uri@fastengines.com>
        hyperfiction cja@dds.nl
        Java's import * feature in Perl mlehmann@prismnet.com
    Re: mortgage calculator script (Greg Bacon)
    Re: Not to start a language war but.. (David Formosa)
    Re: Passing $Variables from script to script (John Hardy)
    Re: Perl and PGP (brian d foy)
    Re: perl&cgi question (brian d foy)
    Re: Problem with chop? and testing for null? <jdporter@min.net>
        Processing incoming mail messages <bruce.w.mohler@saic.com>
    Re: Processing incoming mail messages (clay irving)
    Re: Processing incoming mail messages <bruce.w.mohler@saic.com>
    Re: Processing incoming mail messages (Greg Bacon)
    Re: Question regarding CGI.pm <jdporter@min.net>
    Re: Question regarding CGI.pm <gbc1@axe.humboldt.edu>
        redirect method in CGI.pm works different on different  <Ann.Gan@Software.com>
    Re: redirect method in CGI.pm works different on differ <Ann.Gan@Software.com>
    Re: use and require (brian d foy)
    Re: VARIABLES DE ENTORNO CGI (Larry Rosler)
    Re: What is gd.pm? (brian d foy)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Mon, 02 Nov 1998 18:22:32 -0500
From: Bill Jones <bill@fccj.org>
Subject: Additional Perl-centric resource...
Message-Id: <363E3EB8.2A8A77C2@fccj.org>

FYI:

I just found -
http://www.mit.edu:8008/bloom-picayune.mit.edu/perl/?8538

Enjoy!
-Sneex-  :]
________________________________________________________________________
Bill Jones  |  FCCJ Webmaster  |  x3089  |  http://webmaster.fccj.org:81
------------------------------------------------------------------------
       __ _  RedHat 5.1 Manhatten 
      / /(_)_ __  _   ___  __   http://www.apache.org 
     / / | | '_ \| | | \ \/ /   http://www.redhat.com 
    / /__| | | | | |_| |>  <    http://www.perl.com 
    \____/_|_| |_|\__,_/_/\_\   http://www.gimp.org


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

Date: Mon, 02 Nov 1998 17:53:57 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Deleting .htaccess
Message-Id: <comdog-ya02408000R0211981753570001@news.panix.com>

In article <363E0B0E.6C17123@counter.w-dt.com>, Mike <support@counter.w-dt.com> posted:

> How would you make this code delete .htaccess files too?
> $files = "";
> $dir = "$basedir/$INPUT{'deletemember'}";
> chdir($dir);
> $member = `ls $files`;


# perhaps you wanted ls -a?  there's a Perl way however...

opendir DIR, $dir;
foreach my $file ( grep $_ !~ /[.]{1,2}/, readdir DIR )
   {
   ...
   }

# or even simpler
unlink("$dir/.htaccess") if -e "$dir/.htaccess";

> @member = split(/\n/,$member);
> foreach $members (@member) {
> unlink ("$basedir/$INPUT{'deletemember'}/$members");
> }

> I think it is because the ls command doesn't add .htaccess to the array
> but I'm not sure if that is whats wrong how do you make it so it will?

you could always check to see what is in the array to help you determine
what is happening. :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 02 Nov 1998 16:00:27 -0600
From: Chris <chris_N0SPAM@trsilvius-co.com>
Subject: Re: Easy Question: Rounding Numbers
Message-Id: <71la22$rfs$2@news-1.news.gte.net>


--------------7534FFA329033AE040A45BCF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

And cause I didn't type it right, we try again.

result is the answer
source is the original value
dec is the number of decimals to round to

So my example should have read:
= (int (10^1 * 12.591237489 +.5)) / 10^1
= (int (125.91237489 + .5) /10
= (int (126.41237489) /10
= (126) / 10
= 12.6

Where:
source = 12.591237489
dec = 1

Can't type well, sorry.



> Alistair Calder wrote:
>
> A not too tough math problem, just make the number bigger (by the
> exponent of the number of
> decimals you need, round up, and re-divide)..
>
> Try this:
>
> result= (int (10^dec * source + .5)) / 10^dec
>
> So in your example,
> = (int (10 * 12.591237489 +.5)) / 100
> = (int (125.91237489 + .5) /100
> = (int (126.41237489) /100
> = (126) / 100
> = 12.6
>
>
>
>
>> I have looked through the Camel book, but I could not find an answer
>> to this
>> question:
>>
>> I have a variable that is the result of a division, and I want to
>> round it
>> to 1 or 2 decimal places.
>>
>> The only thing I have at my disposal is INT(), but it just
>> truncates, it
>> doesn't round up or down.
>>
>> How do I turn this number:
>>
>> 12.591237489
>>
>> Into this one:
>>
>> 12.6
>>
>> Thanks,
>> Alistair Calder
>
> --
> Chris Maylor
> GTE - DestinationFAX(sm)
> christopher.maylor@ins.gte.com
> Tel:  972 550-1628
>
> \\/////////////////////////////////////////\\
> \\"Good judgment comes from experience, and\\
> \\ a lot of that comes from bad judgment"  \\
> \\/////////////////////////////////////////\\
>
>

--
Chris Maylor
GTE - DestinationFAX(sm)
christopher.maylor@ins.gte.com
Tel:  972 550-1628

\\/////////////////////////////////////////\\
\\"Good judgment comes from experience, and\\
\\ a lot of that comes from bad judgment"  \\
\\/////////////////////////////////////////\\



--------------7534FFA329033AE040A45BCF
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
And cause I didn't type it right, we try again.
<P>result is the answer
<BR>source is the original value
<BR>dec is the number of decimals to round to
<P>So my example should have read:
<BR>= (int (10^1 * 12.591237489 +.5)) / 10^1
<BR>= (int (125.91237489 + .5) /10
<BR>= (int (126.41237489) /10
<BR>= (126) / 10
<BR>= 12.6
<P>Where:
<BR>source = 12.591237489
<BR>dec = 1
<P>Can't type well, sorry.
<BR>&nbsp;
<BR>&nbsp;
<BLOCKQUOTE TYPE=CITE>Alistair Calder wrote:
<P>A not too tough math problem, just make the number bigger (by the exponent
of the number of
<BR>decimals you need, round up, and re-divide)..
<P>Try this:
<P>result= (int (10^dec * source + .5)) / 10^dec
<P>So in your example,
<BR>= (int (10 * 12.591237489 +.5)) / 100
<BR>= (int (125.91237489 + .5) /100
<BR>= (int (126.41237489) /100
<BR>= (126) / 100
<BR>= 12.6
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<BLOCKQUOTE TYPE=CITE>I have looked through the Camel book, but I could
not find an answer to this
<BR>question:
<P>I have a variable that is the result of a division, and I want to round
it
<BR>to 1 or 2 decimal places.
<P>The only thing I have at my disposal is INT(), but it just truncates,
it
<BR>doesn't round up or down.
<P>How do I turn this number:
<P>12.591237489
<P>Into this one:
<P>12.6
<P>Thanks,
<BR>Alistair Calder</BLOCKQUOTE>

<PRE>--&nbsp;
Chris Maylor
GTE - DestinationFAX(sm)
christopher.maylor@ins.gte.com
Tel:&nbsp; 972 550-1628

\\/////////////////////////////////////////\\
\\"Good judgment comes from experience, and\\
\\ a lot of that comes from bad judgment"&nbsp; \\
\\/////////////////////////////////////////\\</PRE>
&nbsp;</BLOCKQUOTE>

<PRE>--&nbsp;
Chris Maylor
GTE - DestinationFAX(sm)
christopher.maylor@ins.gte.com
Tel:&nbsp; 972 550-1628

\\/////////////////////////////////////////\\
\\"Good judgment comes from experience, and\\
\\ a lot of that comes from bad judgment"&nbsp; \\
\\/////////////////////////////////////////\\</PRE>
&nbsp;</HTML>

--------------7534FFA329033AE040A45BCF--



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

Date: 02 Nov 1998 16:46:17 -0500
From: Uri Guttman <uri@fastengines.com>
Subject: Re: How do i remove Carriage Returns og Newlines from a string via regexp's ?
Message-Id: <saryaptvkd2.fsf@camel.fastserv.com>

>>>>> "BJFW" == Bill Jones, FCCJ Webmaster <webmaster@fccj.org> writes:

  BJFW> maxm wrote:
  >>  I read in a whole file line by line and then concatenate the lines
  >> into one string. Including \n \r. How do I remove selected \n \r
  >> via s/// ?

if you are doing that, uset tile mode for reading:

local( $/ ) ;		# temporarily undef $/ to read whole file in
$text = <FILE> ;	# use your own file handle

  >> Something like s/somepattern$//

  BJFW> Close - How about:

  BJFW> s/\n//g; s/\r//g;

better to use tr/\r\n//d as it is faster.

but does the poster want no \n\r or a space to replace them? just
removing \n\r will concatenate the last and first words on consecutive
lines which does not sound right.

this may fit the bill better:

tr/\r\n / /s ;

which will convert all \r\n to spaces and squeeze extra spaces into
one. the squeeze is for the \r\n which would get converted to '  ' (2
spaces) otherwise.

uri

-- 
Uri Guttman                  Fast Engines --  The Leader in Fast CGI Technology
uri@fastengines.com                                  http://www.fastengines.com


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

Date: Mon, 02 Nov 1998 21:49:59 GMT
From: cja@dds.nl
Subject: hyperfiction
Message-Id: <71l9e7$rb1$1@nnrp1.dejanews.com>

Hello:

I am in the middle of both developing a cool little site
for fun (ie. for intellectual and creative exploration
and not for profit) and learning Perl.

I cannot learn fast enough!

I have a text I want to turn into hyperfiction, that looks
like the following:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- - - - -
8:0) chris abraham
02-SEP-97   3:58
Coelaboration

The small apartment smells a little from the windows being closed against the
humidity.  I don't have any place to put the butts from the ashtray and I
really don't want to waste my time doing domestic things anyway.  Time seems
too valuable for that.  But the job of cleaning now has become overwhelming. 
I hate living in an apartment and not on the road because messes remind me of
stagnation.  I am stagnating and the garbage reminds me, the ashtray, and the
clothes I have to smell before wearing.  This is wearing thin.  My writing is
going just fine, but I am not following Eastern Daylight Time, but Hawaiian
Time.  I have been away since bright and early at 2:30pm and shall go to
sleep in an hour or so, around 4:30am.  Its certainly the typical hours for
work in downtown Honolulu.  Maybe Los Angeles.  Okay, LA, but I'll never
admit to having to do anything with that place.   - - - - - 8:1) chris
abraham  02-SEP-97  4:17  Seattle then.  A place called never never land.  A
place so unlike Washington.  Washington looks so deeply into the mirror. 
Washington is like a teenage girl.  She notices every flaw and every ounce
gained; she worried about everybody's opinion and fears rejection, always
believing herself (no matter how gorgeous) to always be the homelier.  New
York is her older sister, the prom queen, the forever more popular to the
studious insecure Washington.   - - - - - ... - - - - - 8:240) chris abraham 
31-AUG-1998  16:41  the stories cannot be confirmed or denied.	what is an
history?  what makes things  act yoo al?  versus fick shi nall?  after	three
years of knowing, after three years  of following and exploring the truth,
here  comes the vulgarity and yet there is no way  to know for sure -- no
boner fiday way of  knowing the incessantly sworling swohrling	whorling
whoring debilitating mesmerising  destroying supporting mucous memories of 
times past, of inebriations or was it getting  toked on hiphop jes grew jes
grew it in the	back behind the rosemary, behind the Oray  Gan Oh (oh, to
pronounce certain things like  a brit, oh to know smugly what it is to be  a
man who is from hawaii who attended uni  in a small campus on a small bit of
land by a  lake in farmland in norwich, norfolk: oraygahnoh)  corgettes. 
rahthah.  so, where was i:  the slipery eel reality, the cumstained rag  of
memory: is it mine, is it yours, is it	swimming with virus, are there pieces
of baby there  is there you or me, was it him? who's baby?  was there shaving
cream involved?  was there a  state of undress?  what does a state of undress
 look like when you stumble upon it as a cleaning  lady in a swanky resort
and country club -- and  moreso, what is the number of jc?  wwjd? wwjd? 
writhing, writing, pawing, slippery majesty and  playing the horn, rubbing
the nub, eating eating	out eating out necklace de perle.  perle.  wipe. 
cumstains show up elegantly as ghostly white under  the sweeping arc of the
black light, the UV bulb.  ghost white.  used at rape scenes.  looking for
the  came and went; he done cum and went, where dat bleeding  black light. 
the biograph was never illuminated in  blacklight because the seating might
have shown like  the galaxy: innumerable white flecks upon a dark field...  -
- - - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And I want to do the following (mind you, my ISP allows me to
use PHP3, my SQL, etc..., apache, linux, and Perl 5.003 AND
access the cgi-bin):

I would like to do the initial dicing in my shell account and
then build a cgi to help me with navigation... so that I can
help my visitors explore the collaborative text.

I would like to highlight the fact that the references do appear
to mimic the format of the bible: 8:001-8:240.

Chop the text so that each 'chapter' is in a separate file
(8 versus 8:1 versus 8:240) and then be able to cruise around
the texts in linear order, 8-8:240, and random order, by author,
or by reverse order, etc...

I would also possibly be able to link the texts in a micro-way,
where I can create a hyperlink within the text that can lead
to another page.  In other words, finding as many different
ways to make this linear 'fiction' into a non-linear piece.

I am using this exercise to both work out my crap coding with the
end-result of putting a little 'art' on the web.

I look forward to some architecture advice on how best to smartly
go about this: database-backed or whatnot.

Thanks in Advance!

Chris

--
chris.abraham<cja@dds.nl><http://urban.net/chris>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 02 Nov 1998 22:35:30 GMT
From: mlehmann@prismnet.com
Subject: Java's import * feature in Perl
Message-Id: <71lc3i$v3b$1@nnrp1.dejanews.com>

I have a set of classes that implement database transactions.  The parent
class handles the generic methods of performing transactions.  The child
classes handle the specific transactions, along with any non-generic methods.

There are many of these subclasses, but I don't want my API users to have to
write a "use" statement for every transaction object that they instantiate. 
To handle this initially, I place all of the sub classes in one file.  But
this file is now approaching 10,000 lines when I include POD in it.  This
seems terribly wasteful of time during the loading phase if the API user just
wants one or two transaction objects.

What I would like is something similar to Java's import * feature which
allows a coder to use a class that is part of a hierarchy.  That way only the
top of the hierarchy is listed in the API users code.

For now, I am defining a class which I will call Transaction::Message. 
Inside that class I export a function called create_message.  create_message
looks like this:

%valid_trx_ids = map { $_ => 1 } qw(create delete update validate query1);
#etc

sub create_message {
    my %parms = @_;

    my $transaction_id = $parms{'transaction_id'};

    if (! exists $valid_trx_ids{$transaction_id}) {
       $! = "Not a valid transaction id";
       return undef;
    }

    my $transaction_data = $parms{'transaction_data'};

    require $transaction_id;

    my $trx_object = $transaction_id->new($transaction_data);

    if (!defined $trx_object) {
       return undef;
       #$! is already set by subclasses new method
    }

    return $trx_object
}

This is what I call an "object factory" function.  It is a function exported
into the callers name space which autoloads the class, then calls the classes
constructor.

What is a better way to do this?

Is this a good way?

What is a good way to return an error message when an object is not
constructed? Is setting $! a bad thing to do?

Thanks.

Mark Lehmann
--
Give someone a Perl script and they can hack for a night, teach them Perl, and
they can hack for a lifetime.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 2 Nov 1998 22:41:14 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: mortgage calculator script
Message-Id: <71lcea$n1k$1@info.uah.edu>

In article <MFo%1.1311$%82.890@news12.ispnews.com>,
	"Talal Nehme" <talal@pdq.net> writes:
: i am looking for a mortgage calculator perl script
: if you know where to find one please email me at talal@pdq.net

I found a mortgage calculator that uses Tom's code at

    <URL:http://www.boardplace.com/mortgages1/capitalhome/calc.html>

Greg
-- 
Fenster: I had a guy's fingers in my asshole tonight.
Hockney: Is it Friday already?


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

Date: 2 Nov 1998 21:39:37 GMT
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: Not to start a language war but..
Message-Id: <slrn73s9kp.qjf.dformosa@godzilla.zeta.org.au>

In article <61pvb6aw4t.fsf@anthem.cnri.reston.va.us>, Barry A. Warsaw wrote:
>
[...]

>I don't know what more you mean by "conceptual piece of work the
>program was attempting to do", but I think the closest you can get in
>any language is "where was I in the call stack when this occurred?"
>and Python gives you that information for every exception.

Ok an example from my perl code (note this one throws a warning rather then
dieing)

 if (not open ARTICAL,"<$filename") {
   warn "Can't open artical file $filename because $!";
   next;
 }

Now not being able to open the file is not unusable, infact in the running of
the program I can expect that I'll get this warning at least one or twice.
Now the warning tells me what is happening, something only I would know the
computer didn't know about it.



-- 
Please excuse my spelling as I suffer from agraphia. See the URL in my
header to find out more.



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

Date: Mon, 02 Nov 1998 21:58:52 GMT
From: jhardy@cins.com (John Hardy)
Subject: Re: Passing $Variables from script to script
Message-Id: <wWp%1.153$jk1.147151@198.235.216.4>


Thanks for your help guys. 

I ended up with this, and it works perfect:

}

my ($LOCK_EX);
$LOCK_EX = 2;

$file = 'VVarin';          # Name the file
open(INFO, $file) or die "Couldn't open INFO file";  # Open the file
flock (INFO, $LOCK_EX) || bail ("cannot flock $file: $!");

while ( <INFO> ) {
    chomp;
    ( $key, $value ) = split /:/;
    $linesin{$key}=$value;
};
close(INFO);                    # Close the file
 
foreach $key (sort keys %linesin ) {
$value=$linesin{$key};
$key=join('.',$TableName,$key); ##add the table name to the field name
print "$key\t$value\n";
};


prints out "tablename.key" and "value" 


 Now I can go back and clean up my code and comments and keep Tom happy :-) 


Thanks again 

John 









In article <MPG.10a7a936e1ad8685989855@nntp.hpl.hp.com>, lr@hpl.hp.com says...
>
>[Posted to comp.lang.perl.misc and a copy mailed.]
>
>In article <jWl%1.17$jk1.18551@198.235.216.4> on Mon, 02 Nov 1998 
>17:25:35 GMT, John Hardy <jhardy@cins.com> says...
>...
>> $file = 'VVarin';          # Name the file
>> open(INFO, $file);              # Open the file
>
>Where is the test whether the 'open' succeeded???
>
>> @lines = <INFO>;                # Read it into an array
>> close(INFO);                    # Close the file
>> %linesin=@lines;              # read the array into a hash (foreach below 
>> doesnt seem to work unless I do this)
>
>This is wrong.  It assigns alternate lines of input as keys and as 
>values in the hash.  It serves no purpose, as you can use the array 
>directly in the 'foreach' statement (despite your comment above).
>
>> foreach $key (sort keys(%linesin)) {
>> ($value)=split /:/,$linesin{$key};
>> $key=join('.',$TableName,$key); ##add the table name to the field name
>> 
>> print "$key\t$value\n";
>> }
>
>  foreach $line (@lines) {
>      print "$TableName.$line";
>  }
>
>This prints each of your key:value pairs exactly as they are in the 
>input file (including their newlines), prepending "$TableName." to each.
>
>Postgraduate course ('one-liner'):
>
>  open INFO, $file or die "Couldn't read $file. $!\n";
>  print map { ( $TableName, '.', $_ ) } <INFO>;
>  close INFO;
>
>-- 
>(Just Another Larry) Rosler
>Hewlett-Packard Laboratories
>http://www.hpl.hp.com/personal/Larry_Rosler/
>lr@hpl.hp.com



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

Date: Mon, 02 Nov 1998 17:57:00 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl and PGP
Message-Id: <comdog-ya02408000R0211981757000001@news.panix.com>

In article <F1syAC.4Cu@boss.cs.ohiou.edu>, "Dave Hannum" <hannum@ohio.edu> posted:

> I have a perl shopping cart that is designed to send the orders via email.
> I need to encrypt the orders with the owners PGP key?  How can I call this
> from the sendmail routine in the script?  I'm running Perl 5.004.4 on a
> Linux box using Apache server.  The sendmail is in the usual
> /usr/lib/sendmail  directory.  They have PGP on the server and have told me
> I can utilize it if I can make the script access it.  Any clues?

you can open a pipe to the pgp command or use something like IPC::Open3.
the perlipc man page talks about interprocess communication.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 02 Nov 1998 18:00:30 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: perl&cgi question
Message-Id: <comdog-ya02408000R0211981800300001@news.panix.com>

In article <363DDAE2.A18140AE@corp.home.net>, Justin Harvey <jbharvey@corp.home.net> posted:

> You need to change the mime association for .pl extension inside your
> browsers so that it will use it as a CGI, and not try to download it.

sorry, but it's the server that does what you are thinking about.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 02 Nov 1998 17:14:44 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Problem with chop? and testing for null?
Message-Id: <363E2ED4.7A77AAE9@min.net>

Monty Taylor wrote:
> 
> Sorry about the odd subject, I'm not really sure how to classify this one.
> I've tried multiple different covolutions of this one to no avail, so I'm
> hoping someone can lend a hand...
> 
>  print " New value (return to keep): ";
>  $value = <>;
>  chop($value);
>  if ( $value != "" ) {
>      $values{$keys[$choice]} = $value;
>  }
> 
> This code snip should not do anything if the value entered is null (they
> just hit enter) Right? Well, it does that fine... and it also avoids doing
> anything if you enter a zero (0) (Which I can't see any reason for) I've
> tried changing the test condition around a little. I tried not chopping and
> testing for "\n" -- that didn't work either. 

You ought to get in the habit of using chomp (instead of chop),
even though it's probably not your problem in this case.

If you're expecting a numeric entry, why not just

	if ( $value > 0 ) { 

And if you're not expecting a numeric entry specifically, 
but any string, then you are using the wrong test operator. 
'!=' and '==' are for numbers only.  
Use 'ne' and 'eq' to compare strings.

-- 
John "Throbblefoot" Porter

Please Don't "Courtesy CC" me.
I read this newsgroup fanatically.  You know that!
("Emailed only" is fine, though.)

"The people at the Grey Hotel
  Are either aged or unwell." -- EG


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

Date: Mon, 02 Nov 1998 14:12:21 -0800
From: Bruce Mohler <bruce.w.mohler@saic.com>
Subject: Processing incoming mail messages
Message-Id: <363E2E45.10A3746E@saic.com>

I need to write a Perl script that will be kicked off by cron every
so many hours.  It will need to process any messages in the mail
box for the account its running under.  While there seem to be lots
of modules that allow you to send e-mail messages, what's the
best one for receiving e-mail?

According to the Perl FAQ, it pointed me at MailTools at CPAN,
however, having installed it (and looked mostly at the Mail::Mailer
module) it seems predisposed towards sending, not receiving.

Any suggestions or pointers welcome.  I love pointers, as long as
there's not too many levels of indirection.

Bruce

--
Bruce W. Mohler                619-458-2675 (voice)
SAIC/ITS/Server Support        619-535-7806 (fax)
Sr UNIX system administrator   888-781-5697 (pager)
                               mailto:bruce.w.mohler@saic.com
Of course my password is the same as my pet's name.
My dog's name is Q47pY!3, but I change it every 90 days.




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

Date: 2 Nov 1998 17:34:43 -0500
From: clay@panix.com (clay irving)
Subject: Re: Processing incoming mail messages
Message-Id: <71lc23$4f5@panix.com>

In <363E2E45.10A3746E@saic.com> Bruce Mohler <bruce.w.mohler@saic.com> writes:

>I need to write a Perl script that will be kicked off by cron every
>so many hours.  It will need to process any messages in the mail
>box for the account its running under.  While there seem to be lots
>of modules that allow you to send e-mail messages, what's the
>best one for receiving e-mail?

>According to the Perl FAQ, it pointed me at MailTools at CPAN,
>however, having installed it (and looked mostly at the Mail::Mailer
>module) it seems predisposed towards sending, not receiving.

>Any suggestions or pointers welcome.  I love pointers, as long as
>there's not too many levels of indirection.

Read my mailbox and print the subject of each message:
  
  #!/usr/local/bin/perl -w
  
  use Mail::Util qw(read_mbox);
  use Mail::Internet;
  
  $file = "/var/mail/clay";
  
  @msgs = read_mbox($file);
  foreach $msg(@msgs) {
    $mail = Mail::Internet->new($msg);
  
    $subject = $mail->get('Subject');
  
    if (defined($subject)) {
      print "Subject: $subject\n";
    }
  }
-- 
Clay Irving
clay@panix.com


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

Date: Mon, 02 Nov 1998 14:51:30 -0800
From: Bruce Mohler <bruce.w.mohler@saic.com>
Subject: Re: Processing incoming mail messages
Message-Id: <363E3772.211AA3AE@saic.com>

clay irving wrote:

> Read my mailbox and print the subject of each message:
>
>   #!/usr/local/bin/perl -w
>
>   use Mail::Util qw(read_mbox);
>   use Mail::Internet;
>
>   $file = "/var/mail/clay";
>
>   @msgs = read_mbox($file);
>   foreach $msg(@msgs) {
>     $mail = Mail::Internet->new($msg);
>
>     $subject = $mail->get('Subject');
>
>     if (defined($subject)) {
>       print "Subject: $subject\n";
>     }
>   }
> --
> Clay Irving
> clay@panix.com

Super!  Thanks, Clay!

Bruce

--
Bruce W. Mohler                619-458-2675 (voice)
SAIC/ITS/Server Support        619-535-7806 (fax)
Sr UNIX system administrator   888-781-5697 (pager)
                               mailto:bruce.w.mohler@saic.com
Of course my password is the same as my pet's name.
My dog's name is Q47pY!3, but I change it every 90 days.




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

Date: 2 Nov 1998 22:49:13 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Processing incoming mail messages
Message-Id: <71lct9$n1k$2@info.uah.edu>

In article <363E2E45.10A3746E@saic.com>,
	Bruce Mohler <bruce.w.mohler@saic.com> writes:
: I need to write a Perl script that will be kicked off by cron every
: so many hours.  It will need to process any messages in the mail
: box for the account its running under.  While there seem to be lots
: of modules that allow you to send e-mail messages, what's the
: best one for receiving e-mail?

Why not configure your mail server to deliver to a process, e.g.
through .forward with sendmail?  It would be a little simpler that
way.  This is what I use to filter my mail (based on code Tom
sent me a while back):

#! /usr/bin/perl -w

use strict;
use vars qw(
    $Body
    $Home
    $From
    $Subject
);

BEGIN {
    die "Must supply username argument!\n" unless @ARGV;
}

use Mail::Internet;
use Mail::Address;
use Fcntl ':flock';

## aliases for me
my @aliases = qw(
    \bgbacon\b
    \bgreg\.bacon\b
);

## list of users from whom we'll always accept mail
## this shouldn't be necessary unless their mail looks like spam
my @always_ok = qw(
    mb72@.*\.?mindspring\.com
);

## mailing lists I'm subscribed to
my @mailing_lists = qw(
    alabama-mobile-general
    amass
    bugtraq
    clpm-moderators
    clpm-policy
    dist-users
    ghcc\.dl
    gnuhoo-editors
    ingest
    insights
    itsl
    lclint
    linux-kernel
    mjd-clpm-moderators
    mjd-clpm-policy
    mjd-clpm-admin
    modperl
    mongers
    net-irc
    oracle
    p5p
    perl-moderation-panel
    perlbug
    porters
    postmaster
    procmail
    ptk
);

my @moderated = qw(
    alabama\.mobile\.general
    comp\.lang\.perl\.moderated
);

## list of users from whom we'll never accept mail
my @banned_users = qw();

## blacklisted sites
my @banned_sites = qw(
    \b153\.35\.149\.\d+\b
    \b205\.245\.18\.\d+\b
    \b206\.175\.231\.\d+\b
    \b1stfamily\.com\b
    \bacella\.net\b
    \bachristmas\.com\b
    \badultstore\.com\b
    \baei\.ca\b
    \bagis\.net\b
    \banswerme\.com\b
    \baol\.com\b
    \bascella\.net\b
    \batripaway\.com\b
    \bbranthoverassociates\.com\b
    \bbulkemail\.net\b
    \bcafes\.net\b
    \bcanaan\.co\.il\b
    \bcenturyinter\.net\b
    \bcompuserve\.com\b
    \bconcepts2001\.com\b
    \bcorpsite\.com\b
    \bcrushnet\.com\b
    \bctinet\.net\b
    \bcyberpromo\.com\b
    \bcyberserverscentral\.com\b
    \bcybertize-email\.com\b
    \bdespotovic\.com\b
    \bdialsprint\.net\b
    \bexperts-exchange\.com\b
    \bextraincome4u\.net\b
    \bget-more-hits\.com\b
    \bgillnet\.com\b
    \bgoplay\.com\b
    \bgte\.net\b
    \bgwh\.net\b
    \bhibrid\.com\b
    \bhotmail\.com\b
    \bigs\.net\b
    \binfoabc\.com\b
    \bior\.com\b
    \bjobspc\.com\b
    \bjumbo\.com\b
    \bjuno\.com\b
    \blauderdale\.net\b
    \bleipro23\.com\b
    \blistme\.com\b
    \bllv\.com\b
    \blostvegas\.com\b
    \bmail\.com\b
    \bmailcenter1\.net\b
    \bmailexcite\.com\b
    \bmarket6two\.net\b
    \bmarketingforyou\.com\b
    \bmlsa1\.com\b
    \bmmaildirect\.com\b
    \bmoneymaker\.com\b
    \bmsn\.com\b
    \bnet\.net\b
    \bnetcom\.com\b
    \bnetlink\.co\.uk\b
    \bnever-ending-gallery\.com\b
    \bnevwest\.com\b
    \bowlsnest\.com\b
    \bpipex\.com\b
    \bplanetinternet\.be\b
    \bprivatedances\.com\b
    \bprodigy\.com\b
    \bprodigy\.net\b
    \bpromo\.com\b
    \bprtracker\.com\b
    \bsavoynet\.com\b
    \bsendad\.com\b
    \bsingnet\.com\.sg\b
    \bsol\.no\b
    \bspica\.net\b
    \bsprintmail\.com\b
    \bsprynet\.com\b
    \bsuccess2one\.net\b
    \bsuccess123\.net\b
    \bt3-com\.com\b
    \btamcotec\.com\b
    \btelephonemarketing\.com\b
    \btimebill\.net\b
    \btnlb\.com\b
    \bultramax\.net\b
    \buntoldstory\.org\b
    \busa\.net\b
    \bwave\.net\b
    \bwe-work-for-you\.com\b
    \bxxxlink\.com\b
    \byahoo\.com\b
    \bybecker\.net\b
);

## subs
sub flog {
    my $msg = shift;
    my $log = "$Home/FilterLog";
    my($s,$min,$h,$d,$mon,$y);

    $msg =~ s/\s+$//;

    ($s,$min,$h,$d,$mon,$y) = localtime $^T;
    $y += 1900;

    open LOG, ">>$log" or die "Failed open $log: $!\n";
    flock LOG, LOCK_EX;
    seek LOG, 0, 2;

    printf LOG "%02d/%02d/%02d %d:%02d:%02d [$$]: $msg\n",
        $y, $mon+1, $d, $h, $min, $s;

    close LOG;  # ...and release the lock
}

sub rcvstore {
    my $msg = shift;
    my $folder = shift;
    my $rcvstore = "/usr/lib/nmh/rcvstore";

    unless (-x $rcvstore) {
        die "$rcvstore is not executable!\n";
    }

    open RCVST, "| $rcvstore +$folder -create" or die "Failed fork: $!\n"
        or die "Failed open |$rcvstore: $!\n";
    $msg->print(\*RCVST);
    close RCVST or flog "close $rcvstore: $!";
}

sub reject {
    my $msg = shift;
    $msg =~ s/\s+$//;

    print STDERR "Message rejected: $msg\n";

    exit 69;
}

sub check_for_duplicate {
    my $msg = shift;

    my $sum = unpack "%31C*", $Body;
    my $len = length $Body;

    my $msgid = $msg->head->get('Message-ID') || '';
    chomp $msgid;

    unless ($msgid) {
        flog "Rejecting message: no Message-ID";
        rcvstore $msg, "invalid";
        reject "No Message-ID: header";
    }

    my %msgs;
    my $db = "$Home/.dupmsgdb";
    if (dbmopen %msgs, $db, 0644) {
        if ($msgs{$msgid}) {
            flog "duplicate message id $msgid discarded";
            exit;
        }
        else {
            $msgs{$msgid} = 1;
        }

        dbmclose %msgs;
    }
    else {
        flog "Failed dbmopen $db: $!";
    }
}

sub initialize {
    my $msg = shift;

    $Body = join "\n", @{$msg->body};

    my $tmp = $msg->head->get('Reply-To')
           || $msg->head->get('From')
           || $msg->head->get('Apparently-From')
           || $msg->head->get('Sender')
           || '';

    unless ($tmp) {
        flog "Rejecting message: no sender";
        rcvstore $msg, "invalid";
        reject "No From: header";
    }

    ($tmp) = Mail::Address->parse($tmp);

    ($From) = $tmp->address;
    study $From;

    $Subject = $msg->head->get('Subject') || '<no subject>';
    chomp $Subject;
}

sub check_for_banned_sender {
    my $msg = shift;

    foreach my $user (@banned_users) {
        if ($From =~ /$user/i) {
            flog "sender $From is banned by $user";
            rcvstore $msg, "banned";
            reject "Unauthorized delivery";
        }
    }
}

sub accept_message {
    my $msg = shift;
    my @recips = @_;

    foreach my $user (@always_ok) {
        if (eval { $From =~ /$user/i }) {
            return 1;
        }
    }

    foreach my $ng (@moderated) {
        if (grep { /$ng/i } @recips) {
            return 1;
        }
    }

    return 0;
}

sub recipients {
    my $msg = shift;
    my @recips;
    my $head = $msg->head || return;

    @recips = map { $_->address }
              map { Mail::Address->parse($_) }
                ( $head->get('To'),
                  $head->get('Apparently-To'),
                  $head->get('Sender'),
                  $head->get('Resent-To'),
                  $head->get('Cc') );

    push @recips,
         map { split /\s*,+\s*/ }
         $msg->head->get('Newsgroups');

    @recips;
}

sub looks_like_spam {
    my $msg = shift;

    my @headers;

 ## push @headers, $msg->head->get('To')         || '';
    push @headers, $msg->head->get('Message-ID') || '';
    push @headers, $msg->head->get('Received')   || '';
    push @headers, $msg->head->get('Reply-To')   || '';
    push @headers, $msg->head->get('Sender')     || '';

    foreach my $site (@banned_sites) {
        if (grep { /$site/i } $From, @headers) {
            flog "Spamchecker caught $site";
            return 1;
        }

        if ($@) {
            flog $@;
        }
    }
}

sub admin_related {
    local $_;

    my @names = qw(
        4Dgifts           games             lp                setup
        MAILER-DAEMON     ghcc              man               subscribe-errors
        adm               ghrc              mexdemos          sys
        amass             ghrc-sau          msuingest         sysadm
        archive           ghrcstaff         nuucp             sysadm
        auditor           ghrcuser          opus              sysadmin
        bin               ghrcuso           postmaster        tour
        daemon            guest             powerdown         tutor
        dbadmin           ingest            rfindd            uah
        demos             ingeststats       rje               uucp
        diag              larcerrors        root              uucpadm
        fido-errors       larcnotice        rootcsh           uucpws
        gaierrors         liserrors         rootsh            wsiingest
        gaiingest         lisingest         saspu             webmaster
        www               Whats\.New        ActivityNotice
        ghcc-sysmgrs
    );

    my $regex = '\\b' .
                '(?:' . join('|', @names) . ')' .
                '\\b';

    for (@_) {
        if (/$regex/iox) {
            return 1;
        }
    }

    return 0;
}

sub for_me {
    my $msg = shift;
    my @recips = @_;

    foreach my $alias (@aliases, @mailing_lists) {
        return 1 if grep { /$alias/i } @recips;
    }

    return 1 if admin_related @_;

    return 0;
}

sub junk {
    my $msg = shift;
    my @recips = @_;

    my $prec = $msg->head->get('Precendence') || '';
    chomp $prec;

    if ($prec =~ /junk|bulk/i) {
        return 1;
    }

    #if (grep { /\b(?:mailer|daemon|postmaster|root)\b/i } @recips, $From) {
    #    return 1;
    #}

    return 0;
}

sub send_page {
    require IO::Socket;
    IO::Socket->import;

    my $sock = new IO::Socket::INET PeerAddr => 'openview-1.adtran.com',
                                    PeerPort => 7777,
                                    Proto    => 'tcp',
                                    Timeout  => 10;

    unless (defined $sock) {
        flog "Failed to create socket: $!";
        return;
    }

    my $copy = $Body;
    $copy =~ s/^\s+//;
    $copy =~ s/\s+/ /g;

    my $str = "GREG BACON /" . substr("$From - $copy", 0, 57) . "\n";

    unless ($sock->send($str)) {
        flog "Failed send: $!";
    }
}

## main
umask 077;

## who are we receiving for?
my $user = shift;
$Home = $ENV{HOME}
        || (getpwnam $user)[7]
        || die "No home directory for user `$user'\n";

## set up a few conveniences
my $msg = new Mail::Internet \*STDIN,
                             Modify => 0;
initialize $msg;

## process our message
flog "Message from $From ($Subject)";

check_for_duplicate $msg;

check_for_banned_sender $msg;

my @recips = recipients $msg;

my $accept = 0;
$accept++ if accept_message $msg, @recips;

if (not $accept and looks_like_spam $msg) {
    rcvstore $msg, "spam";
    reject "Mail from unauthorized host";
}

if (not $accept and not for_me $msg, @recips) {
    rcvstore $msg, "spam";
    flog "Not for me--probably spam";
    reject "Unauthorized delivery";
}

my $folder;

if (grep { /net-irc/i } @recips) {
    $folder = "net-irc";
}
elsif (lc($msg->head->get('X-loop') || '') eq "perl5-porters\n" or
       grep { /perl5-porters/i } @recips)
{
    $folder = "p5p";
}
elsif ($From eq 'mjd-clpm-bounce-modrelay@plover.com') {
    $folder = "clpmod";
}
elsif (grep { /alabama[-.]mobile[-.]general/i } @recips) {
    $folder = "amg";

    my $subject = $Subject;
    if ($subject !~ /^Re:/i) {
        $subject = "Re: $subject";
    }

##    open MAIL, "| /usr/lib/sendmail -oi -t" or flog "Failed fork: $!";
##    print MAIL <<EOMail;
##To: $From
##From: Greg Bacon <gbacon\@cs.uah.edu>
##Subject: $subject
##
##This is an automated reply.
##
##I have received your post.  Within a day or two, I will either approve
##and post it or reject it.  If at all possible, I will accompany any
##rejection with a reply explaining why I rejected your article.
##
##Thank you for your participation.
##
##Greg Bacon <gbacon\@cs.uah.edu>
##moderator, alabama.mobile.general
##EOMail
##
##    close MAIL or flog "sendmail exited $?";
}
elsif (grep { /procmail/i } @recips) {
    flog "dropping mail to procmail";
    exit;
}
elsif (grep { /mongers/i } @recips) {
    $folder = "hsv-pm";
}
elsif (grep { /gnuhoo-editors/i } @recips) {
    $folder = "gnuhoo";
}
elsif (grep { /linux-kernel/i } @recips) {
    $folder = "lk";
}
elsif (grep { /oracle/i } @recips, $From) {
    $folder = "oracle";
}
elsif (grep { /ptk/i } @recips) {
    $folder = "ptk";
}
elsif (grep { /moderation-panel|(?:mjd-)?clpm-(?:policy|moderators|admin)/i } @recips) {
    $folder = "pmp";
}
elsif (grep { /insights/i } @recips) {
    $folder = "insights";
}
elsif (grep { /bugtraq/i } @recips) {
    $folder = "bugtraq";
}
elsif (grep { /lclint/i } @recips) {
    flog "dropping mail to lclint";
    exit;
}
elsif (junk $msg, @recips) {
    $folder = "junk";
}
elsif (grep { /itsl(?:csb)?/i } @recips
       or grep { /\bmsfc\.nasa\.gov\b/i } @recips, $From)
{
    $folder = "itsl";
}
elsif (grep { /\bgbacon\b|\bgreg\.bacon\b/i } @recips) {
    $folder = "personal";

    ##flog "sending page...";
    ##send_page;
}
elsif (admin_related @recips, $From) {
    $folder = "itsl-admin";
}
else {
    $folder = "lists";
}

flog "rcvstore into $folder";
rcvstore $msg, $folder;


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

Date: Mon, 02 Nov 1998 17:09:15 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Question regarding CGI.pm
Message-Id: <363E2D8B.F0FFC226@min.net>

Greg Coit wrote:
> 
> I'm trying to debug a script I wrote (with the help of CGI.pm) which
> generates a web page with a form.  Up to know, Ive always been able to
> pop in the following code to find out what params are being passed after
> the submit button is pressed (per the CGI.pm man page):
> 
> $query=new CGI;
> print "<H2>Current Values</H2> $query\n<P>";
> 
> but instead of a list of the parameters (which is the normal response),
> i get this:
> 
> Current Values
> 
> CGI=HASH(0x140145c78)

I find it difficult to believe that that ever worked.
But even if it did, it's really not the best way to do 
what you're trying to do.  Instead, print $query->dump.

-- 
John "Throbblefoot" Porter

Please Don't "Courtesy CC" me.
I read this newsgroup fanatically.  You know that!
("Emailed only" is fine, though.)

"The people at the Grey Hotel
  Are either aged or unwell." -- EG


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

Date: Mon, 02 Nov 1998 14:27:10 -0800
From: Greg Coit <gbc1@axe.humboldt.edu>
Subject: Re: Question regarding CGI.pm
Message-Id: <363E31BE.14EEEEE5@axe.humboldt.edu>

John Porter wrote:

> I find it difficult to believe that that ever worked.
> But even if it did, it's really not the best way to do
> what you're trying to do.  Instead, print $query->dump.

I appreciate the reply.  I've tried this on both verions of Perl, and I get
"can't call method "dump" on an undefined value".  Defining the variable
$query didn't help, it just produced a blank page.

Greg



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

Date: Mon, 02 Nov 1998 13:51:49 -0800
From: Ann Gan <Ann.Gan@Software.com>
Subject: redirect method in CGI.pm works different on different browsers?
Message-Id: <363E2975.69EC5BD@Software.com>

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

I am using the method - redirect() in CGI.pm to move between web pages.
I found if I try to access the page that I have visited before on IE or netscape4.5, it doesn't do a refresh.  But if I
run the same codes on netscape 4.05,
it does the reloading.  Is this a known problem?  Is there anyway to work around the problem?  Thanks,

Please reply to my email address too.

Ann

--

Ann Gan                           Principle Software Engineer
ann.gan@software.com              software.com
phone: (425)883-6800 ext227       2375 - 130thAve NE, Suite 100
http://www.software.com           Bellevue, WA 98005-1758

Software.com, Inc. - The Internet Infrastructure Company (tm)


--------------5D3DE396F40DAA56F44C326B
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Ann Gan
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Ann Gan
n:              Gan;Ann
org:            software.com
email;internet: Ann.Gan@Software.com
title:          Principle Software Engineer
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------5D3DE396F40DAA56F44C326B--



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

Date: Mon, 02 Nov 1998 14:26:39 -0800
From: Ann Gan <Ann.Gan@Software.com>
To: Ann Gan <Ann.Gan@Software.com>
Subject: Re: redirect method in CGI.pm works different on different browsers?
Message-Id: <363E319F.B3A46060@Software.com>

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



Ann Gan wrote:

> I am using the method - redirect() in CGI.pm to move between web pages.
> I found if I try to access the page that I have visited before on IE or netscape4.5, it

typo: netscape 4.06

> doesn't do a refresh.  But if I
> run the same codes on netscape 4.05,
> it does the reloading.  Is this a known problem?  Is there anyway to work around the problem?  Thanks,
>
> Please reply to my email address too.
>
> Ann
>

The CGI.pm I am using is 2.39.

> --
>
> Ann Gan                           Principle Software Engineer
> ann.gan@software.com              software.com
> phone: (425)883-6800 ext227       2375 - 130thAve NE, Suite 100
> http://www.software.com           Bellevue, WA 98005-1758
>
> Software.com, Inc. - The Internet Infrastructure Company (tm)
>
>   ------------------------------------------------------------------------------------------------------------------------
>
>   Ann Gan <Ann.Gan@Software.com>
>   Principle Software Engineer
>   software.com
>
>   Ann Gan
>   Principle Software Engineer  <Ann.Gan@Software.com>
>   software.com
>                                Netscape Conference Address
>                                Netscape Conference DLS Server
>   Additional Information:
>   Last Name         Gan
>   First Name        Ann
>   Version           2.1



--

Ann Gan                           Principle Software Engineer
ann.gan@software.com              software.com
phone: (425)883-6800 ext227       2375 - 130thAve NE, Suite 100
http://www.software.com           Bellevue, WA 98005-1758

Software.com, Inc. - The Internet Infrastructure Company (tm)


--------------2567846067813D95BD2F4DA4
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Ann Gan
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Ann Gan
n:              Gan;Ann
org:            software.com
email;internet: Ann.Gan@Software.com
title:          Principle Software Engineer
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------2567846067813D95BD2F4DA4--



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

Date: Mon, 02 Nov 1998 17:59:33 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: use and require
Message-Id: <comdog-ya02408000R0211981759330001@news.panix.com>

In article <3638A061.6222@edoc.co.za>, info@edoc.co.za posted:

> when does one use "use" and when "require"?

there aren't rules for that sort of thing.  this is Perl, not some
fascist language :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 2 Nov 1998 13:59:26 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: VARIABLES DE ENTORNO CGI
Message-Id: <MPG.10a7cb17486d7be898985e@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <fl_aggie-0211981635500001@aggie.coaps.fsu.edu> on Mon, 02 
Nov 1998 16:35:50 -0500, I R A Aggie <fl_aggie@thepentagon.com> says...
> In article <MPG.10a7b0eaedbcfe11989858@nntp.hpl.hp.com>, lr@hpl.hp.com
> (Larry Rosler) wrote:
> 
> + Actually, that's surprisingly comprehensible.  (variable of surroundings 
> + == environment variable, etc.)  But it isn't a Perl question, so I won't 
> + answer it. :-)
> 
> I think you meant to say:
> 
> Realmente, eso es asombrosamente comprensible. (variable de la variable de 
> entorno del == de los alrededores, del etc.) Pero no es una pregunta del 
> Perl, asm que no le contestari. :-)

No, I meant to say:

Really, that is amazingly comprehensible (variable of the variable of 
surroundings of == of the environs, the etc.) But it is not a question 
of the Perl, so I will not answer to him: -)

Even that is almost comprehensible.  Please, let's stop now.  I think we 
have converged on a pair of translations in only one iteration.  :-)

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


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

Date: Mon, 02 Nov 1998 18:02:33 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: What is gd.pm?
Message-Id: <comdog-ya02408000R0211981802330001@news.panix.com>

In article <36149BE9.BAA0C523@fit2print.com>, Kris <kris@fit2print.com> posted:

> Does anyone know what gd.pm is?  The script I'm using calls for it, and
> I don't have it.

i'm sure Tom Boutell and Lincoln Stein know, since they wrote it.  they
even included documentation.  it's all available through 
<http://www.perl.com/CPAN/>.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

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

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