[13104] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 514 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 13 21:07:18 1999

Date: Fri, 13 Aug 1999 18:05:09 -0700 (PDT)
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, 13 Aug 1999     Volume: 9 Number: 514

Today's topics:
    Re: Can Perl 5 open a 4 gig text file? <elaine@chaos.wustl.edu>
        Conditional Using Regular Expression <Pan@LA-Online.com>
    Re: Good Web Sites on Perl/DBI/MySQL? support@gethits.com
    Re: HARASSMENT -- Monthly Autoemail (Marc Haber)
        i cann't read and write at the sametime <jcetek@ezzi.net>
    Re: i cann't read and write at the sametime (Matthew David Zimmerman)
    Re: I guess this is a Misc question: Cgi-bin <newsgroup@bigwig.net>
        Language survey <tchrist@mox.perl.com>
    Re: Looking for a solution to the problem localtime and <flavell@mail.cern.ch>
    Re: Looking for gibberish generator <flavell@mail.cern.ch>
        perl and I18N (Eric van Bezooijen)
    Re: perl and I18N (Matthew David Zimmerman)
    Re: Perl Programmers' Web Design "Difficulties" (Garth Sainio)
    Re: Perl Programmers' Web Design "Difficulties" support@gethits.com
    Re: Perl Programmers' Web Design "Difficulties" (Eric Bohlman)
    Re: Perl Programmers' Web Design "Difficulties" (brian d foy)
    Re: Perl Programmers' Web Design "Difficulties" (brian d foy)
    Re: Perl Programmers' Web Design "Difficulties" <dhill@sunbeach.net>
        Perl Script + Sending Mail <jsmith1999@zdnetmail.com>
    Re: Perl Script + Sending Mail (Bill Moseley)
    Re: Printing perldoc (Eric Bohlman)
    Re: regular expression - counting words and quotes (Bill Moseley)
    Re: Spawning OS Command from Perl <stacy@beast.amd.com>
    Re: Why use Perl when we've got Python?! (Martijn Faassen)
    Re: Why use Perl when we've got Python?! (Martijn Faassen)
        Why use Python when we've got Perl? <tchrist@mox.perl.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Fri, 13 Aug 1999 20:38:01 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: Can Perl 5 open a 4 gig text file?
Message-Id: <37B4BA61.CB4FD802@chaos.wustl.edu>

Duncan Idaho wrote:
> 
> I've run into a problem trying to read a 4 gig text file
> with Perl5. It seems that Perl has a 2 gig limit on opening
> a file. Returns an error of file is too big. This is on a Unix
> system (IBM AIX). The Sys Admin said that there is a problem
> with opening over 2 gig files on the Unix system. To open files
> over 2 gig, you need to us the C function  open64() instead of
> open() in a C program. Does anyone know if Perl has an equivalent open
> function?

Perl, as far as I know, has no limitations on file sizes, however, Unix
in its many flavours does. Solaris used to have a file size limitation
of 2gb, open or not. 

I don't deal much with AIX these days, but a brief search brought up the
following. I'm guessing that you are using 4.2 or better so you might
try "ulimit -f unlimited" to increase your resources. Also, I found
http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/genprogc/prg_lrg_files.htm
to be very good in explaining your quandry. You might share it with your
SA :)

"The AIX 4.1.4, 4.1.4.1, and 4.1.5 file system data structure is based
on the 32-bit addressing scheme, pointers, data blocks, and so on.
Therefore 2 to the 31 power which is about 2 GB, is the maximum file
size allowed. 

AIX 4.2 will support 64 bit addressing, and at that time the maximum
file size will greatly exceed the 2GB limit. In order to support file
size over 2 GB, you need to wait for AIX 4.2. 

The 'ulimit' command can be used to set or examine the resource limits
including the file size. The example below, would set the maximum file
size to 4,194,304 blocks (512 Bytes/block) which is 2GB, the limit: 
ulimit -f 4194304 
 
