[17733] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5153 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 19 18:10:45 2000

Date: Tue, 19 Dec 2000 15:10:19 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <977267418-v9-i5153@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 19 Dec 2000     Volume: 9 Number: 5153

Today's topics:
    Re: Language evolution C->Perl->C++->Java->Python (Is P <stuart@bmsi.com>
    Re: Language evolution C->Perl->C++->Java->Python (Is P <just_me@nowhere.com>
    Re: Mail::Send and MINE <peter.sundstrom@eds.com>
        O NO! TO MANY ERRORS! (Fryar386)
    Re: O NO! TO MANY ERRORS! <mothra@nowhereatall.com>
    Re: Oraperl <aks_music@hotmail.com>
    Re: Oraperl <jwhitt@webaccess.net>
    Re: Perl to TCP/IP Connection & Overall Direction Neede <eric@hilding.com>
        Perl's time function charles_z@my-deja.com
    Re: Perl's time function (Logan Shaw)
    Re: Perl's time function (Tad McClellan)
    Re: perl, iis, form/java mail, form width <Jukka.Korpela@hut.fi>
        problems with "sort" in NT estelnet@my-deja.com
    Re: problems with "sort" in NT (Tad McClellan)
        splitting key/value pairs into a hash (Wolfgang S.)
    Re: splitting key/value pairs into a hash <tony_curtis32@yahoo.com>
    Re: splitting key/value pairs into a hash (Tad McClellan)
        Using Microsoft Access with PERL <steve.blacker@ntlworld.com>
    Re: Using Microsoft Access with PERL <catnthat@goaway.com>
    Re: what is perldoc? (Tom Christiansen)
    Re: what is perldoc? <bart.lateur@skynet.be>
        Whither perlman? [Was: what is perldoc?] <mjcarman@home.com>
    Re: Whither perlman? [Was: what is perldoc?] (Tom Christiansen)
    Re: Wich module for download via http ? L.Willms@LINK-F.frankfurt.org
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 19 Dec 2000 14:41:56 -0500
From: "Stuart D. Gathman" <stuart@bmsi.com>
To: Just Me <just_me@nowhere.com>
Subject: Re: Language evolution C->Perl->C++->Java->Python (Is Python the   ULTIMATE oflanguages??)
Message-Id: <3A3FBA04.6F977043@bmsi.com>

Just Me wrote:
> 
> Well, now I really wonder why people have to reinvent the wheel over and over
> again. Smalltalk has been here since the 80's and has proven its value on many
> serious projects but in the last couple of years or so I am seeing a flood of new
> languages every year. It's like a tower of Babel. We all had VisualWorks Smalltalk
> doing exactly the same thing as Java and Python are doing now already 10 years ago
> and still these things are regarded as something new... I guess it's a matter of
> taste, some people like a syntax like this and some people prefer something else.

I have been trying to use Smalltalk for 15 years.  While very elegant,
it has several shortcomings:

1) commercial versions were ridiculously expensive.  I did most of my
playing with Digitalk SmalltalkV for DOS ($60) and GNU Smalltalk.

2) class libraries were not very standardized.  Non trivial code could
not be ported between vendors - unless you used only your own
libraries.  (Same problem as with pre-STL C++)

3) There was no package system.  There was no equivalent of
ClassLoader.  In C/C++, I could use DLL/so, but Smalltalk
implementations put all classes into a big soup called an image.  Tools
to export/import a particular package minus the rest of the soup were
complex and very expensive.  The whole soup had to be loaded into
virtual memory to run an application.

4) There was no security mechanism.

The most useful ST product was Digitalk STV/DOS.  It runs great on
surplus 8088 boxes with 640K and Hercules Mono monitor.  A single user
written primitive for Analog/Digital I/O, some Gauges and Sliders, and
voila - a cheap and flexible instrument controller.   

Java meets all our requirements - albeit with an ugly syntax from C++. 
Note that Java 'int' can be considered an identity valued subclass of
Integer.  (Identity valued means like 'String.intern()'.)  Same for
other primitives.  A similar thing goes on under the covers in
Smalltalk.  My point is that the elegant 'everything is an object' is a
syntax issue.  The Java way of using a completely different syntax for
primitives encourages programmers to be aware of which types are
primitive and optimize accordingly.  Different ST implementations could
have different primitive types - which was transparent to applications. 
Java has 


-- 
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - Mozart background
song for the Microsoft "Where do you want to go from here?" commercial.


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

Date: Tue, 19 Dec 2000 22:59:50 +0100
From: Just Me <just_me@nowhere.com>
Subject: Re: Language evolution C->Perl->C++->Java->Python (Is Python the   ULTIMATE oflanguages??)
Message-Id: <3A3FDA56.85149C96@nowhere.com>

"Stuart D. Gathman" wrote:

