[9340] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2935 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 22 14:17:25 1998

Date: Mon, 22 Jun 98 11:00:34 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 22 Jun 1998     Volume: 8 Number: 2935

Today's topics:
    Re: crypt! How does it work? <psdspss@execpc.com>
        Curses module - need help (bgeer)
    Re: Curses module - need help dgris@rand.dimensional.com
    Re: E-Mail Validation (easy question) (Greg Bacon)
    Re: Find::File/Functional programing <jdporter@min.net>
    Re: first language (Steve Linberg)
    Re: first language (Kaz Kylheku)
    Re: Flames.... (John Moreno)
    Re: Flames.... (Chris Nandor)
    Re: Flames.... (Chris Nandor)
    Re: ftp->get( ) in variable (Jeffrey R. Drumm)
        how can I find out the version of Perl? <hhh@mail.student.oulu.fi>
    Re: how can I find out the version of Perl? (Bob Trieger)
    Re: how can I find out the version of Perl? <jmforey@olymp01.grenoble.hp.com>
    Re: How to find last modified date of a file? <richard@see.my.sig>
    Re: How to find last modified date of a file? (Larry Rosler)
    Re: How to find last modified date of a file? <rootbeer@teleport.com>
    Re: HTML Forms - Checkbox data (Lawrence Elliott)
    Re: HTML Forms - Checkbox data <rootbeer@teleport.com>
        Practical advice on linking in a .a <mark@satch.markl.com>
        print and the . operator ?? <swc4@acpub.duke.edu>
    Re: print and the . operator ?? <rootbeer@teleport.com>
    Re: Sending mail in Perl <indy@NOSPAMdemobuilder.com>
    Re: Speeding up Perl on an Apache server <rootbeer@teleport.com>
    Re: Speeding up Perl on an Apache server (Mark Nielsen)
    Re: writing a mud in perl (Billy Chambless)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 22 Jun 1998 11:19:09 -0500
From: Deva Seetharam <psdspss@execpc.com>
Subject: Re: crypt! How does it work?
Message-Id: <358E83FD.8149B837@execpc.com>

Niklas Collin wrote:

> Hello, i saw how crypt works. I just wonder why my excolleague would
> use the encrypted passwd from the database as an encryption key?
>
> Regards, Niklas.
>
> -------------------------------------------------------------------------------
> Love is like the ozone-layer. You don't miss it until it's gone.
>
> Niklas Collin
> Ugglevdgen 32A
> 13144 Nacka
>
> Tel: 08-7164543
> Email: d96-nco@nada.kth.se

Encryption key(called salt) is usually part of the encrypted password.

For example,
unices store salt, as the first two chars of encrypted password.
Encrypted password = crypt(plain text password,
                                             first two chars of encrypted password)

Hope that helps.

Deva



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

Date: 22 Jun 1998 11:33:10 -0600
From: bgeer@xmission.xmission.com (bgeer)
Subject: Curses module - need help
Message-Id: <6mm4gm$h6$1@xmission.xmission.com>

Hi,

I'm a long-time C programmer using Perl for a project - i.e., I'm a
newbie with C constructs firmly entrenched.

I am using the Curses module & have one problem I haven't overcome
yet.  I need a nonblocking method for interrogating keyboard input.
So far, my code:

	$data_window->nodelay( 1 ) ;
	$key_value = $data_window->getch() ;
	$data_window->nodelay( 0 ) ;
	if ($key_value != -1) { last ; }

is close to what I need, but "getch()" returns -1 (no input) or the
actual character typed when there is input.  My problem is this
message:

    key value: -1Argument "a" isn't numeric in ne at testkbd.pl line 52.

In C I would merely cast the "getch" return value to unsigned int & no
problema.  But in spite reading perl mans & grepping examples like
crazy & looking in "the" perl books, I haven't been able to conquer
this one.

Shouldn't be that hard...oh well.

Much obliged for any help,

Cheers, Bob

<> Robert Geer & Donna Tomky /              *             <>
<>    bgeer@xmission.com    |    _o      *   o *      o   <>
<>   Salt Lake City, Utah   |   -\<,      * <\      </L   <>
<>          U S A           |   O/ O     __ /__,    />    <>
-- 
<> Robert Geer & Donna Tomky /              *             <>
<>    bgeer@xmission.com    |    _o      *   o *      o   <>
<>   Salt Lake City, Utah   |   -\<,      * <\      </L   <>
<>          U S A           |   O/ O     __ /__,    />    <>


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