If you set ulimit -f to this value, the it will show "unlimited" which
is the maximum. The default file size is set to 2,097,151 blocks (1 GB)."

> If not, is it possible for me to call the C function in the Perl script?
> Has anyone else had a similar problem and how did you remedy it?
> Any help would be much appreciated.

You really wouldn't want to do that :) Perl isn't C (thank goodness!).

enjoy.

e.


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

Date: Fri, 13 Aug 1999 17:57:25 -0700
From: Pan <Pan@LA-Online.com>
Subject: Conditional Using Regular Expression
Message-Id: <37B4BEF5.DB453037@LA-Online.com>

I am fairly new to perl, and am writing a web client that will return a
list of links based on a conditional match.  I don't have much
experience with regular expressions, and have been unable to get a
match.

I want to write a conditional using a reg exp that matches 4 constant
characters, 4 variable digits, a variable alpha, and '.htm' like so:

food1111a.htm

Here is the syntax that I'm trying to use:

 if ($linkURL =~ /food......htm/i) 
 {
 print "<A HREF=http://www.food.com/recipes/$linkURL>$linkURL</A><BR>";
 }

For some reason, this isn't matching, and what I'm trying to determine
is whether I am using reg exp incorrectly.  I've tested
$linkURL, and it seems to be pulling what I expect it to pull.

TIA


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

Date: Sat, 14 Aug 1999 00:12:27 GMT
From: support@gethits.com
Subject: Re: Good Web Sites on Perl/DBI/MySQL?
Message-Id: <37B4B5FE.598F9F65@gethits.com>



