[17008] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4420 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 25 06:05:26 2000

Date: Mon, 25 Sep 2000 03:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <969876307-v9-i4420@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 25 Sep 2000     Volume: 9 Number: 4420

Today's topics:
    Re: "not in string" - how to do it? (Keith Calvert Ivey)
    Re: "not in string" - how to do it? <jeff@vpservices.com>
        [IGNORE - OFF TOPIC] Re: vertical text renderer <godzilla@stomp.stomp.tokyo>
        attachment not in body of email  <hugo@fractalgraphics.com.au>
        how do I use Local Host <abatec@seattleu.edu>
        how do i use localhost <abatec@seattleu.edu>
    Re: Inserting one page inside another <miltginsburg@email.com>
        IO::Socket::INET Help milone8@my-deja.com
        Massive kill Unix and Perl <vivekvp@spliced.com>
    Re: MD5 Apache Password Encryption? <wrowe@rowe-clan.you.know.why.net>
        Multi-thread Perl with mod_perl <arguo@mail.educities.edu.tw>
        Net::Telnet module for windows version of perl <fail00@hotmail.com>
    Re: Net::Telnet module for windows version of perl <undergronk@my-deja.com>
    Re: Pattern Matching Question <lr@hpl.hp.com>
        Perl sequential number generator <gdaniell@wt.com.au>
    Re: problems with Net::POP3 in 5.6 (Martien Verbruggen)
    Re: Question to the wise - Reading From File <lr@hpl.hp.com>
    Re: Running lengthly perl scripts over cgi dj_morri@my-deja.com
    Re: Time Zone conversion (Villy Kruse)
        Translation of perl code <buag@sta.his.se>
    Re: Translation of perl code (Abigail)
    Re: Unrecognized character \327 <udo.kuehne@inatec.com>
    Re: vertical text renderer <uri@sysarch.com>
    Re: Warning message in Win32::ODBC module (Philip Lees)
    Re: Windows 98 / Active Perl / CGI (Tim Hammerquist)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 25 Sep 2000 03:59:49 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: "not in string" - how to do it?
Message-Id: <39d2cbcb.31193999@news.newsguy.com>

Jeff Zucker <jeff@vpservices.com> wrote:
>Keith Calvert Ivey wrote:
>> Jeff Zucker <jeff@vpservices.com> wrote:
>> 
>> >> The full problem is that the string must match certain criteria
>> >> and must not match certain other; something like "have a "wxyz"
>> >> followed by "mrst" and a q in between them but there must
>> >> not be a "d" in between them.
>> >
>> >    print if /wxyz(.+)mrst/  &&  $1 !~ /d/ && $1 =~ /q/;
>> >
>> >Or use Larry's answer which is probably oodles more effecient than this.
>> 
>> And works correctly on strings where yours doesn't, such as
>> 'wxyzdwxyzqmrst'.
>
>In what way does mine not work on that string?  That string contains a d
>in between wxyz and mrst and therefore should not be printed.  Mine
>doesn't print it.

Well, as usual it's not 100% clear from the specification we
have, but it does say *a* 'wxyz', which does not mean to me that
the condition must hold for *every* 'wxyz' in the string.  And
that string does have a 'wxyz' (the second one) followed by
'mrst' and a 'q' between them but no 'd' between them, so it
seems to me (and Larry, apparently) that it should be printed.

In any case, the main purpose of my post was to point out that
Larry's solution and yours matched different strings.  Maybe
yours is what the original poster wanted.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: Sun, 24 Sep 2000 21:56:23 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: "not in string" - how to do it?
Message-Id: <39CEDAF7.1FC637A9@vpservices.com>

Keith Calvert Ivey wrote:
> 
> Jeff Zucker <jeff@vpservices.com> wrote:
> >Keith Calvert Ivey wrote:
> >> Jeff Zucker <jeff@vpservices.com> wrote:
> >>
> >> >> The full problem is that the string must match certain criteria
> >> >> and must not match certain other; something like "have a "wxyz"
> >> >> followed by "mrst" and a q in between them but there must
> >> >> not be a "d" in between them.
> >> >
> >> >    print if /wxyz(.+)mrst/  &&  $1 !~ /d/ && $1 =~ /q/;
> >> >
> >> >Or use Larry's answer which is probably oodles more effecient than this.
> >>
> >> And works correctly on strings where yours doesn't, such as
> >> 'wxyzdwxyzqmrst'.
> >
> >In what way does mine not work on that string?  That string contains a d
> >in between wxyz and mrst and therefore should not be printed.  Mine
> >doesn't print it.
> 
> Well, as usual it's not 100% clear from the specification we
> have, but it does say *a* 'wxyz', which does not mean to me that
> the condition must hold for *every* 'wxyz' in the string.  