Date: Mon, 22 Jun 1998 17:57:32 GMT
From: dgris@rand.dimensional.com
Subject: Re: Curses module - need help
Message-Id: <6mm5b2$bls$1@rand.dimensional.com>

[posted and mailed to the cited author]
In article <6mm4gm$h6$1@xmission.xmission.com>,
bgeer <bgeer@xmission.xmission.com> wrote:

>	if ($key_value != -1) { last ; }
>
Try-
  last unless ($key_value == -1);
That will get you around the warning about $key_value not
being numeric.

>Much obliged for any help,

Hope this helps.

>Cheers, Bob
>
Regards,
Daniel



-- 
Daniel Grisinger           dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                           Dave Clark


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

Date: 22 Jun 1998 17:30:59 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: E-Mail Validation (easy question)
Message-Id: <6mm4cj$m21$1@info.uah.edu>

In article <Pine.GSO.3.96.980622064200.6310O-100000@user2.teleport.com>,
	Tom Phoenix <rootbeer@teleport.com> writes:
:     if ($email and $email =~ /@/) {
: 	print "So far so good...\n";
:     } else {
: 	print "No, that can't be right...\n";
:     }

What about local addresses?

Greg
-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


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

Date: Mon, 22 Jun 1998 15:53:07 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Find::File/Functional programing
Message-Id: <358E7F8D.1B68@min.net>

Xah Lee wrote:
> 
> Is there a way to use File::Find with purely functional style programing?
>...
> I desire all my codes to be strickly "functional")

With that attitude (or should I say "priority"), you are closing
yourself
off from essentially the entire standard library and the modules
available
on CPAN.  Perl programmers, by and large, are more interested in
object-oriented programming, which by its nature is stateful.

Now, something like File::Find could very easily be rewritten to be as
functional as you want it, but it's a job that you will have to do
yourself.  Same with all the other modules*.

However, the change you seem to want -- for find() to pass the name
to your sub via an argument, rather than your sub reaching into
File::Find -- doesn't make File::Find::find truly functional.
File::Find::name would still exist, it just would be hidden.
The change you propose is a good one -- for object-oriented reasons!

Good luck.

[*Excepting, of course, the few which have been written to support
functional programming.]

-- 
John Porter


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

Date: Mon, 22 Jun 1998 12:42:26 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: first language
Message-Id: <linberg-2206981242260001@projdirc.literacy.upenn.edu>

In article <8csoky8mz7.fsf@gadget.cscaper.com>, Randal Schwartz
<merlyn@stonehenge.com> wrote:

> >>>>> "Tom" == Tom Christiansen <tchrist@mox.perl.com> writes:
> 
> Tom> I first learned BASIC (BASIC-PLUS under RSTS/E),
> 
> Ooooh.  You had a *real* BASIC.  I had to use the HP2000 BASIC, which
> was VERY primitive compared to BASIC-PLUS.  Imagine 80-character
> strings (all 26 of them!) and arrays of a single dimension only.

Heck, I started with TRS-80 BASIC (listing the "source code" to Hamurabi
to learn how to sell my wheat.  Amazing.)  And shortly thereafter moved up
to Atari (400) BASIC and AppleSoft BASIC.  In fact, I dimly recall
Sinclair 1000 BASIC, where you couldn't type keywords, each was bound to a
key.  And I think I still have my old Atari 2600 BASIC cartridge, which
allowed you to write a nine-line program using a joystick.  There were
some great programming contests on that box...

>From there it was straight to 6502 assembler, then C (courtesy of K&R, of
course) a year or two later.

Perl would have destroyed me for all other languages had I not known 6502
assembler (any would have done) and C first, however.  I've mucked about
in a dozen or so languages over the years, but have really done 99% of my
stuff in 6502, C, BASIC (yes) and of course, Perl.
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: Mon, 22 Jun 1998 17:00:14 GMT
From: kaz@cafe.net (Kaz Kylheku)
Subject: Re: first language
Message-Id: <6mm281$ls2@espresso.cafe.net>