> I have been trying to use Smalltalk for 15 years.  While very elegant,
> it has several shortcomings:
>
> 1) commercial versions were ridiculously expensive.  I did most of my
> playing with Digitalk SmalltalkV for DOS ($60) and GNU Smalltalk.

I would be thinking the same if I saw only these two products. But Digitalk Smalltalk
changed very much from the DOS days on and later versions were even portable between
Windows and OS/2. The enterprise version has even got a repository system and there were
a lot of third party vendors in the market. Eventhough the last VSE version is from 1996
the tool can still match with any other development tool today.
But today there is a whole range of good Smalltalk environments available. VisualWorks
is still very expensive but only for commercial use, the non-commercial version can be
downloaded from their web site. Then there is the VisualAge Smalltalk and also a very
low cost version called Dolphin Smalltalk which could be regarded as the best
development environment for Windows available today (just my opinion). And there is also
Squeak but I wouldn't recommend it for a commercial project. Well, see it for yourself:

http://www.object-arts.com
http://www.campsmalltalk.com


> 2) class libraries were not very standardized.  Non trivial code could
> not be ported between vendors - unless you used only your own
> libraries.  (Same problem as with pre-STL C++)

This is not true anymore. Apart from the GUI code the class libraries are pretty much
the same accross dialects.

> 3) There was no package system.  There was no equivalent of
> ClassLoader.  In C/C++, I could use DLL/so, but Smalltalk
> implementations put all classes into a big soup called an image.  Tools
> to export/import a particular package minus the rest of the soup were
> complex and very expensive.  The whole soup had to be loaded into
> virtual memory to run an application.

Not true anymore. VisualWorks's got parcels, Dolphin has got a package loader and you
can even write applets in both of these tools. The good thing about Smalltalk package
system is that you can even write your preload/unload scripts and you can add/replace
methods in classes outside of your package so it's much more flexible than what you have
in Java.

> 4) There was no security mechanism.

As far as I know there is still nothing that would compare with the Java model but I
never had a need for this.

Anyway the languages are pretty much the same but when it comes to development
productivity on a large project Smalltalk outperformes Java. This is not necessarily
always true. As one IBM consultant once said if you need a day to write something in
Smalltalk you will need 3 days to write the same thing in Java, but there is so much
already written in Java that before you write what you need in Smalltalk you are better
off with Java. So, one has to estimate how much code can be reused and how much has to
be written from start to decide which is better for a particular project.
But the fact is that in every Smalltalk all code is open source and if there is a bug in
vendor's code you can just fix it and don't have to wait for the vendor's response.
Anyone who has lived trough a serious project involving third-party code will know what
I'm talking about, since when you have a deadline with a customer you can not rely on
the third part vendor to provide you with the fix. Apart from this, having all the
source code means that you can optimize the system to suit your needs and it is much
easier to understand the whole system based on its source.
I could go on and on, saying Smalltalk is better here and better there, but I could
hardly convince anyone only with words so I would just like to say keep it simple and
keep it small...



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

Date: Wed, 20 Dec 2000 10:51:18 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Mail::Send and MINE
Message-Id: <91ol8n$5dm$1@hermes.nz.eds.com>


J. K. <cljlk@hotmail.com> wrote in message
news:91naql$bhp$1@autumn.news.rcn.net...
> Hi,
>
> I am looking for Mail::Send and MINE package.
> Would anyone point out the direction?
> Thanks

You probably want MIME::Lite

http://search.cpan.org/





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

Date: 19 Dec 2000 20:34:53 GMT
From: fryar386@aol.com (Fryar386)
Subject: O NO! TO MANY ERRORS!
Message-Id: <20001219153453.04461.00001496@ng-cn1.aol.com>

I think I totally messed my script up.  I don't want to re-do the whole thing. 
Could you guys help me out with a couple of them?

Code:
#!/usr/local/bin/perl -Tw

# $Header: /cys/people/brenner/http/docs/web/perl5/RCS/simple#-form.cgi,v 1.5
1996/03/29 22:58:40 brenner Exp $
# Copyright (C) 1994 Steven E. Brenner
# This is a small demonstration script to demonstrate the use of 
# the cgi-lib.pl library
require 5.001;
use strict;

require "./cgi-lib.pl";