Oops, i canceled this post because just after I sent it, I caught your
point and saw what I was missing.  I guess the cancel didn't take.  I
sent a second one congratulating you on your good catch because of
course you are right.

> Maybe yours is what the original poster wanted.

Your guess on that is as good as mine :-)

-- 
Jeff


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

Date: Mon, 25 Sep 2000 00:48:09 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: [IGNORE - OFF TOPIC] Re: vertical text renderer
Message-Id: <39CF0339.F4E46F4E@stomp.stomp.tokyo>

Uri Guttman wrote:

> as usual, you won't address the problem as posted. 
> i assume because you can't do anything other than 
> sniff shit. oh, well, just more proof of your 
> trolling behavior. evading direct questions, 
> ad hominem attacks, repeated childish comments,
> low quality writing.
 
> go away and change your girl's diapers.


Well, at least you have stopped threatening our
family with physical violence, have stopped
threatening our family with crime and, have
stopped stalking me from newsgroup-to-newsgroup
only to harass me in your typical vulgar way.

These are activities in which you once engaged
on a daily basis for months on end, despite
my repeatedly and politely asking you to stop,
joining in with many others who also asked you
to stop this vulgar sociopathic behavior.

However, you nor anyone else here can find
me in other newsgroups anymore. When I went
underground, you and your fellow sociopaths
here, stop stalking and harrassing me. No
surprise at all; you cannot find me. Don't
think I am paying you or others any high
compliments. Anything I say about you and
your friends in this newsgroup, is less 
than complimentary.

Who is the troll Mr. Guttman? Rhetorical
question of course. You are simply one
of a myriad sociopathic trolls populating
this newsgroup concealed in guise of being
a self-proclaimed Perl Professional.

Brass tacks are painfully to the point.
There are three types of people. Those
who can read and those who cannot. You
qualify for neither of these three types.

Get my sharp oxymoronic point Mr. Guttman?

For a person of your intellectual capacity,
I would have to spend hours and go through
a gross of official No. 2 pencils drawing
pictures for you, to assist you in your
developing a vague notion of what I say
and would say to you, post haste.

This is one of those pictures, just for
you, my sociopathic stalker and harasser.

XXXXXXXXXXXXXXXXXX
X      ¸¸        X
X      ||        X
X      ||        X
X    ÖÖ||ÖÖ      X
X    \    /      X
X     |  |       X
XXXXXXXXXXXXXXXXXX


Kira


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

Date: Mon, 25 Sep 2000 16:48:43 +0800
From: Hugo Bouckaert <hugo@fractalgraphics.com.au>
Subject: attachment not in body of email 
Message-Id: <39CF116B.CEBF70B2@fractalgraphics.com.au>

Hi 

I have been trying forever now to have a perl script that sends email
with attachments not displayed in the body of the email. It just does
not want to work!! This is very frustrating. 

If anyone has a working script which is able to send information from a
form (which includes a multipart/form-data upload field) as an email
with attachments not in the body of the email, I would be most grateful
if they could send it to me. Note that the attachment is taken from a
variable, ie what I have is something like this: 

Use CGI;

Create a new CGI object: 

$query = new CGI;

Then grab the path and filename of the upload field: 

$att = $query->param('Mdata');

Later on, I use the variable $att in the code that sends the attachment: 

       $msg = new MIME::Lite
                     From    =>'info@fractalgraphics.com.au',
                     To      =>'hugo@fractalgraphics.com.au',
                     Cc      =>'hugo@fractalgraphics.com.au',
                     Subject =>'A message with 2 parts',
                     Type    =>'multipart/mixed';

attach $msg    Type    =>'TEXT',
               Data    =>"Here is the file";
attach $msg
                Type =>'image/gif',
                Path    =>$att,
                Filename    =>$att;
$msg->send;
   
This is virtually identical to what is in perldoc Lite

BUT IT DOES NOT WORK! The mail and attachment(s) are sent, but all
attachments, including the image, are in the body of the email

I also tried: 

attach $msg
                Type =>'image/gif',
                FH    =>$att;
                