In article <898514364snz@genesis.demon.co.uk>,
Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
>>Because the precursors of C dealt only in words, not types of
>>varying sizes.  
>
>I think more fundamentally you would end up with a very odd language if
>pointer arithmetic did work in bytes. I think the decision would be the same
>for any language high level language that supports pointer arithmetic,
>even for a language with no historical baggage.

No, you would end up with BCPL! Hardly odd at all. In BCPL, a pointer refers
to a cell, and arithmetic works in cell units. Scaling for aggregates is done
the hard way. :)



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

Date: Mon, 22 Jun 1998 16:17:25 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: Flames....
Message-Id: <1db0xfs.1j3d1nw1gl4qeN@roxboro0-010.dyn.interpath.net>

T. Ames <ames0009@tc.umn.edu> wrote:

> chip@mail.atlantic.net (Chip Salzenberg) wrote:
> 
> >According to ames0009@tc.umn.edu:
> >>Your response also displays the "I'm so smart--you're so stupid"
> >>attitude ...
> >
> >Why should a demand that petitioners exert some effort be interpreted
> >as a put-down?
> >
> >Why should it be too much to expect that a person wanting to learn
> >about a *programming*language* know how to grep?!
> 
> That's the whole point. Your talking about people who are trying to
> learn what "grep" is -- but you are assuming (as many posters do) that
> a novice should already know something before they even ask. Why would
> they ask if they knew how to get the answer already?  

Because if a person doesn't know how to operate their machine at least
to the extent of knowing how to "grep" (more precisely how to searches)
on text files, they haven't learned enough about their computer to be
programming it.

New File
Save File
Open File 
Search File

Learn these before trying to learn to program.

-- 
John Moreno


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

Date: Mon, 22 Jun 1998 16:38:16 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Flames....
Message-Id: <pudge-2206981235300001@dynamic52.ply.adelphia.net>

In article <Pine.GSO.3.96.980622083750.6310f-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@teleport.com> wrote:

# I'm not trying to stomp on your ideas, but (to me) the people who read
# aren't the problem; it's the ones who don't. And you won't get them to
# read by giving them _more_ to read!

Ay, there's the rub.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Mon, 22 Jun 1998 16:43:26 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Flames....
Message-Id: <pudge-2206981240400001@dynamic52.ply.adelphia.net>

In article <MPG.ff818231143d69e9896dd@nntp.hpl.hp.com>, lr@hpl.hp.com
(Larry Rosler) wrote:

# The search tool *is* available, even on Windows systems (which is where 
# most of the flaming is aimed), but is hard to find.  The problems are:
# 
# 1.  Unlike Unix systems, the tool is not available by default from the 
# command-line interface (which is where most Perl programming is done).  
# The user must know about, obtain, and install grep -- a nontrivial task.
# 
# 2.  The GUI tool to search files by content is hidden as an 'advanced' 
# capability under the fundamental 'Start:Find:Files or Folders...' 
# interface that even beginners use to find files by name.  (Conceive of 
# 'grep' as an option under 'ls'!)

Please.  I use a Mac, where a tool to search a directory of files is
hidden even further than it is on Windows.


# Maybe those who respond here 'Use grep, dammit!' will consider that they 
# are adding yet another level of jargon to burden those struggling with 

So?  Look it up!  If I type "grep definition" into Alta Vista, the first
thing that comes up is a Jargon File definition for grep, exactly what is
needed.

What, should we post the Jargon File to clpm daily, too?

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Mon, 22 Jun 1998 17:47:46 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: ftp->get( ) in variable
Message-Id: <358e959c.276409736@news.mmc.org>

[posted and mailed]

On Mon, 22 Jun 1998 15:07:56 +0200, Juergen Weiss
<root@hpux01.hrz.uni-oldenburg.de> wrote:

>Is there any chance to redirect the output from ftp->get( <file>, <file>) 
>fro, Net::FTP into an list, array, hash.

Well, not directly, but you can use the retr and read methods to fetch the
remote file one chunk at a time and do something with the chunks . . .

my $rfd = $ftp->retr('remote_file_name') or die $ftp->message;

while ($rfd->read($buffer,$bufsize,$timeout))
{
	do_something_with $buffer;
}
$rfd->close or die "Can't close connection: $!\n";

-- 
                               Jeffrey R. Drumm, Systems Integration Specialist
                       Maine Medical Center - Medical Information Systems Group
                                                            drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me


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