MAIN:
{
  my (%input,   # The CGI data
      $text,          $field, $planet, $speed, $attack, 
$health, $maxhealth, $peri, $KI, $attacks, $intel, $powerlevel, $defence,
$username, $filename, $N, $try);  

  # Read in all the variables set by the form
  &ReadParse(\%input);

  # Check that everything has been entered
  foreach $field (qw(username password race)) {
    &CgiDie("Error: Please fill in the '$field'\n") unless defined
$input{$field};
  }
   

  # Do some processing, and print some output
  ($text = $input{'text'}) =~ s/\n/\n<BR>/g; 

($filename = #input{'username'});
$filename =~ s/_/1;
#These lines show what planet the person is on
if ($input{'race'} eq "saiyan") { 

($planet = "planet vageta1");
}  
if ($input{'maingoal'} eq "speed") {
($speed = "25");
($attack = "10");
($defence = "10");
($KI = "100");
($powerlevel = "1000");
($peri = "5000p");

($health = "100");
($maxhealth = "100");
($intel = "10");
}
if($input{'maingoal'} eq "defence") {
($speed = "10");
($attack = "10");
($defence = "25");
($KI = "100");
($powerlevel = "1000");
($peri = "5000p");
($health = "100");
($maxhealth = "100");
($intel = "10");
}

if ($input{'maingoal'} eq "attack") {

($speed = "10");
($attack = "25");
($defence = "10");
($KI = "100");
($powerlevel = "1000");
($peri = "5000p");
($health = "100");
($maxhealth = "100");
($intel = "10");

}

if ($input{'maingoal'} eq "intel") {
($speed = "10");
($attack = "10");
($defence = "10");
($KI = "100");
($powerlevel = "1000");
($peri = "5000p");

($health = "100");
($maxhealth = "100");
($intel = "25");
}
print "Content-type: text/html\n\n";
use Fcntl;
{my ($success, $try);	
my $max_try = 10;	
until ($success) 
{$success = sysopen LOCK, "lock.lck", O_WRONLY | O_CREAT | O_EXCL;
die "Can't create lock.lck: $!" if ++$try == $max_try && !$success;
select undef, undef, undef, 0.05 unless $success;
}	
close LOCK
or die "lock.lck didn't close nicely: $!\n";}


open(OUT, ">$filename.txt")
or die "Error, Please try later\n";
#Put File lock here  


  












print <<ENDOFTEXT;



<html>

<link rel=stylesheet href=http://paweb01.planetarion.com/planet_default.css>
<link rel=stylesheet
href=http://paweb01.planetarion.com/planet_explorer_win.css>

<head>
 <title>Thank You for Joining!</title>
</head>

<body bgcolor=#000000 text=#FFFFFF link=#FFFFCC vlink=#FFFFCC alink=#FFFFCC
leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
 
<script language="JavaScript1.2">

/*
Watermark Backgound Image Script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

if (document.all)
document.body.style.cssText="background:black
url(http://members.spree.com/funngames/max_goku_ultimate/animations/instan
tgoku.gif) no-repeat fixed center center"
</script>







<table width=600 align=center border=0 cellpadding=0 cellspacing=0>
<tr>
 <td width=58%>Under Construction!</td>
 <td width=36%
background=http://members.spree.com/funngames/maxgoku3/images/top_bar_midd
le.gif>
</td>
 <td width=6%<img
src=http://members.spree.com/funngames/maxgoku3/images/top_bar_right.gif
width=40 height=34 border=0></a></td>
<td width=10
background=http://members.spree.com/funngames/maxgoku3/images/border_left.
gif><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/spacer.gif width=10
height=4></td>

</tr>
</table>
<P>


<!-- Section body -->
<table width=600 align=center border=0 cellpadding=0 cellspacing=0>
<tr>
 <td width=10
background=http://members.spree.com/funngames/maxgoku3/images/border_left.
gif><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/spacer.gif width=10
height=4></td>
 <td width=579><center><b> <CENTER><IMG
SRC="http://www.angelfire.com/anime2/SuperSaiyanGokusGifs/DBZ/Goku/Goku8.gif">



</CENTER></b></center></td>
 <td width=11
background=http://members.spree.com/funngames/maxgoku3/images/border_right
 .gif><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/spacer.gif width=11
height=4></td>
</tr>
</table>

















<!-- Section Heading -->
<table width=600 align=center border=0 cellpadding=0 cellspacing=0>
<tr>
 <td width=18><img
src=http://members.spree.com/funngames/maxgoku3/images/header_left.gif width=18
height=34></td>
 <td width=100%
background=http://members.spree.com/funngames/maxgoku3/images/header_middl
e.gif><CENTER><B>Thank you for joining Max_Gokus Dragonball Z
RPG!:</B></CENTER></td>
 <td width=18><img
src=http://members.spree.com/funngames/maxgoku3/images/header_right.gif
width=18 height=34></td>
</tr>
</table>





<table width=600 align=center border=0 cellpadding=0 cellspacing=0>
<tr>
  <td width=10
background=http://members.spree.com/funngames/maxgoku3/images/border_left.
gif><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/spacer.gif width=10
height=4></td>
  <td width=579>
Welcome $input{'username:'}!  You are the newest member of Max_Gokus Dragonball
Z RPG!  
<P>
Your Information:
<BR>
RPG name: $input{'username'}
<BR>
Password: $input{'password'}
<BR>
E-Mail: $input{'email'}
<BR>
Special Attacl: $input{'special attack'}
<P>
Shortly you will receive an e-mail at the mail address you provded
<P>
<STRONG>Thanks for Joining Max_Gokus Dragonball Z RPG!</STRONG>
<A HREF="http://maxgoku.hypermart.net/main.html">Back to the Main Page</A>

</td>
</table></td>
  <td width=11
background=http://members.spree.com/funngames/maxgoku3/images/border_right
 .gif><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/spacer.gif width=11
height=4></td>

</table>





<!-- Section Heading -->
<table width=600 align=center border=0 cellpadding=0 cellspacing=0>
<tr>
 <td width=18><img
src=http://members.spree.com/funngames/maxgoku3/images/header_left.gif width=18
height=34></td>
 <td width=100%
background=http://members.spree.com/funngames/maxgoku3/images/header_middl
e.gif><CENTER><B>My Power Level is:</B></CENTER></td>
 <td width=18><img
src=http://members.spree.com/funngames/maxgoku3/images/header_right.gif
width=18 height=34></td>
</tr>
</table>

<!-- Section body -->
<table width=600 align=center border=0 cellpadding=0 cellspacing=0>
<tr>
 <td width=10
background=http://members.spree.com/funngames/maxgoku3/images/border_left.
gif><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/spacer.gif width=10
height=4></td>
 <td width=579>
<B>
<CENTER>
<A HREF="http://www.beseen.com/hc-index.html">
<IMG SRC=
"http://pluto.beseen.com/hit.counter?account=821350&font=GreenOnBlack&base=29"
BORDER=0>

</A>
</CENTER>
</B>
</td>
 <td width=11
background=http://members.spree.com/funngames/maxgoku3/images/border_right
 .gif><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/spacer.gif width=11
height=4></td>
</tr>
</table>






<!-- Bottom of Table -->
<table width=600 align=center border=0 cellpadding=0 cellspacing=0>
<tr>
 <td width=18><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/corner_bl.gif width=18
height=17></td>
 
<td width=100%
background=http://members.spree.com/funngames/maxgoku3/images/bottom_bar.g
if><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/spacer.gif width=1
height=1></td>

 <td width=18><img border=0
src=http://members.spree.com/funngames/maxgoku3/images/corner_br.gif width=18
height=17></td>
</tr>
</table>
<br>

</body>

</html>


 


 


 


 


 


 


 


 


 


 












ENDOFTEXT


print OUT <<ENDOFTEXT;
<P>
Username: $input{username}
Password: $input{password}
E-mail: $input{email}
Attacks: $input{basic1}
Main Goal: $input{maingoal}
Planet: $planet
Race: $input{race}
Speed: $speed
Defence: $defence
Attack: $attack
KI: $KI
Health: $health
MaxHealth: $maxhealth
Intellegence: $intel
Peri(money): $peri
Power Level: $powerlevel
ENDOFTEXT
close(OUT)     
or warn "test.txt didn't close nicely: $!\n";  
# Locked out part of the code....
unlink "lock.lck"
or die "Couldn't unlink lock.lck: $!\n";
# unlocked part of the code goes here...

  # Close the document cleanly.
  print &HtmlBot;
}

open(OUT, ">>takennames.txt")
or die "Error, Please try later\n";
#Put File lock here 
print out <<ENDOFTEXT 
$input('username')
$input('email')
endoftext


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

Date: Tue, 19 Dec 2000 12:35:53 -0800
From: mothra <mothra@nowhereatall.com>
Subject: Re: O NO! TO MANY ERRORS!
Message-Id: <3A3FC6A9.113A0BC9@nowhereatall.com>



Fryar386 wrote:

> I think I totally messed my script up.  I don't want to re-do the whole thing.
> Could you guys help me out with a couple of them?
>

[snipped many lines of code]

you need to read this!

http://perl.plover.com/Questions.html



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

Date: Tue, 19 Dec 2000 20:05:13 GMT
From: =?iso-8859-1?Q?=D0=2DVolta?= <aks_music@hotmail.com>
Subject: Re: Oraperl
Message-Id: <3A3FBC79.F4494075@hotmail.com>

Hi Josh:

Not specifically, if you have a legacy oraperl script you want to run
without modification, there is an Oraperl emulation layer that comes
with DBD::Oracle.

DBperl use these days is replaced with DBI.

You should
use DBI;
with DBD::Oracle calls directly in your perl scripts

check it: http://www.symbolstone.org/technology/perl/DBI/




Josh Whitt wrote:

> One question:
>
> Is there a version of oraperl for Perl5?
>
> Thanks, Josh



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

Date: Tue, 19 Dec 2000 13:46:59 -0700
From: "Josh Whitt" <jwhitt@webaccess.net>
Subject: Re: Oraperl
Message-Id: <3a3fc7de@news.webaccess.net>

OK, thanks, that's what I thought.  I'm up for a contract where the legacy
idiot that's architecting the thing uses oraperl.  He's so far behind the
times that he thinks that's the only DB solution for Oracle in Perl.  And
I'm unemployed so I'd have to take it.

I absolutely hate people who don't bother learning what's out there.

- Josh

"Ğ-Volta" <aks_music@hotmail.com> wrote in message
news:3A3FBC79.F4494075@hotmail.com...

> Not specifically, if you have a legacy oraperl script you want to run
> without modification, there is an Oraperl emulation layer that comes
> with DBD::Oracle.
>
> DBperl use these days is replaced with DBI.
>
> You should
> use DBI;
> with DBD::Oracle calls directly in your perl scripts
>
> check it: http://www.symbolstone.org/technology/perl/DBI/





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

Date: Tue, 19 Dec 2000 15:04:32 -0800
From: Eric Hilding <eric@hilding.com>
Subject: Re: Perl to TCP/IP Connection & Overall Direction Needed
Message-Id: <3A3FE980.E7453830@hilding.com>

Uri Guttman wrote:
> 
>   TW> Ahh Uri, you are so free from the ravages of sarcasm. (-:
> 
> well, i did answer some of his queries. but his attitude about "I CAN DO
> THIS I THINK" just is disgusting. he doesn't know anything about perl
> and is way over his head and he spouts that. sarcasm was my mildest
> emotion.

Umh, you must have gotten up on the "wrong side of the bed", because you
have apparently completely MISUNDERSTOOD what I was trying to say.

I encourage you to be careful with the use of the word "doesn't know
anything", because that is a false assumption.  I specifically stated
that my Perl studies had slipped, I had ordered the CD Bookshelf, and
was trying to indicate those areas that either I *HAVE* been able to
use Perl or that I "THINK" I can do it...and have ordered additional
instruction & knowledge.

Additionally, and quite admittedly, that I am somewhat "clueless" about
how to approach certain aspects of this.  I thought that's what this 
newsgroup was about.  At least it used to be, several years ago, with
lots of very helpful people.

You missed the sincere humility of my admission that I needed some 
"direction" ... but that I'm not here to leach off anyone either.
THAT was the intent of "I THINK I CAN DO THIS" as well.

Gheeezzzzzzz...


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

Date: Tue, 19 Dec 2000 21:35:03 GMT
From: charles_z@my-deja.com
Subject: Perl's time function
Message-Id: <91oka6$j11$1@nnrp1.deja.com>

I'm using Perl's time() function, and the output is always 7 hours ahead
of when I type 'date' on an x-term.  Where does Perl get the current
time?

thanks

Charles


Sent via Deja.com
http://www.deja.com/


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

Date: 19 Dec 2000 16:35:40 -0600
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Perl's time function
Message-Id: <91onrs$813$1@ahab.cs.utexas.edu>

In article <91oka6$j11$1@nnrp1.deja.com>,  <charles_z@my-deja.com> wrote:
>I'm using Perl's time() function, and the output is always 7 hours ahead
>of when I type 'date' on an x-term.  Where does Perl get the current
>time?

I'm going to guess based on this statement that you do not live in
England.  Instead, apparently you live somewhere that's about 105
degrees longitude west from England, give or take 15 degrees.

In other words, what you're running into is time zones.  On Unix, the
time is always internally kept in GMT a/k/a UTC.  Certain commands,
such as "date" will convert it to localtime and print out the result of
that.  However, if you write some Perl code and you don't do a
conversion, then you're going to get the time in Greenwich, England,
not the time wherever it is that you live.

So, what you want to do is type "perldoc -f localtime", and maybe also
"man localtime" if you want some general Unix background on the
subject.

Hope that helps.

  - Logan


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

Date: Tue, 19 Dec 2000 16:40:21 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl's time function
Message-Id: <slrn93vle5.afd.tadmc@magna.metronet.com>

charles_z@my-deja.com <charles_z@my-deja.com> wrote:

>I'm using Perl's time() function, 


So then you should also be reading about Perl's time() function.

Are you?

   perldoc -f time


>and the output is always 7 hours ahead
>of when I type 'date' on an x-term.  


So you are on the West Coast then.

perlfunc says "00:00:00 UTC, January 1, 1970 for most other systems".
                        ^^^


That UTC means roughly Greenwich Meridian or Zulu time.

You are in a different timezone (Pacific), so

   perldoc -f localtime

which the docs for time() also mention.


>Where does Perl get the current
>time?


Doesn't matter. If you don't want it in UTC, then use localtime()
to convert it to, well... local time.


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 19 Dec 2000 23:24:11 +0200
From: Jukka Korpela <Jukka.Korpela@hut.fi>
Subject: Re: perl, iis, form/java mail, form width
Message-Id: <4ffv3tcij1hjujrbv7mlg8ih94oc57s097@4ax.com>

invinfo@my-deja.com wrote:

>Some newbie questions:

Please post each question as a separate message, with a Subject line
which is descriptive for the topic and content of the question, and to
_a_ group you have chosen carefully. You'll note that there's little
reason to crosspost when you do this, and discussions will be much more
organized.

I have set followups to c.i.w.a.h only, since I comment on those
questions only that do not specifically relate to Perl.

>1) How can I make my form full size ?  Is there a width attribute ?
>	I'm having trouble getting a <hr> tag within a form to stretch
>the whole width of the page.

You can use the HTML specifications at http://www.w3.org/ , or the more
readable (though non-authoritative) description at
http://www.htmlhelp.com/reference/html40/
to check what elements take what attributes. No, there is no WIDTH
attribute for the FORM element. The HR element can have a WIDTH
attribute with a percentage value, but it relates to the "available
width", The spec is a bit vague here, but browsers seem to have
interpreted it so that
<form ...>
 ...
<hr width="100%">
</form>
makes the line full-width, thereby making the form occupy full width
too. So I don't see the problem. (Except that it's debatable whether
it's a good idea to make it full-width.)

As usual, the URL of your current best attempt would illustrate what you
regard as a problem, and it would make it possible to suggest approaches
suitable for that particular context.

If you meant _full_ width from the very left to the very right in the
canvas, overriding normal page margins, then there are additional issues
to be considered, see
http://www.htmlhelp.com/faq/html/effects.html#no-margins

>3) I'm looking for good examples of form based email scripts.

If you really want to find and install (perhaps after modification) a
script for that, you'll find lots of them in the CGI Resources Index.
But normally you should first check what's readily available on your
server. See http://www.hut.fi/u/jkorpela/forms/ for some more
explanations and pointers.

>4) I've seen some pages, when saved as a favorite in IE have unique
>icons with them.

Yes. This too is answered in the Web Authoring FAQ:
http://www.htmlhelp.com/faq/html/effects.html#favicon
-- 
Yucca, http://www.hut.fi/u/jkorpela/
Brevis esse laboro, obscurus fio.


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

Date: Tue, 19 Dec 2000 21:39:40 GMT
From: estelnet@my-deja.com
Subject: problems with "sort" in NT
Message-Id: <91okiq$jbu$1@nnrp1.deja.com>

Hi...

First, sorry, but my english is very poor.

Could somebody help me?
I need to translate this code line for run in NT.

system "sort", "$dircgi/archive.dat", "-n", "-
o", "$dircgi/archive2.dat";

In Unix, it works... but in NT no...whats the porblem?

Thanks


Sent via Deja.com
http://www.deja.com/


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

Date: Tue, 19 Dec 2000 16:54:09 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: problems with "sort" in NT
Message-Id: <slrn93vm81.afd.tadmc@magna.metronet.com>

estelnet@my-deja.com <estelnet@my-deja.com> wrote:

>system "sort", "$dircgi/archive.dat", "-n", "-
>o", "$dircgi/archive2.dat";
>
>In Unix, it works... but in NT no...whats the porblem?


Ask perl itself to tell you what the problem is, by checking
the return value from system().

   perldoc -f system

shows how to do that.


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 19 Dec 2000 22:16:39 GMT
From: w-s@gmx.de (Wolfgang S.)
Subject: splitting key/value pairs into a hash
Message-Id: <91omo7$rau$1@news.cs.tu-berlin.de>



Hi there,

I'm trying to build a hash from a comma-seperated key/value list,
eg. $string  = "0, foo, 1, bar, 2, baz"
Of course one could do it like this:

      my @map = split(/, ?/,$string);
      for ( my $h = 0; $h <= $#map; $h+=2 ) {
        %hash = ($map[$h] => $map[$h+1]);
      }

but there must be a perlish way to do it in one line. I thought about
%hash = map { $_ => shift } split(/, ?/,$string);
but the shift does not shift the array returned from split, and
I don't know I could referer to that array.

Any ideas ?

Thanx + greetings,

Wolfgang


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

Date: 19 Dec 2000 16:23:14 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: splitting key/value pairs into a hash
Message-Id: <87hf406ofh.fsf@limey.hpcc.uh.edu>

>> On 19 Dec 2000 22:16:39 GMT,
>> w-s@gmx.de (Wolfgang S.) said:

> Hi there,

> I'm trying to build a hash from a comma-seperated key/value list,
> eg. $string = "0, foo, 1, bar, 2, baz" Of course one could do it
> like this:

>       my @map = split(/, ?/,$string); for ( my $h = 0; $h <= $#map;
> $h+=2 ) { %hash = ($map[$h] => $map[$h+1]); }

If I understand you right, the answer is even easier than you think:

    my %map = split(/, ?/,$string);

and then to look at it, 1 way would be:

    my $string = "0, foo, 1, bar, 2, baz";

    my %map = split(/, ?/, $string);

    while (my($k, $v) = each %map) {
        print "$k -> $v\n";
    }

    ==>
        0 -> foo
        1 -> bar
        2 -> baz

hth
t
-- 
Eih bennek, eih blavek.


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

Date: Tue, 19 Dec 2000 17:04:55 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: splitting key/value pairs into a hash
Message-Id: <slrn93vms7.aie.tadmc@magna.metronet.com>

Wolfgang S. <w-s@gmx.de> wrote:

>the array returned from split


split() *never* returns an array. It returns a list.

(it can split _into_ an array, though that is deprecated,
 but you are not using it in scalar context anyway)


-- 
    Tad McClellan                          SGML consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 19 Dec 2000 21:46:25 -0000
From: "steve.blacker" <steve.blacker@ntlworld.com>
Subject: Using Microsoft Access with PERL
Message-Id: <FLQ%5.15930$T%5.266615@news6-win.server.ntlworld.com>

Is there a PERL or ASP script anywhere that will let me view and search
Microsoft Access databases online?

Thanks,
Tom




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

Date: 19 Dec 2000 22:14:34 GMT
From: "The Cat In The Hat" <catnthat@goaway.com>
Subject: Re: Using Microsoft Access with PERL
Message-Id: <91omka$9oa@dispatch.concentric.net>

Please check www.cpan.org for information pertaining to preexisting modules.

http://search.cpan.org/search?mode=doc&query=ODBC

"steve.blacker" <steve.blacker@ntlworld.com> wrote in message
news:FLQ%5.15930$T%5.266615@news6-win.server.ntlworld.com...
> Is there a PERL or ASP script anywhere that will let me view and search
> Microsoft Access databases online?
>
> Thanks,
> Tom




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

Date: 19 Dec 2000 12:39:01 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: what is perldoc?
Message-Id: <3a3fb955@cs.colorado.edu>

Scripsit in epistola sua alazarev1981@my-deja.com:

>Some people keep on putting the following text in their messages
>without any explaination as to where it is:
>
>perldoc perldsc
>perldoc perllol

To respond somewhat literally albeit admittedly not particularly
usefully to the question posed in the subject line, the answer that
perldoc(1) is a predominantly Microsoft-specific perl program that
can only charitably be described as a nearly unconscionable abomination
whose main job is to help keep those who cannot help otherwise
themselves from helping themselves.

However, I suppose you'll want something more tangible.  Very well.
Those directives mean something along the lines of:

    Please consult the perldsc(1) manpage, which is included standard
    with every perl distribution and is sitting there, apparently
    unbeknownst to you, on *your*very*own*widdle*computer*.

Or words to that effect.  It is a polite but succinct request that
you should RTFM--which while succinct, is hardly the paramount
expression of politesse.

However, it would appear that you are 

>I am assuming it's some type of perl documentation on the web? 

That would be wrong.  The web is not the source of all knowledge.
Like any proper program, perl comes with complete online documentation.
You have no reason to turn to the web for such things.  Even on a
computer without a network or other mechanism for reaching the
outside world, if you have perl there, you have its manpages as
well.

>Can
>someone please tell me where I can find it? I'm trying to fake a 2d
>array and I can't get it, I need more sources....ack!

From the introduction to the new Camel:

    =head1 Online Documentation

    Perl's extensive online documentation comes as part of the
    standard Perl distribution.  (See the next section for offline
    documentation.) Additional documentation shows up whenever you
    install a module from CPAN.

    When we refer to a "Perl manpage" in this book, we're talking
    about this set of online Perl manual pages, sitting on your
    computer.  The name I<manpage> is purely a convention meaning
    a file containing documentation--you don't need a Unix-style
    I<man> program to read one.  You may even have the Perl manpages
    installed as HTML pages, especially on non-Unix systems.

    The online manpages for Perl have been divided into separate
    sections so you can easily find what you are looking for without
    wading through hundreds of pages of text.  Since the top-level
    manpage is simply called I<perl>, the Unix command "C<man perl>"
    should take you to it.  That page in turn directs you to more
    specific pages.  For example, "C<man perlre>" will display the
    manpage for Perl's regular expressions.  The I<perldoc> command
    might work on a few systems where the I<man> command won't.  On
    Macs, you need to use the I<Shuck> program.  Your port may also
    provide the Perl manpages in HTML format, or your system's
    native help format.  Check with your local sysadmin, unless
    you're the local sysadmin.

Definitely time to update and re-release good ol' perlrtfm(1).

--tom


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

Date: Tue, 19 Dec 2000 20:10:40 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: what is perldoc?
Message-Id: <isfv3tkbud1hh5n4p6ott43rm21jok3dbe@4ax.com>

alazarev1981@my-deja.com wrote:

>Some people keep on putting the following text in their messages
>without any explaination as to where it is:
>
>perldoc perldsc
>perldoc perllol
>
>I am assuming it's some type of perl documentation on the web? Can
>someone please tell me where I can find it?

No. It's a script, that is part of the standard distribution. If you
have Activestate ¨Perl for Windows, then perldoc will be a BAT file,
which resides right next o the perl EXE file, in the "bin" subdirectory.

You're supposed to type this at the command line (DOS) prompt, but I
like to use an output capturing editor (in my case: GWDEdit from
gwdsoft, <www.gwdsoft.com>, but other edotors such as Textpad can do the
same), and I provide a tool interface. I can add whatever parameter I
like, and the result is captured into an editor window.

-- 
	Bart.


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

Date: Tue, 19 Dec 2000 14:29:04 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Whither perlman? [Was: what is perldoc?]
Message-Id: <3A3FC510.BED6E643@home.com>

Tom Christiansen wrote:
> 
> To respond somewhat literally albeit admittedly not particularly
> usefully to the question posed in the subject line, the answer that
> perldoc(1) is a predominantly Microsoft-specific perl program that
> can only charitably be described as a nearly unconscionable
> abomination whose main job is to help keep those who cannot help
> otherwise themselves from helping themselves.

That reminds me -- Tom, is the alpha of perlman still available? I
wanted to play around with it recently but have been unable to connect
to the URL you had posted earlier
(doriath.perl.com/misc/perlman-alpha0.tar.gz)

-mjc


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

Date: 19 Dec 2000 14:18:33 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: Whither perlman? [Was: what is perldoc?]
Message-Id: <3a3fd0a9@cs.colorado.edu>

In article <3A3FC510.BED6E643@home.com>,
Michael Carman  <mjcarman@home.com> wrote:
>That reminds me -- Tom, is the alpha of perlman still available? 

Sure.  Here's the TODO:

I have to do these things, at least.  In no particular order:

1   Fix a brand-newly-introduced bug in the stand-alone
    grepper.  

2   Document all the programs in the suite.  None really
    have manpages yet.

3   Dramatically update/rewrite the perlrtfm podpage,
    the tutorial on reading and accessing the incredible
    amounts of reference documentation using tools
    instead of tired eyeballs.

4   Incorporate feedback from people who've played with it.

5   Figure out what to do about primitive sub-Unix systems 
    that don't grok variant $0, rendering
        % perlfunc open
        % perlop quote
    useless, and forcing the annoying longer
        % perlman perlfunc open
        % perlman perlop quote
    or maybe the slightly shorter
        % pm func open
        % pm op quote
    I might have to create a makefile that generates a bunch of
    miniperl scripts instead of links, I suppose.  Blech.

6   Get more platform testing once all this is done.

7   Update the Perl build system to optionally splitpod 
    things in section 3.


>I
>wanted to play around with it recently but have been unable to connect
>to the URL you had posted earlier
>(doriath.perl.com/misc/perlman-alpha0.tar.gz)

Glunk!  I can't even get there myself.  The whole network seems
hosed today.  I'll see what I can see.

--tom


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

Date: Tue, 19 Dec 2000 19:50:57 GMT
From: L.Willms@LINK-F.frankfurt.org
Subject: Re: Wich module for download via http ?
Message-Id: <91oe6t$dil$1@nnrp1.deja.com>

In article <slrn92ct9s.ff9.rgarciasuarez@rafael.kazibao.net>,
  rgarciasuarez@free.fr (Rafael Garcia-Suarez) wrote:
> François wrote in comp.lang.perl.misc:
> > I want to use Perl to make a script that download a file from a web
site.
> > How can I do that ?
>
> Use the LWP suite of modules, available on CPAN in the libwww bundle.
> The simplest is LWP::Simple. More sophisticated methods are
implemented
> by LWP::UserAgent.
>

   I don't know where to find CPAN. I'm not sure if my question is the
same as the one by Francois.

   I have a web site where people can among other things download
ZIPped files. Instead of an HREF to the location of the file, I want to
call a PERL script which hides the actual location of the file, since I
may have to move the file to a different server for cost reasons.

   How do I do that?

   I'm new to PERL but not new to programming. Please don't come up
with smarties like "Learn Perl". This is the way I try to learn PERL.
So please help me to do the first step.


Lüko Willms
/----------   L.Willms@LINK-F.frankfurt.org



Sent via Deja.com
http://www.deja.com/


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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


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