But this does not work either. 

As I said, an actual working perl script would be most welcome, then I
can compare a working version with mine and see what goes wrong. I
really don't seem to get this one. 

Any help most appreciated. 

Thanks

Hugo 

-- 
Dr Hugo Bouckaert
R&D Support Engineer, Fractal Graphics 
39 Fairway, Nedlands Western Australia 6009
Tel: 9284 8442
Email:hugo@fractalgraphics.com.au
Web: http://www.fractalgraphics.com.au


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

Date: Sun, 24 Sep 2000 22:07:02 -0700
From: "Chris" <abatec@seattleu.edu>
Subject: how do I use Local Host
Message-Id: <g6Bz5.1418$LH5.387612@news.uswest.net>

Someone told me to use 'localhost' as a way to connect to a database because
the server i'm on does not have the DBI module installed.  They also
suggested that I could install the DBI module myself.  How would I do this
and where would i get it from.  I have the DBI module for windows but the
server is unix, will it work still?

Any help is very much appreciated.
Thanks,
Chris




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

Date: Sun, 24 Sep 2000 22:08:49 -0700
From: "Chris" <abatec@seattleu.edu>
Subject: how do i use localhost
Message-Id: <m6Bz5.1419$LH5.387700@news.uswest.net>

Someone told me to use 'localhost' as a way to connect to a database because
the server i'm on does not have the DBI module installed.  They also
suggested that I could install the DBI module myself.  How would I do this
and where would i get it from.  I have the DBI module for windows but the
server is unix, will it work still?

Any help is very much appreciated.
Thanks,
Chris





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

Date: Mon, 25 Sep 2000 05:12:07 -0400
From: "Milt Ginsburg" <miltginsburg@email.com>
Subject: Re: Inserting one page inside another
Message-Id: <39cf1256@post.usenet.com>

**** Post for FREE via your newsreader at post.usenet.com ****


Justin Funston <jfunston@connect.ab.ca> wrote in message
news:39cd85f9_2@skylite.connect.ab.ca...
> Maybe I was too vague, when I used the word CGI, instead of perl. And, by
> the way, I dont think anyone in the origami group would be interested.
> Thanks anyways though. In case you didn't notice, it did say this in my
> message:
> >>>>>>Or, possibly, could the CGI be edited to allow it somehow. <<<<<<
> Since, obviously, I don't know, I thought maybe I would ask. I'm sorry
your
> offended by my asking. I didn't know it would be inappropriate to ask
about
> a script in a newsgroup for these scripts.
>
> Please accept my apologies for that.
>
> Justin.
>
>
>
>
> "Alan J. Flavell" <flavell@mail.cern.ch> wrote in message
> news:Pine.GHP.4.21.0009231231550.7026-100000@hpplus03.cern.ch...
> > On Sat, 23 Sep 2000, Tim Richardson wrote:
> >
> > > > ^^ Hi everyone. What I want to do is insert one page into another.
> >
> > > > Fine, but what does that have to do with Perl?
> >
> > > I think it's a fair question.
> >
> > Yes, but not in a Perl language group, and we're just about to see
> > why.
> >
> > > What's a portable version of Unix's cat?
> >
> > Not helpful, since the rules of HTML mean that if the inserted page is
> > a valid HTML document, then the result of inserting it unmodified into
> > another is not valid.  As I say, and as Abigail said, this has nothing
> > to do with Perl.  You'd do well to pay attention to Abigail's advice,
> > even if it does tend to get offered in a somewhat cryptic fashion.
> >
> > f'ups prophylactically set.  When the original poster has worked out
> > _what_ they need to do, then _how_ to do it in Perl is trivial, but at
> > least they would then have a Perl-related question.
> >
> > Don't forget that this can be a security exposure.  Check the WWW
> > Security FAQ for details.

"Fups" Flavell manages to piss off another one. Looks like Club CIWAH is
opening a Perl branch.

fups reset so Justin knows what you did.



-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
                      http://www.usenet.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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

Date: Mon, 25 Sep 2000 05:12:59 GMT
From: milone8@my-deja.com
Subject: IO::Socket::INET Help
Message-Id: <8qmmsg$eb3$1@nnrp1.deja.com>