Date: Mon, 22 Jun 1998 19:09:21 +0300
From: Harri Hatunen <hhh@mail.student.oulu.fi>
Subject: how can I find out the version of Perl?
Message-Id: <Pine.SGI.3.95.980622190726.21370B-100000@paju.oulu.fi>

Is there a way to find oout what version of Perl you have in your machine? 



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

Date: Mon, 22 Jun 1998 16:23:38 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: how can I find out the version of Perl?
Message-Id: <6mm0hv$rvd$3@ligarius.ultra.net>

[ posted and mailed ]

Harri Hatunen <hhh@mail.student.oulu.fi> wrote:
-> Is there a way to find oout what version of Perl you have in your machine? 

perl -v   oder  perl -V 


viel Glueck

Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-286-0591
  and let the jerk that answers know that his
  toll free number was sent as spam. "


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

Date: Mon, 22 Jun 1998 19:28:38 +0200
From: Jean-Marc FOREY <jmforey@olymp01.grenoble.hp.com>
Subject: Re: how can I find out the version of Perl?
Message-Id: <358E9446.95F3CFB6@olymp01.grenoble.hp.com>

Harri Hatunen wrote:

> Is there a way to find oout what version of Perl you have in your machine?

You can try $]



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

Date: Mon, 22 Jun 1998 16:56:26 +0100
From: "Richard G. Coleman" <richard@see.my.sig>
Subject: Re: How to find last modified date of a file?
Message-Id: <j6x1eHAq6nj1EwCl@alchemedia.co.uk>

In article <6mlp1o$pie$3@ligarius.ultra.net>, Bob Trieger
<sowmaster@juicepigs.com> writes
>"Richard G. Coleman" <richard@see.my.sig> wrote:
>-> In article <6mlfv5$vnq$1@strato.ultra.net>, Bob Trieger
>-> <sowmaster@juicepigs.com> writes
>-> >"Richard G. Coleman" <richard@see.my.sig> wrote:
>-> >> How do I extract the last modified date / time of a file eg a data file
>-> >-> and print it on an html page.
>-> >
>-> >perldoc -f stat
>-> >perldoc -f print
>-> >
>-> >HTH
>-> 
>-> I need to put these in a perl script eg
>-> 
>-> print "That file was modified on ";
>-> print {code to get date of file};
>-> 
>-> 
>-> I don't know how to include this in the script.
>
>
>I think you misunderstood.
>
>perldoc is a program that will print the text for perl functions and modules 
>for you if you have perl installed correctly. for more info and how to use it, 
>enter `perldoc perldoc' at the prompt.
>
>The 2 functions your are looking for are `stat' and `print'. I was merely 
>trying to show you how to find the documentation on them.
>
>

My apologies for the misunderstanding.

As it happens, my provider (Demon Internet UK) does not support perldoc
from the terminal screen.

Regards

Richard


>HTH
>
>Bob Trieger
>sowmaster@juicepigs.com
>" Cost a spammer some cash: Call 1-800-286-0591
>  and let the jerk that answers know that his
>  toll free number was sent as spam. "

-- 
             Richard G. Coleman  |  richard@alchemedia.co.uk
     Alchemedia Interactive Ltd  |  http://www.alchem.demon.co.uk/
     -------------------------------------------------------------



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

Date: Mon, 22 Jun 1998 08:54:46 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to find last modified date of a file?
Message-Id: <MPG.ff81e20d38663bd9896e0@nntp.hpl.hp.com>

In article <6mlp1o$pie$3@ligarius.ultra.net>, Bob Trieger 
<sowmaster@juicepigs.com> says...
> "Richard G. Coleman" <richard@see.my.sig> wrote:
> -> In article <6mlfv5$vnq$1@strato.ultra.net>, Bob Trieger
> -> <sowmaster@juicepigs.com> writes
> -> >"Richard G. Coleman" <richard@see.my.sig> wrote:
> -> >> How do I extract the last modified date / time of a file eg a data file
> -> >-> and print it on an html page.
 ...
> The 2 functions your are looking for are `stat' and `print'. I was merely 
> trying to show you how to find the documentation on them.

Alternatively (and perhaps more simply), look up '-M' and you will find 
that the value of the expression -M $filename is the number of days since 
the file was last modified.

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


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