Shannon Kurtas wrote:
> 
> I am in dire need of good documentation about the use of Perl with MySQL ( &

There is an online course through http://training.oreilly.com
called Programming Perl with Databases. This covers the topics
you mention.

From O'reilly:
--
 This course features 16 units of  instruction with the objective of
developing advanced skills using the Perl programming language. The
special focus is in using Perl to develop robust Internet and intranet
applications involving the use of databases.

 Topics of study include: 

        advanced parsing techniques

        directory and file manipulation

        object-oriented usage

        databases and structured query language (SQL),

        security for perl CGI

        perl DBM databases

        perl debugging


 The required books are Advanced Perl Programming, Learning Perl, Perl
Cookbook and  Programming Perl, 2nd ed. 
--
This course also covers DBI/DBD files

Darryl Dyck


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

Date: Sat, 14 Aug 1999 00:28:01 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <7p2d6i$spd$1@news.rz.uni-karlsruhe.de>

William Pettrey <Bill@fuckyou.co.uk> wrote:
>Ya, I think everyone has received one of these messages from the local
>asshole Tom Christenson. Just block his address, I did.

Why are you still participating in the perl groups when you don't read
what one of the most knowledgeable persons around here?

Tom _can_ be a pain, but I am willing to tolerate that from one of the
authors of two of my most used books that almost never go back to
their shelf place.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: Fri, 13 Aug 1999 20:19:50 -0400
From: "JCEtek" <jcetek@ezzi.net>
Subject: i cann't read and write at the sametime
Message-Id: <tA2t3.4113$Rh.185805@typ11.nn.bcandid.com>

i've openned the file with +<, +> and +>>, i can read but cann't write. >
overwrites. is there a way to open a file so i can finded something and
rewrite just that line.




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

Date: 14 Aug 1999 00:37:17 GMT
From: mdz4c@node12.unix.Virginia.EDU (Matthew David Zimmerman)
Subject: Re: i cann't read and write at the sametime
Message-Id: <7p2dnt$m27$1@murdoch.acc.Virginia.EDU>

In article <tA2t3.4113$Rh.185805@typ11.nn.bcandid.com>,
JCEtek <jcetek@ezzi.net> wrote:
>i've openned the file with +<, +> and +>>, i can read but cann't write. >
>overwrites. is there a way to open a file so i can finded something and
>rewrite just that line.

perlfaq5:

"How do I change one line in a file/delete a line in a file/insert a line
in the middle of a file/append to the beginning of a file?"

Matt
-- 
Matthew Zimmerman ------------  http://www.people.virginia.edu/~mdz4c
Interdisciplinary Biophysics Program --------- University of Virginia
| "You got to be very careful if you don't know where you're going, |
| because you might not get there."                   -- Yogi Berra |


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

Date: Sat, 14 Aug 1999 01:14:30 +0100
From: "Ben Quick" <newsgroup@bigwig.net>
Subject: Re: I guess this is a Misc question: Cgi-bin
Message-Id: <37b4c7ca.0@news2.cluster1.telinco.net>

J. Moreno wrote in message
<1dwhff9.sakx3b1st54g0N@roxboro0-0020.dyn.interpath.net>...
>Ben Quick <newsgroup@bigwig.net> wrote:
>
>> J. Moreno wrote in message
>> >Ben Quick <newsgroup@bigwig.net> wrote:


>> >No, but section 2 of the faq (Obtaining and Learning about Perl) says:
>> >
>> >comp.lang.perl.misc               Very busy group about Perl in general
>>
>> The general part is very none specific. Maybe a re-wording is on order?
>
>Possibly so -- and I have a suggestion to send to them for doing so, if
>I don't forget.


That's a good idea. If you remember, as you say

>-snip-
>> >(But this does bring up a point -- there is an excellent faq about perl,
>> >but not for the NEWSGROUP, perhaps a faq for the newsgroup is in order?)
>>
>> I think that would be a very good idea. The faq is currently not really
>> about this group
>
>There's another faq just for the group, but it should be referenced by
>that page (one of the things I'm going to suggest).


A point to note. As a generalization, most people will not visit a page to
read a faq

>-snip-
>> >the point is that politely giving the right answer or pointing to the
>> >right newsgroup gives the impression that the question was reasonable
and
>> >it was OK to ask it.
>>
>> No. Giving the answer would imply it is ok to aks. Pointing to the right
>> group would imply that where the question was asked was the wrong place
>
>It also implies that the way to find out that a question is off topic is
>to post it and then see from the responses.


But the responses should in turn tell the poster what to do in future

>You should be fairly sure that the question is on topic before asking it
>-- and if you know it isn't or that it may not be, then be prepared to
>accept the flames that will garner you in good grace.


Why should anyone get flamed for a misunderstanding\lack of knowledge

>-snip-
>> >A "My mistake, I thought it would be OK to ask here"  followed by "Thank
>> >you, I appreciate it very much" (snipping everything in between).
>>
>> As would a
>> "Sorry, you're in the wrong group. Try in ..."
>> or
>> "The answer is... but infuture forr this type of question ask in..."
>
>Sure -- but, by posting an off topic question, you incurred an
>obligation to acknowledge your mistake (which you have done),

At least you can realise that I have accepted I was wrong

>but /they/
>didn't have an obligation to give you a polite answer.


Can't agree with that. Just because someone get's something wrong doesn't
mean that you should be abusive towards them. Ok, so you don't /have/ to be
polite, but when has being polite harmed anyone?

>Basically what I am saying is that the responses you got may have been
>rude and/or sarcastic -- but they weren't *unduly* so given your
>offense.


I cannot agree with that. How hard is it to be polite. Sarcasm I can take, I
am myself sarcastic. But pointless abuse? Why?

>--
>John Moreno




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

Date: 13 Aug 1999 18:49:50 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Language survey
Message-Id: <37b4bd2e@cs.colorado.edu>

At the risk of advocacy, please spend 10 seconds on 

    http://www.recordingwebsite.com/language.html

I have nothing to do with it; just came across it.

Oh, please don't hack the HTML to add Perl to the OO part.
It doesn't look as though it would do any good. :-)

--tom
-- 
"While your friend holds you affectionately by both your hands you are
 safe, for you can watch both of his."
				- Ambrose Bierce, `The Devil's Dictionary'


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

Date: Sat, 14 Aug 1999 01:17:24 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Looking for a solution to the problem localtime and the century mark.
Message-Id: <Pine.HPP.3.95a.990813192954.5423G-100000@hpplus03.cern.ch>

On Fri, 13 Aug 1999, Jack Alexander wrote:

> I'm always surprise by the manner which people are treated in this
> newsgroup; 

Yes indeed, your behaviour was totally unacceptable: you treated us all
abominably.  So don't ask FAQs again, and then we won't have that
problem to deal with.  And avail yourself of the opportunity to read the
new users FAQs on news.announce.newusers to understand proper quoting
style, and be sure to follow that advice whenever you post to usenet.

This is nobody's private playground, neither mine, yours nor the vendor
of your wannabe-newsreader software.  There are consensus rules for
participation in usenet: feel free to participate according to those
rules; if you don't like them, then feel free to participate (_in its
appropriate place_) in the discussion of what those rules should be.





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

Date: Sat, 14 Aug 1999 01:20:55 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Looking for gibberish generator
Message-Id: <Pine.HPP.3.95a.990814011752.27422B-100000@hpplus03.cern.ch>

On Fri, 13 Aug 1999, Robert Burris wrote:

> A good Usenet feed is the best gibberish generator on the
> planet!

How true, how true.  Then feed that to Mark V. Shaney for variety,
break out a bottle of the best, and have a good laugh.

Sorry, the only grist I tried recently was off ciwah, but if you
want this group fed into the mill, it might be good for a giggle.

Hey, what's this dreck hung on the end of your posting? Didn't your Mom
tell you about tidying up after playtime?



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

Date: 14 Aug 1999 00:05:01 GMT
From: eric@logrus.berkeley.edu (Eric van Bezooijen)
Subject: perl and I18N
Message-Id: <7p2brd$mk8@masters0.InterNex.Net>

I can find little about internationalization and perl.  I would like to write
a perl script that could output (and input!) in english, japanese, german,
etc.

Can perl handle Unicode ? MultiByte ? This is all on UNIX ...

-Eric


--
Eric van Bezooijen     eric@activesw.com     http://www.activesw.com/~eric
"But the meaning of life is a mystery, that we don't understand so far.
 And the music of life is a rhapsody if you're happy the way that you are."
 -"Freudiana"<P><IMG SRC="http://www.activesw.com/~eric/images/eric.gif">


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

Date: 14 Aug 1999 00:55:30 GMT
From: mdz4c@node12.unix.Virginia.EDU (Matthew David Zimmerman)
Subject: Re: perl and I18N
Message-Id: <7p2eq2$mdb$1@murdoch.acc.Virginia.EDU>

In article <7p2brd$mk8@masters0.InterNex.Net>,
Eric van Bezooijen <eric@logrus.berkeley.edu> wrote:
>I can find little about internationalization and perl.  I would like to write
>a perl script that could output (and input!) in english, japanese, german,
>etc.
>
>Can perl handle Unicode ? MultiByte ? This is all on UNIX ...

Yeah, I couldn't find a reference to Unicode in the documentation either. 
But according to the Perl Cookbook (p. 3), the current version of Perl
doesn't support Unicode. Perl's 'locale' pragma (see the perllocale
manpage) offers support for POSIX locales, for different single-byte
character alphabets, but as far as multi-byte characters are concerned, I
believe it's largely roll-your-own. 

Good luck!

Matt
-- 
Matthew Zimmerman ------------  http://www.people.virginia.edu/~mdz4c
Interdisciplinary Biophysics Program --------- University of Virginia
| "You got to be very careful if you don't know where you're going, |
| because you might not get there."                   -- Yogi Berra |


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

Date: Fri, 13 Aug 1999 20:07:58 -0400
From: modred@shore.net (Garth Sainio)
Subject: Re: Perl Programmers' Web Design "Difficulties"
Message-Id: <modred-1308992007580001@gniqncy-s03-158.port.shore.net>

In article <682t3.48528$U42.82597@news1.rdc1.bc.home.com>, "Shawn Grant"
<tristar@direct.ca> wrote:

!!  I don't mean to make a sweeping generalization, but it
!!  appears that the more advanced programmers can't seem
!!  to create attractive web sites. Not that this is an insult...we
!!  all have our strengths and weaknesses. Maybe it's a left/right
!!  brain thing. Lets look at some examples:
!!  
!!  http://www.stonehenge.com
!!  http://www.perl.org
!!  http://www.tpj.com Perl Journal's was simple too, but now it forwards
!!  to itknowledge.com (who probably staff web/graphic designers).
!!  http://www.perl.com/CPAN
!!  
!!  To be fair, http://www.perl.com looks good, as does
!!  http://www.activestate.com
!!  
!!  Perhaps web design is inversely proportional to programming skill.
!!  
!!  Shawn.

Or maybe it is that programmers prefer the useful to the eye candy?

Garth

-- 
Garth Sainio               "Finishing second just means you were the 
modred@shore.net            first to lose" - anonymous


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

Date: Sat, 14 Aug 1999 00:16:19 GMT
From: support@gethits.com
Subject: Re: Perl Programmers' Web Design "Difficulties"
Message-Id: <37B4B6E6.F45FDEFD@gethits.com>



Garth Sainio wrote:
 
> Or maybe it is that programmers prefer the useful to the eye candy?

True, but the appeal of the web is the combination of both (when
appropriate).

Darryl.


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

Date: 14 Aug 1999 00:32:06 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Perl Programmers' Web Design "Difficulties"
Message-Id: <7p2de6$2pf@dfw-ixnews7.ix.netcom.com>

Shawn Grant (tristar@direct.ca) wrote:
: I don't mean to make a sweeping generalization, but it
: appears that the more advanced programmers can't seem
: to create attractive web sites. Not that this is an insult...we
: all have our strengths and weaknesses. Maybe it's a left/right
: brain thing. Lets look at some examples:

I think it really comes down to what "attractive" means.  I suspect what 
you really mean is that the sites in question are visually plain.  If the 
site's intended audience is people who are looking for specific 
information, as opposed to those who are seeking an "experience," then a 
visually plain design is often the easiest one to use.

Second, in Web-as-media terms, "visually attractive" really means
"visually attractive to upper-middle-class white suburban American males
in their late teens or early twenties whose visual sensibilities have been
shaped by video games and MTV"; this happens to be the demographic that 
most Web-as-media designers come from.  Someone who doesn't come from 
that demographic and isn't making a specific effort to target that 
demographic is unlikely to have production values based on flashiness and 
busyness.

Finally, keep in mind that the more significant the actual content of a 
site is to the reader, the less presentation matters to the reader, as 
long as the presentation doesn't get in the way of accessing the 
content.  Most programming-related sites are quite content-heavy.




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

Date: Fri, 13 Aug 1999 20:45:37 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Perl Programmers' Web Design "Difficulties"
Message-Id: <brian-ya02408000R1308992045370001@news.panix.com>

In article <682t3.48528$U42.82597@news1.rdc1.bc.home.com>, "Shawn Grant" <tristar@direct.ca> posted:

> I don't mean to make a sweeping generalization, but it
> appears that the more advanced programmers can't seem
> to create attractive web sites. Not that this is an insult...we
> all have our strengths and weaknesses. Maybe it's a left/right
> brain thing. Lets look at some examples:

i think it's more of a bite/bark thing.  would you rather have good
content or flashy graphics?  if you were an advanced Perl programmer,
don't you think you'd be spending your time programming Perl rather
than working in Photoshop?

however, you make a mistake when you say "Perl programmers".  its
not something limited to Perl programmers.  most people have this
problem.  lots of "web design" companies have this problem.

> http://www.perl.org

this one is changing very soon.

> http://www.tpj.com Perl Journal's was simple too, but now it forwards
> to itknowledge.com (who probably staff web/graphic designers).

those aren't Perl programmers.  that's Earthweb.  you should say that
marketing droids can't design web sites.  they don't staff any talent,
btw - that's why it sucks.

> http://www.perl.com/CPAN

ease of use and lots of content are attractive?  seriously - are you
going to that page to be awed by graphics or to follow one of the links?
why spend a lot of time making pretty pictures and dancing monkeys>
would you rather have Perl or pictures of it?

> To be fair, http://www.perl.com looks good, as does
> http://www.activestate.com

those are Perl programmers either.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: Fri, 13 Aug 1999 20:50:33 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Perl Programmers' Web Design "Difficulties"
Message-Id: <brian-ya02408000R1308992050330001@news.panix.com>

In article <37B4B6E6.F45FDEFD@gethits.com>, support@gethits.com posted:

> Garth Sainio wrote:
>  
> > Or maybe it is that programmers prefer the useful to the eye candy?
> 
> True, but the appeal of the web is the combination of both (when
> appropriate).

are you sure?  perhaps an appeal of the web is communication.  Your
preferences are not universal, after all, and the web was not created
to be a multimedia experience.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: Fri, 13 Aug 1999 20:46:28 -0400
From: Duncan Hill <dhill@sunbeach.net>
Subject: Re: Perl Programmers' Web Design "Difficulties"
Message-Id: <Pine.LNX.4.10.9908132035050.3633-100000@bajan.pct.edu>

On Sat, 14 Aug 1999 support@gethits.com wrote:

> True, but the appeal of the web is the combination of both (when
> appropriate).

But why should it appeal graphically?  I hate pages that go "You need
Netscape or IE to view these pages", "You don't have java turned on".  
I'm trying to use the Web as a source of information (which, IIRC was
the original intent of HTML?), not as a way to make my machine crawl
as it compiles/interprets x lines of code to present me with a pretty
menu.  

Yes, I'm one of those crazy people who surfs with Lynx when I
want information.  Sure, I have Netscape, but it annoys the crap out
of me on both Windows and Linux.  And don't even mention IE to me.. I
have enough of a dislike for Windows without including that..

Unfortunately, it appears that 99% of the websites out there are
designed by either a graphic artist who has no clue how to use the ALT
part of the IMG tag properly, or by people in marketing.. I'm not sure
which is worse.  Even the new www.perl.com has an error (*) or two in
Lynx, but it beats some others I've seen.

* Error(s):
Load the page in Lynx, look in the upper left.  Why do I need to know
that blank.gif is there?  Or anywhere else that the phrase  blank.gif
occurs?  "bullet"?  Whats wrong with "*"?

The IFRAMES which I think are meant to be a pair of links are actually
4 links due to line breaking somewhere.. this might just be Lynx doing
something wierd.

Unfortunately, I can't think of an ObPerl..

-- 

Duncan Hill			Sapere aude
One net to rule them all, One net to find them,
One net to bring them all, and using Unix bind them.




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

Date: Sat, 14 Aug 1999 00:07:27 GMT
From: Jason Smith <jsmith1999@zdnetmail.com>
Subject: Perl Script + Sending Mail
Message-Id: <7p2bvq$nji$1@nnrp1.deja.com>

 I'm having a problem with a perl script. The problem
we are having is with the E-mailing of information to a
client. To make it simple, the script that sends an Email
to someone when they enter their address (Mary Smith in
the following example). The script includes the following
lines for sending the mail:

 ...

open(MAIL,"|$mailprog -t");

print MAIL "To: Mary Smith\n";
print MAIL "From: John\n\n");
print MAIL "Subject: Information\n\n";

 ...

When the Email is received by the person however, the "From"
field reads not "John", but "John@whsun626.webhosting.com"

How do we get rid of the extra server info following the name?
We've tried a few things but it always reads the same.

Thank you for your time...


- Jason Smith


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


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

Date: Fri, 13 Aug 1999 17:45:10 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Perl Script + Sending Mail
Message-Id: <MPG.121e5bf1b9cf27119896b1@nntp1.ba.best.com>

Jason Smith (jsmith1999@zdnetmail.com) seems to say...
>  I'm having a problem with a perl script.

Seems more like a problem with your news reader as people have responded 
to this question before.  Since you post with Deja why not search on 
your name and see the responses.

Ask you system admin for help.

> open(MAIL,"|$mailprog -t");

or else what?

> print MAIL "To: Mary Smith\n";
> print MAIL "From: John\n\n");
> print MAIL "Subject: Information\n\n";

why is the subject in the body?

-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: 14 Aug 1999 00:17:28 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Printing perldoc
Message-Id: <7p2cio$2pf@dfw-ixnews7.ix.netcom.com>

Irwin M. Feuerstein (ebct@hotmail.com) wrote:
: How does one print using perldoc?
: 
: If one does:
:     perl -h > lpt1:
: It works fine, but if one tries:
:     perldoc perldoc > lpt1:
: you get nothing. None of the switches seem to help.

Since you mention lpt1, I'm assuming you're talking about a Win32 
system.  On at least some versions of Win95, output from a program 
invoked by a batch file (which is how perldoc is implemented on Win32 
systems) can't always be redirected.  You might try:

perl \perl\5.00502\bin\perldoc.bat perldoc >lpt1

(put in the correct path to perldoc.bat for your system) and see if that 
works.



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

Date: Fri, 13 Aug 1999 17:03:40 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: regular expression - counting words and quotes
Message-Id: <MPG.121e523be3b751459896b0@nntp1.ba.best.com>

lt lindley (ltl@rgsun5.viasystems.com) seems to say...
> There is almost certainly a
> way to do it that has already been done before.  Unless you are just
> doing this for the fun of figuring it out, you might want to look a
> little harder for what is already available.

Right.  I'm trying to learn more here about the regular expressions.  
And I have, thanks.


-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Fri, 13 Aug 1999 19:34:52 -0500
From: Stacy <stacy@beast.amd.com>
Subject: Re: Spawning OS Command from Perl
Message-Id: <37B4B9AC.D5FF5931@beast.amd.com>

kiran dronamraju wrote:

> Trying to execute the following code with failure. Please help
>
> @args=('notepad',' c:\perl\a.txt');
> system(@args);
>

Is the executable you want to run notepad or is it notepad.exe?




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

Date: 14 Aug 1999 00:09:39 GMT
From: m.faassen@vet.uu.nl (Martijn Faassen)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <7p2c43$bb4$2@newshost.accu.uu.nl>

Tom Christiansen <tchrist@mox.perl.com> wrote:
> Python holds plenty of inconsistencies and surprises waiting
> to assault the sensibilities of the Perl programmer.  This isn't
> a one-way street.  

Agreed.

> Just for kicks and grins, try firing up 
> an interactive Python interpreter and using your mouse to cut and
> paste those lines.  Here there are all together:

>     a = 10
>     b = ["alpha", "beta", "gamma"]
>     c = { "fred" : "wilma", "barney" : "betty" }
>     print "a is" a
>     print "b nought is", b[0]
>     print "c fred is", c["fred"]

> Go ahead.  Grab it all with your mouse and punch it all it.  You can't
> do it.  You get the mysterious error

>       File "<stdin>", line 1
> 	a = 10
> 	^
>     SyntaxError: invalid syntax

And if you use an editor with a Python mode (plenty of those), you press
'tab' a few times to make it indent properly and you get another error,
because there's:

print "a is" a

which isn't valid.

I didn't get the error. A good editor is definitely helpful.

> Why is that?  Oh, because it's an "invalid syntax".  Cool message, dude.
> What the heck does it mean?

> The reason, of course, is because the leading white space changed the
> syntax!  I cannot believe that the distaste you hold for using in Perl
> dollars to specify variables or differently using [] to access an array
> but {} to access a hash can possibly compare with the abhorrence that
> fills a Perl programmer when he realizes that the number of spaces
> at the front of the line is *syntactically significant*.  

Well, what if I get abhorrent feelings because I forgot a close } somewhere
and it gives me an error? :) I maintain the whitespace argument against
Python is a strawman argument. I've been coding in Python for about a
year now and I don't recall ever having been bitten by this problem.
I've used Emacs, jed, and even some vi and windows notepad.

[snip]
> Guido has his justifications for this, but they will not sway someone
> until they've sufficiently embraced Python that they can overlook this.
> My point is that non-Python programmers find Python filled with plenty
> of counterintuitive idiosyncrasies.

I didn't find it so, but of course this can happen. These days I tend
to blink a couple of times wondering what these }'s are about in 
languages like C++.

But agreed, people are different. Perl didn't click for me, Python did. It
may be the other way around. Long live diversity, just as long as I
don't have to deal with _too_ much Perl code. :)

Regards,

Martijn



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

Date: 14 Aug 1999 00:18:27 GMT
From: m.faassen@vet.uu.nl (Martijn Faassen)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <7p2ckj$bb4$3@newshost.accu.uu.nl>

I R A Darth Aggie <fl_aggie@thepentagon.com> wrote:
> + I had thought the arguments re: indentation and use of white space had
> + been settled years ago. . .

> Sure. So why is it mandatory? why isn't python permitting the programmer
> to use the whitespace deemed adequate?

Why are '{' and '}' mandatory in Perl? Why isn't Perl permitting the
programmer to leave them away? I can add #{ and #} delimiters to Python. :)

But editors that grok Python are definitely helpful, granted. But it's the
same for Perl; editors that grok that } closes { are definitely helpful.

Using both { and } and whitespace to mark block structure is redundant.
Perl and many other languages choose to make whitespace optional; now
you can write compact but difficult to read code. Python chooses to make block
delimiters optional. The advantage is that your code can't be that particular
kind of unreadable anymore -- the disadvantage is that you always have to
indent properly. This turns out not to be a very large disadvantage. The
disadvantage is in my opinion smaller than the advantage of not having to
maintain convoluted non-indented code, and the advantage of not having to
deal with unfamiliar indenting styles and 'how to indent' flamewars. :)

Regards,

Martijn



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

Date: 13 Aug 1999 18:36:17 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Why use Python when we've got Perl?
Message-Id: <37b4ba01@cs.colorado.edu>

Unbelievably stupid subject, eh?  I certainly thought so when it was
shoved at us.  The flame war begun in comp.lang.perl.misc isn't doing
anyone any good, and then coming over to comp.lang.python to stir up the
shock troops to send in a few commandos is even worse.  I don't think
you'd like it if we in comp.lang.perl.misc sent 100,000 script kiddies
over to comp.lang.python to rant at you guys about how K31L they though
Perl was and how L@M3 they thought Python was.  

Do you want to learn or do you want to flame?  Learn?  Really?  Ok, here's
all you have to do.  Go write a medium-sized program comprising many
hundreds of lines, broken up into several files and selectively imported,
but do so in whichever language you know the *least*.  That's the way
to learn, not though wars.  There's no way we can learn from one another
by flaming.  And there's plenty to learn.  Everyone should do this.

Please and thank you.

--tom
-- 
Anyone can be taught to sculpt.
    Michaelangleo would have had to have been taught how not to.
	The same is true of great programmers.
"36 percent of the American Public believes that boiling radioactive milk


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

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 V9 Issue 514
*************************************


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