I am fairly new to Perl. I need to make a socket
connection to a script on another server. I have
found how to make the socket connection to the
server, but how do I send data to the actual
script? rather than just the server? It is to
process credit card numbers. I have to send the
data, form Post, to their script, and they will
send the results of whether or not it was
approved, back to me. Any help would be greatly
appreciated. Thanks.

Justin


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 25 Sep 2000 09:38:48 GMT
From: vivekvp <vivekvp@spliced.com>
Subject: Massive kill Unix and Perl
Message-Id: <8qn6f7$v1s$1@nnrp1.deja.com>

 Hello,

I have a server - and users log in with a common user name.

Sometimes I have to kill processes that are hogging to many resouces  -
I want to write a script that will do mulitple kills.  I do not want to
kill the users - just knock off the rogue process.

Let say the user name is USER the proces need to be killed is TEST


What I usually have to is do a ps -ef | grep TEST then do a kill on the
process id of TEST:


   UID   PID  PPID  C    STIME TTY       TIME COMMAND
    USER     0     0  0  Sep 23  ?         0:05 NEEDED
    USER     1     0  0  Sep 23  ?         0:03 TEST
    USER     2     0  0  Sep 23  ?         0:07 NEEDED
    USER     3     0  0  Sep 23  ?         3:10 TEST
    USER     4     0  0  Sep 23  ?         0:05 NEEDED


So I would want to kill 1 and 3 - how would I write a Perl script to do
this using Unix system commands?

Thanks!

V
--
He who fights and runs away, lives to run another day!


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 25 Sep 2000 04:13:30 GMT
From: "William A. Rowe, Jr." <wrowe@rowe-clan.you.know.why.net>
Subject: Re: MD5 Apache Password Encryption?
Message-Id: <8qmjda$k6p@dispatch.concentric.net>

My answer was in PasswdMD5.pm from CPAN

Thanks for the help, however, and hopefully someone searching deja
will find this reminder.

Bill

"William A. Rowe, Jr." <wrowe@rowe-clan.you.know.why.net> wrote in message
news:8qm0la$r46@dispatch.concentric.net...
> Ok... am I thinking of HMAC_MD5, or is there no means to encrypt Apache
> Apache server style passwords, al la crypt(), using the base perl libraries
> like digest::*?
>
> Bill
>
>
> "Francis Litterio" <franl-removethis@world.omitthis.std.com> wrote in message
> news:m3zol0z618.fsf@franl.andover.net...
> > "William A. Rowe, Jr." <wrowe@rowe-clan.you.know.why.net> writes:
> >
> > > Does anyone have an example of how to 'seed' MD5
> >
> > From the MD5 package documentation:
> >
> > The MD5 module is depreciated.  Use Digest::MD5 instead.
> >
> > > or Digest::MD5
> > > for password encryption?  crypt() is useless in this specific situation,
> > > so I must use MD5 encryption.
> >
> > You don't "seed" the MD5 algorithm.  You feed it data using either:
> >
> > Digest::MD5::add()
> > or
> > Digest::MD5::addfile()
> >
> > After giving it all the data, you fetch the hash using one of:
> >
> > Digest::MD5::digest()
> > Digest::MD5::hexdigest()
> > Digest::MD5::b64digest()
> >
> > Example:
> >
> > #!/usr/bin/perl -w
> > use strict;
> > use Digest::MD5;
> >
> > my $md5 = Digest::MD5->new();
> > $md5->add("Daisy, Daisy, give me your answer do.");
> > $md5->add("I'm half crazy over the love of you.");
> > $md5->add("It won't be a stylish marriage.");
> > $md5->add("I can't afford a carriage.");
> > $md5->add("But you'll look sweet upon the seat");
> > $md5->add("of a bicycle built for two.");
> > $md5->add("Good day, gentlemen.");
> >
> > print "The hash is: ", $md5->hexdigest(), "\n";
> >
> > Output of the above program is:
> >
> > The hash is: f33ec51da8a82bcf6f1712cb1a9f30e1
> > --
> > Francis Litterio
> > franl-removethis@world.std.omit-this.com
> > PGP public keys available on keyservers.
>
>




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

Date: Mon, 25 Sep 2000 14:33:53 +0800
From: arguo <arguo@mail.educities.edu.tw>
Subject: Multi-thread Perl with mod_perl
Message-Id: <39CEF1D1.83E3137B@mail.educities.edu.tw>

Hi, All
  Does anyone use mod_perl multi-thread perl ( ActiveSate Perl 5.6 )