Date: Mon, 22 Jun 1998 16:50:58 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to find last modified date of a file?
Message-Id: <Pine.GSO.3.96.980622093435.6310i-100000@user2.teleport.com>

On Mon, 22 Jun 1998, Richard G. Coleman wrote:

> As it happens, my provider (Demon Internet UK) does not support perldoc
> from the terminal screen.

Tell them that they're not giving you access to all of Perl. (If they
don't give you access to the docs, they're actually _costing_ themselves
money. You can tell them that I said so. :-)

But you have some other ways to read the docs: You can install them on
your own machine, you can find them on the web, you can sign up with
another provider, you can install perldoc yourself. If all else fails, you
can buy a good book on Perl, such as the venerable Camel. Good luck! 

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



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

Date: Mon, 22 Jun 1998 16:32:50 GMT
From: laurie.gw6uba@btinternet.com (Lawrence Elliott)
Subject: Re: HTML Forms - Checkbox data
Message-Id: <358e870b.67788@news.btinternet.com>

On Sun, 21 Jun 1998 01:16:08 GMT, lhiller@compupartner-edm.com wrote:

>Hi everyone,
>
>What is the value sent to a perl "form-fetching" script when a checkbox is on
>or off? Is this constant with all browsers?
>
>Thanks in advance,
>Jordan Hiller
>

Hi Jordan,

I have just started with Perl and CGI programming. According to my
book the value of a checkbox is only sent when the check box is
checked, nothing is sent when it isn't checked, which makes life
difficult. 

I am trying to write a Perl script that evaluates several checkboxes
but I am stuck. I have searched lots of FAQ's but haven't found an
answer yet.

Good Luck,


Regards
Lawrence Elliott
Bridgend
South Wales UK

E-mail laurie.gw6uba@btinternet.com
Web http://www.btinternet.com/~red.dragon
A member of Visual Basic User Group
http://www.vbug.co.uk



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

Date: Mon, 22 Jun 1998 16:55:57 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: HTML Forms - Checkbox data
Message-Id: <Pine.GSO.3.96.980622095320.6310j-100000@user2.teleport.com>

On Mon, 22 Jun 1998, Lawrence Elliott wrote:

> I am trying to write a Perl script that evaluates several checkboxes
> but I am stuck. 

I hope you'll get unstuck soon!

(I don't know whether you wanted more than sympathy, since you didn't ask
for anything. But if you've got a line of code which isn't doing what you
think it should be doing, you could post that and see what people see. Of
course, if your difficulty is more about CGI programming than about Perl,
this newsgroup is probably not the resource for that question.) 

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




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

Date: 22 Jun 1998 13:52:03 -0400
From: Mark Lehrer <mark@satch.markl.com>
Subject: Practical advice on linking in a .a
Message-Id: <m367ht494s.fsf@satch.markl.com>


Hello!

This is my first attempt at linking in some c routines; I read through
the perlxs page and it makes it look a little _too_ easy.

Is there a howto that can give me some hints?  This library uses some
ugly things like c structures and handles that don't seem to map
easily to perl structures.

Would it be best to make a wrapper that only used char* and int
wherever possible?

Thanks!
Mark



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

Date: Mon, 22 Jun 1998 12:44:45 -0400
From: Seo Choi <swc4@acpub.duke.edu>
Subject: print and the . operator ??
Message-Id: <Pine.SOL.3.91.980622123822.10113A-200000@teer2.acpub.duke.edu>

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-851401618-898533769=:10113
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.SOL.3.91.980622124321.10113D@teer2.acpub.duke.edu>

#!/usr/bin/perl

open(GRADES, "grades") || die "Can't open grades: $!\n";
while($line = <GRADES>) {
  ($student, $grade) = split(" ", $line);
  $grades{$student} .= $grade . " ";
  $gList{$student} = $grade . " ";
}

foreach $student (%grades) {
  print "$grades{$student}\n";
}

print "-" x 25, "\n";
foreach $student (%gList) {
  print "$grades{$student}\n";
}

from the code above I have two questions. the first is why in the line
	$grades{$student} .=
behaves the same way as 
	$grades{$student} =	without the dot


the second question is why I have the output when using the attachment as 
the input file as:
3

5

4

1