base
  on Win32 platform? It always crash when I use broswer to visit the web 
  site.

arguo


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

Date: Mon, 25 Sep 2000 19:17:20 +1200
From: "fail006" <fail00@hotmail.com>
Subject: Net::Telnet module for windows version of perl
Message-Id: <8qmujt$c7s$1@news.ihug.co.nz>

Hi,
i was wondering if there Net::Telnet module for windows?

thanks allot




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

Date: Mon, 25 Sep 2000 08:21:24 GMT
From: Scott Kirk <undergronk@my-deja.com>
Subject: Re: Net::Telnet module for windows version of perl
Message-Id: <8qn1tn$qc9$1@nnrp1.deja.com>

In article <8qmujt$c7s$1@news.ihug.co.nz>,  "fail006"
<fail00@hotmail.com> wrote:

> i was wondering if there Net::Telnet module for windows?

Hmm.  I reckon you are going to get some sarcastic replies for this
question.  Why not install the module and try it?

Most modules are written in Perl, and are not platform-specific, though
there are some compatibility issues with some.

If you are using ActivePerl you will need to read about PPM.

HTH
--
Scott Kirk
My deja.com mailbox is full of spam. Use this instead:
perl -e '$_ = "znvygb: haqretebax\@lnubb.pbz";
tr/A-Za-z/N-ZA-Mn-za-m/; print;'


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 25 Sep 2000 00:19:48 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Pattern Matching Question
Message-Id: <MPG.14389c68f234d31398adbb@nntp.hpl.hp.com>

In article <7L_y5.263292$LX4.2293395@nlnews00.chello.com>, jaap@stack.nl 
says...
> Ehmm... you could try to replace the /'s by \/'s first $string = s/\//\\\/g;

That expression doesn't compile, is written with inappropriate 
delimiters, and wouldn't solve the problem even were it correct.

> Or you could play with the options for regexps, maybe the 'o' option does
> something

Or you could read the documentation for regexes yourself, which would 
tell you what the /o modifier does.

Usually answers this vacuous are signaled by overquoting the entire 
article after the response.  Here there isn't even an attribution, let 
alone a quote.  How misleading!

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


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

Date: Mon, 25 Sep 2000 16:36:34 +0800
From: Graham Daniell <gdaniell@wt.com.au>
Subject: Perl sequential number generator
Message-Id: <39CF0E92.BD42DB70@wt.com.au>

Hi,

Does anyone know where I can get sample perl code for generating a
unique number for each user that clicks on a link - to provide a
reference number for customer orders.

I am relatively new to perl, have implemented a couple of guestbooks,
hit counters etc using scripts from Matt's Script Archive, but can't
find anything to do this particular job on MSA.

Thanks,
Graham Daniell
gdaniell@wt.com.au




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

Date: Mon, 25 Sep 2000 04:19:14 GMT
From: mgjv@verbruggen.comdyn.com.au (Martien Verbruggen)
Subject: Re: problems with Net::POP3 in 5.6
Message-Id: <slrn8stkhu.m9.mgjv@verbruggen.comdyn.com.au>

On Mon, 25 Sep 2000 03:52:24 GMT,
	Alex Hart <news@#nospam#althepal.com> wrote:
> has anyone run into problems with Net::POP3 using perl5.6

Yes, apparently you have.

> I have code that works on 5.004, but not 5.6.  Any explanations??

Not without seeing the code, and the error message that you get. Maybe
you could submit a small program that exhibits the problem you are
seeing (accompanied by any error messages you get) for our perusal?

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd.   | you come to the end; then stop.
NSW, Australia                  | 


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

Date: Mon, 25 Sep 2000 00:23:42 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Question to the wise - Reading From File
Message-Id: <MPG.14389d5b338a0b8b98adbc@nntp.hpl.hp.com>

In article <6L_y5.263291$LX4.2293395@nlnews00.chello.com>, jaap@stack.nl 
says...
> replace $FILE by $_

which doubles each newline in the input file.

Some quotation of what you are responding to is appropriate, to give 
context to your response.

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


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

Date: Mon, 25 Sep 2000 08:30:51 GMT
From: dj_morri@my-deja.com
Subject: Re: Running lengthly perl scripts over cgi
Message-Id: <8qn2ft$qp1$1@nnrp1.deja.com>

In article <henry-D90B29.02081022092000@news.metropolis.net.au>,
  Henry <henry@penninkilampi.net> wrote:
> In article <8q89cl$37i$1@nnrp1.deja.com>, dj_morri@my-deja.com wrote:
>
> > I wish to run a perl script spawned via a web cgi interface.  Only
> > problem is that this script will take anything up to 15 minutes to
> > execute!!  (Don't ask!)  It's nothing untoward but it telnets into
> > around 50 hosts on our intranet and collects some info.
> >
> > Script works fine when executed locally, except the webserver
imposes a
> > timeout of around 5 mins killing the process.  I don't want to
increase
> > the webserver timeout, as generally I do NOT want perl cgi stuff
> > running for longer than 5 minutes!
>
> Is the timeout based on the age of the process, or is it based on a
lack
> of traffic?  If the latter, then you could just bleed update info
thru
> the CGI using $|=1;

Sadly the timeout is caused by the age of the process.  This is not
something I wish to increase in the webserver itself.

> Optionally, you could spawn a pile of sub-processes to telnet into
the
> local machines simultaneously, that would speed up the process
somewhat.

That sounds like an excellent solution.  Only problem is that fork() is
not implemented on Win32 NT Perl.  Is there a way to spawn other
processes under NT? (apart from amonotods neat dirmon solution).

Cheers.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 25 Sep 2000 06:59:01 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: Time Zone conversion
Message-Id: <slrn8stttl.uqj.vek@pharmnl.ohout.pharmapartners.nl>

On Sat, 23 Sep 2000 22:12:19 -0600, Michael Love <noone@nospam.com> wrote:

>I might have solved this one. I found a collection of files at
>ftp://elsie.nci.nih.gov/pub/ that have a database of all of this
>information. All I have to do is to write a module to parse through it. I'll
>let you know how it turns out.
>



These tables are litteraly used on linux, BSD, and Solaris systems for
handling timezones.

By setting TZ to continent/city you have everything set.  On other unix 
systems you need to encode the DST rules in the TZ variable itself.

MS Windows systems have DST rules and TZ tabels for every spot in the
world somewhere in the registry.



Villy


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

Date: Mon, 25 Sep 2000 09:38:19 +0200
From: Gunnar Buason <buag@sta.his.se>
Subject: Translation of perl code
Message-Id: <39CF00EB.B17B5E45@sta.his.se>

Can someone translate the following code:

use MSSQL::Sqllib;

@result = sql("SELECT * FROM sysdatabases");
foreach $row (@result) {
  foreach $kol (keys %$row) {
    print "$kol: $$row{$kol}   ";
  }
  print "\n";
} 

I am specially interested in how you read the following : $$row{$kol}

And another thing, I write that the results should be a array (@result)
but it comes out as an hash, why?

/Gunnar


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

Date: 25 Sep 2000 08:14:18 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Translation of perl code
Message-Id: <slrn8su28f.lo9.abigail@alexandra.foad.org>

Gunnar Buason (buag@sta.his.se) wrote on MMDLXXXII September MCMXCIII in
<URL:news:39CF00EB.B17B5E45@sta.his.se>:
@@ Can someone translate the following code:
@@ 
@@ use MSSQL::Sqllib;
@@ 
@@ @result = sql("SELECT * FROM sysdatabases");
@@ foreach $row (@result) {
@@   foreach $kol (keys %$row) {
@@     print "$kol: $$row{$kol}   ";
@@   }
@@   print "\n";
@@ } 
@@ 
@@ I am specially interested in how you read the following : $$row{$kol}

dollar dollar row open brace dollar kol close brace

@@ And another thing, I write that the results should be a array (@result)
@@ but it comes out as an hash, why?


No, functions don't return arrays or hashes. They return lists in list
context, and scalars in scalar context. You provide list context, so,
sql() returns a list. It's *your* choice whether to put the list in an
array or in a hash. If sql() returns a list of key/value pairs, I would
place the result in a hash. But you'd have to consult the manual.



Abigail
-- 
package Z;use overload'""'=>sub{$b++?Hacker:Another};
sub TIESCALAR{bless\my$y=>Z}sub FETCH{$a++?Perl:Just}
$,=$";my$x=tie+my$y=>Z;print$y,$x,$y,$x,"\n";#Abigail


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

Date: Mon, 25 Sep 2000 09:25:48 +0200
From: "udoline" <udo.kuehne@inatec.com>
Subject: Re: Unrecognized character \327
Message-Id: <8qmuuq$g1k6f$1@ID-25523.news.cis.dfn.de>

in *.xs file

!!!!!!!!!!!!!!!!!!!!!! f u c k i n g  "strncpy"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

my output buffer was not filled

nothing in perlstream create this message: Unrecognized character \327

it's better to use "memcpy"

udoline

> hi ,
>
> what's wrong in my code
>
> (i test my own filter more info www.cpan.org  modules : Filter-1.18)
>
> Unrecognized character \327 at test.pe line 2.
>
> thankX
> --
> udoline
>
>




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

Date: Mon, 25 Sep 2000 06:53:59 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: vertical text renderer
Message-Id: <x78zsharnh.fsf@home.sysarch.com>

>>>>> "G" == Godzilla!  <godzilla@stomp.stomp.tokyo> writes:

  G> Uri Guttman slobbers, genuflects and begs:
  >> > Godzilla! writes well over his head:
 
  >> > skills, a statement which is duality oxymoronic, your ignorance sho
  G>                                                      ^^^^^^^^^^^^^^
 
  >> you haven't addressed the above stupidity and the main issue of not
  >> answering the OP. what about that html vs. gif stuff. deal with that and
  >> nothing else first. try it for a change.

  G> ewww... worse than anything my girl ever made
  G> in her diapers. ewww... ewww...

as usual, you won't address the problem as posted. i assume because you
can't do anything other than sniff shit. oh, well, just more proof of
your trolling behavior. evading direct questions, ad hominem attacks,
repeated childish comments, low quality writing.

go away and change your girl's diapers. 

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Mon, 25 Sep 2000 09:40:37 GMT
From: pjlees@ics.forthcomingevents.gr (Philip Lees)
Subject: Re: Warning message in Win32::ODBC module
Message-Id: <39cf1bea.2597835@news.grnet.gr>

On Fri, 22 Sep 2000 13:34:17 -0400, Henry Hartley
<hartleh1@westat.com> wrote:


>Somewhere above the "foreach (@Results){" line there will be a line that
>starts with "my" and contains "$num".  I don't remember the exact
>wording, I think it was:
>
>my(@Results, $num);
>
>Replace that single line with the two lines:
>my @Results;
>my $num = 0;

Thanks for the help, Henry. That killed one of the warnings. However,
I'm still getting the warning (three times) on the line:

>>         s/ +$//; # HACK

I tried setting:

my @Results = ( '1', '2', '3' );

and various other things, but the warning won't go away. It seems that
the call to ODBCGetData is returning a hash with some null values. My
limited knowledge of regexes suggests that the problem line is trying
to remove trailing spaces from $_ and failing when $_ is null.

Anyway, as I said originally, the program works OK - it's just a bit
annoying getting those messages every time.

Phil.
--
Philip Lees
ICS-FORTH, Heraklion, Crete, Greece
Ignore coming events if you wish to send me e-mail
'The aim of high technology should be to simplify, not complicate' - Hans Christian von Baeyer


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

Date: Mon, 25 Sep 2000 08:46:35 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: Windows 98 / Active Perl / CGI
Message-Id: <slrn8su50n.5dd.tim@degree.ath.cx>

oi03_2000@my-deja.com <oi03_2000@my-deja.com> wrote:
> I'm running Windows 98, personal web server. I've
> downloaded Active perl (I'm a beginning Perl
> programmer) and installed it successfully.
> Tested couple of perl scripts from the dos window
> and they work fine.

Are you sending the Content-type string?

> Now I wrote a perl script for cgi programming to
> talk to a HTML form. I copied the script in
> inetpub\wwwroot\cgi-bin directory.  I tried to
> execute this cgi script from my html form, but
> getting a server 500 error.

A 500 server error is actually a good start with W98/PWS.  My first
guess would be to make sure you're sending the content-type header.  If
you can find the error log, check it for any more info.

> Question is what do I have to do to get this
> working?  I saw couple of answers like change
> registry or change permissions for the scripts
> but no detailed answers.

If PWS isn't just dumping the text of the script, chances are your
registry is fine.  And permissions don't apply to individual scripts on
Win98/PWS.  PWS sets virtual directory permissions, but a 500 error
means you probably have execute permissions set for the directory the
script is in.

-- 
-Tim Hammerquist <timmy@cpan.org>
Pride gets no pleasure out of having something,
only out of having more of it than the next man.
	-- C. S. Lewis


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

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


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