2

-------------------------
3

5

4

1

2

because when i take the "\n" from the two foreach loops the out pout is 
only two lines long??
---559023410-851401618-898533769=:10113
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=grades
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SOL.3.91.980622124249.10113B@teer2.acpub.duke.edu>
Content-Description: 

dG9tIDENCmdyZWcgMg0KamltIDMNCnBhdWwgNA0KcGV0ZXIgNQ0K
---559023410-851401618-898533769=:10113--


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

Date: Mon, 22 Jun 1998 17:02:18 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: print and the . operator ??
Message-Id: <Pine.GSO.3.96.980622095838.6310l-100000@user2.teleport.com>

On Mon, 22 Jun 1998, Seo Choi wrote:

> foreach $student (%grades) {

It's not likely that you actually want to iterate over both the keys _and_
values of a hash like that. There are many examples of iterating over a
hash in the documentation, several of which are in the entry for 'keys' in
the perlfunc manpage.

> why in the line
> 	$grades{$student} .=
> behaves the same way as 
> 	$grades{$student} =	without the dot

The first uses the append operator, the second is straight assignment.
They will behave differently if the variable isn't empty, of course.

Hope this helps!

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



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

Date: Mon, 22 Jun 1998 14:02:07 -0400
From: "Indy Singh" <indy@NOSPAMdemobuilder.com>
Subject: Re: Sending mail in Perl
Message-Id: <6mm5kv$r0g$1@nntp2.uunet.ca>

xholf03 wrote in message <6ml7q1$kll@vse470.vse.cz>...
>Hello,
>week ago i've started to learn perl ... (so i don't know anything)
>I've got problem with sending mail. Please, could you tell me what's wrong
>with this?
>
>#!/usr/bin/perl -w
>$from = 'xholf03@sorry.vse.cz';
>$to = 'xholf03@vse.cz';
>
>open (Mail, "/usr/bin/sendmail");
>print Mail "To: $to\n";
>print Mail "From: $from\n";
>print Mail "Subject: send\n";
>print Mail ".\n";
>close (Mail);
>
>Thanks much.
>filip



Try changing the line:
open (Mail, "/usr/bin/sendmail");
to:
open (Mail, "|/usr/bin/sendmail -t");

You need the bar character to open a pipe to a command, otherwise it will
try to open a file.  You will have to check if your sendmail program to see
if you need the -t option - most likely you do.

Indy






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

Date: Mon, 22 Jun 1998 15:59:50 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Speeding up Perl on an Apache server
Message-Id: <Pine.GSO.3.96.980622085838.6310g-100000@user2.teleport.com>

On Mon, 22 Jun 1998, Alan McCoy wrote:

> What's the best way to speed up the processing time for Perl scripts

The Perl FAQ talks about ways to speed up your scripts in section three. 
Hope this helps! 

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



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

Date: 22 Jun 1998 12:16:21 -0400
From: men2@auto.med.ohio-state.edu (Mark Nielsen)
Subject: Re: Speeding up Perl on an Apache server
Message-Id: <6mm00l$qu5$1@auto.med.ohio-state.edu>

try

http://perl.apache.org/
and 
http://perl.apache.org/#tidbits

Mark
-- 
---------------------------------------------------------------------------
Mark Nielsen	men2@auto.med.ohio-state.edu or gytres+@osu.edu
Systems Specialist
The Ohio State University


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

Date: 22 Jun 1998 16:48:34 GMT
From: billy@cast.msstate.edu (Billy Chambless)
Subject: Re: writing a mud in perl
Message-Id: <6mm1t2$3ph$1@nntp.msstate.edu>

In article <sokx4dki.fsf@mailhost.panix.com>, Jonathan Feinberg <jdf@pobox.com> writes:
|> HalloweenJack@my-dejanews.com writes:
 
|> > I'm considering writing a mud in perl (along with a few friends). 
 
|> If you write your friends in Perl, you might want to use constant, and
|> avoid the strict pragma.  Significant others are often implemented
|> with extensive use of lexical scoping, though you can avoid that
|> overhead through the use of the Swing module.  HTH.

Well, I'd rather use 'my()', but I won't push my preferences on anyone.

-- 
* "And there _is_ a real world. In fact, some of you
*    are in it right now."  -- Gene Spafford


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

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

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