[18002] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 162 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 28 18:05:34 2001

Date: Sun, 28 Jan 2001 15:05:09 -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: <980723108-v10-i162@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 28 Jan 2001     Volume: 10 Number: 162

Today's topics:
    Re: 'apply' function in perl? <brannon@lnc.usc.edu>
    Re: Calling rsync with "system" does not work (Otto Wyss)
    Re: Calling rsync with "system" does not work (Otto Wyss)
    Re: Calling rsync with "system" does not work <uri@sysarch.com>
        CGI.pm (Paul Delahunta)
    Re: CGI.pm (Paul Delahunta)
    Re: CGI.pm <joe+usenet@sunstarsys.com>
    Re: CGI.pm <flavell@mail.cern.ch>
    Re: dbi.pm (Joe Smith)
        Grafik erstellen <Stefan.Graf@t-online.de>
        How to make Perl wait (Jimtaylor5)
    Re: How to pass $vars to a script from within another s <creafin1998@yahoo.com>
        How to send a file ... Steve50@zxmail.com
    Re: How to send a file ... bits101010@my-deja.com
    Re: How to send a file ... steve50@zxmail.com
    Re: How to send a file ... bits101010@my-deja.com
        How to send contents of html file in email? <creafin1998@yahoo.com>
    Re: How to send contents of html file in email? <creafin1998@yahoo.com>
    Re: How to send contents of html file in email? <peter.sundstrom@eds.com>
    Re: mod_perl Perl: tigra@sky.deep.ru
    Re: MUA in perl? (John Doe)
    Re: Perl is bad at (very) simple math! <monty@primenet.com>
        Perl on 98 <a.pieters@chello.nl>
        Perl with Windows98 <a.pietersspam@chello.nl>
    Re: Text:CSV can't handle german characters tigra@sky.deep.ru
    Re: Text:CSV can't handle german characters <marc.beck@bigfoot.com>
        uploading files roof2211@my-deja.com
        Wanted: Conversion from decimal Unicode values to UTF-8 xpuc@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 28 Jan 2001 20:13:16 GMT
From: Terrence Brannon <brannon@lnc.usc.edu>
Subject: Re: 'apply' function in perl?
Message-Id: <lblmrvo2p0.fsf@lnc.usc.edu>

abigail@foad.org (Abigail) writes:

> -- : Maybe there is a way to do it w/o this fuction, but i haven't figured
> -- : out how... basically what i'm trying to do is something like this:
> -- : 

> Alternatively:
> 
>        my $sum = do {local $" = "+"; eval "@nums"};
> 
> And extended to averages, that gives:
> 
>        my $avg = do {local $" = "+"; eval "@nums" / @nums};

Too bad we can't frame this and hang it in a museum somewhere... as a
matter of fact, I think I will try to have it framed.

-- 
Terrence Brannon 
Carter's Compass:
 I know I'm on the right track when by deleting code I'm adding functionality.


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

Date: Sun, 28 Jan 2001 22:45:10 +0100
From: otto.wyss@bluewin.ch (Otto Wyss)
Subject: Re: Calling rsync with "system" does not work
Message-Id: <1enyttx.1ajc16rcst6ieN%otto.wyss@bluewin.ch>

> > From the answers it seems it's not possible to use a piping solution. Is
> > there nobody who could give me a confirmation or give me any clue?
> 
> That depends more on rsync. If rsync can take those pieces of
> information from stdin, then yes, it is possible. To find out how, read
> perlipc, perlopen, and maybe the entry on open() in perlfunc.
> 
> But I honestly don't see why that would make anything any better, or
> easier.
> 
I'd like to minimize the download time (or better the processing time in
between) for downloading a Debian mirror based on the Packages file. If
you would live in Europe where you most of the time have to pay for any
online minute, you would appreciate such a behaviour.

> PS. This is the end of this thread for me.

Martien, it was a plesure to discuss with you and I'm very pleased you
helped so much. I now have enough input to work further on my scripts.

Otti

PS. Just for the curious ones, have a look at 
        "http://www.problemlos.ch/otto/mirrorcheck.gz" (3k)
        "http://www.problemlos.ch/otto/mirrorsynch.gz" (3k)
These links will be valid for about another week and keep in mind the
scripts are still not finished.


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

Date: Sun, 28 Jan 2001 23:35:35 +0100
From: otto.wyss@bluewin.ch (Otto Wyss)
Subject: Re: Calling rsync with "system" does not work
Message-Id: <1enyvys.mep0nnln7kcgN%otto.wyss@bluewin.ch>

>   OW> on this. To avoid this trap in my scripts I'm already trying to use a
>   OW> syntax without whitespace between option and parameter. 
> 
> you just won't listen. PROGRAMS EXPECT ARGUMENTS TO ALREADY BE WHITE
> SPACE SPLIT BY THE SHELL OR CALLING PROGRAM!!!!!
> 
> it is not a trap, it is the way ALL UNIX PROGRAMS WORK!! 
> 
> if it were your way, HOW COULD A PROGRAM TELL THE DIFFERENCE BETWEEN
> 
>       foo "-x bar"
> 
> and
>       foo -x bar
> 
> IS THAT ONE OR TWO ARGUMENTS TO foo?
> 
Okay this is exactly it. I as a human with a little brain in the head,
enough to be able to read man pages, can easyally tell it. Machines
without carefully design programs can't. So it's better to avoid
anything which leads to a likely missunderstanding between man and
machine. In my scripts for options with requiered parameters I enforce
"-option=parameter", hoping the human unterstands that I don't accept
whitespace befor and after the "=".

Since this isn't anymore related to perl I won't discuss this any
further.

O. Wyss


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

Date: Sun, 28 Jan 2001 22:40:49 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Calling rsync with "system" does not work
Message-Id: <x7zogbs3ke.fsf@home.sysarch.com>

>>>>> "OW" == Otto Wyss <otto.wyss@bluewin.ch> writes:

  OW> Okay this is exactly it. I as a human with a little brain in the head,
  OW> enough to be able to read man pages, can easyally tell it. Machines
  OW> without carefully design programs can't. So it's better to avoid
  OW> anything which leads to a likely missunderstanding between man and
  OW> machine. In my scripts for options with requiered parameters I enforce
  OW> "-option=parameter", hoping the human unterstands that I don't accept
  OW> whitespace befor and after the "=".

that is fine as long as you document it. it is also harder to write an
arg parser for that. and even then, you may need to pass in a value with
blanks in it. so you still have to worry about quoting, white space
splitting and proper use of exec. there is no way around the way exec
calls a program. it is the only way to pass in args to a new process. so
you might as well understand it instead of fighting it. perl uses exec
but it can do the white space split for you. so you might as well learn
what perl does with exec and system. if you want to call programs you
didn't write from perl using system/exec, you have to understand they
expect their arguments already white space split. how YOU would want to
see the arguments doesn't mean anything to rsync.

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: Sun, 28 Jan 2001 21:22:06 GMT
From: mustbe@pdelahunta.cjb.com (Paul Delahunta)
Subject: CGI.pm
Message-Id: <3a748ad3.3673190@news.planet.nl>

Hi,
I have a form wich's method = POST and action= "../form.pl?number=714"
I want to retrieve  both the POSTed parameters and the 'number'
parameter using CGI.
Is there a way to do this?

Kind regards,
Paul Delahunta


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

Date: Sun, 28 Jan 2001 21:33:48 GMT
From: mustbe@pdelahunta.cjb.com (Paul Delahunta)
Subject: Re: CGI.pm
Message-Id: <3a749004.5002227@news.planet.nl>

On Sun, 28 Jan 2001 21:22:06 GMT, mustbe@pdelahunta.cjb.com (Paul
Delahunta) wrote in message <3a748ad3.3673190@news.planet.nl>:

>Hi,
>I have a form wich's method = POST and action= "../form.pl?number=714"
>I want to retrieve  both the POSTed parameters and the 'number'
>parameter using CGI.

I meant CGI.pm here. Sorry for the inconvenience :-)


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

Date: 28 Jan 2001 16:55:22 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: CGI.pm
Message-Id: <m3hf2jbaut.fsf@mumonkan.sunstarsys.com>

mustbe@pdelahunta.cjb.com (Paul Delahunta) writes:

> On Sun, 28 Jan 2001 21:22:06 GMT, mustbe@pdelahunta.cjb.com (Paul
> Delahunta) wrote in message <3a748ad3.3673190@news.planet.nl>:
> 
> >Hi,
> >I have a form wich's method = POST and action= "../form.pl?number=714"
> >I want to retrieve  both the POSTed parameters and the 'number'
> >parameter using CGI.
> 
> I meant CGI.pm here. Sorry for the inconvenience :-)

For parsing the query string instead of POST data, look for the 
url_param function in 

% man CGI

IIRC, mjd answered this question no more than one week ago.

-- 
Joe Schaefer



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

Date: Sun, 28 Jan 2001 23:41:25 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: CGI.pm
Message-Id: <Pine.LNX.4.30.0101282332310.8580-100000@lxplus003.cern.ch>

On Sun, 28 Jan 2001, Paul Delahunta wrote:

> I have a form wich's method = POST and action= "../form.pl?number=714"
> I want to retrieve  both the POSTed parameters and the 'number'
> parameter using CGI.
> Is there a way to do this?

Is there documentation distributed with CGI.pm which explains
how to do that?

Yes, there is: when I look at the results of "perldoc CGI" it says

  It is possible for a script to receive CGI parameters in the URL as well as
  in the fill-out form by creating a form that POSTs to a URL containing a
  query string (a "?" mark followed by arguments).

and goes on to explain what to do.  I'm sure the author's HTML
documentation (which is actually preferable to use) says much the
same.

Please, do locate the documentation for the modules you are using,
and take a look at them before appealing to the worldwide resources of
usenet.  If that doesn't help, then have a quick look to see the
previous answer to the same question (it's quite recent, in fact)
before deciding to post.

You might want to keep in mind though that there is no guarantee that
this slightly anomalous usage will be supported in all WWW software.
You might consider redesigning things to that it doesn't rely on
having to use this feature.


By the way, dear regulars, this would be more on-topic on
c.l.p.modules, surely?

ttfn



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

Date: 28 Jan 2001 20:16:48 GMT
From: inwap@best.com (Joe Smith)
Subject: Re: dbi.pm
Message-Id: <951ung$1a7h$1@nntp1.ba.best.com>

In article <3A7325A4.CD694624@courrier.usherb.ca>,
jtjohnston  <jtjohnston@courrier.usherb.ca> wrote:
>Where can I find/download the dbi.pm?
>Can't locate dbi.pm in @INC (@INC contains:...)
>
>an e-mail would be helpful,

unix% perl -le 'use dbi'
Can't locate dbi.pm in @INC (@INC contains: ...)
BEGIN failed--compilation aborted at -e line 1.
unix% perl -le 'use DBI'
unix% 

Uppercase is significant.
	-Joe
--
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.


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

Date: Sun, 28 Jan 2001 20:05:16 +0100
From: "Stefan Graf" <Stefan.Graf@t-online.de>
Subject: Grafik erstellen
Message-Id: <951qgv$s4s$06$1@news.t-online.com>

Hallo,
ich möchte aus einer MySQL Datenbank per Perl  mittels den Module GD und
Chart eine Grafik erstellen.
Leider gelingt es mir nicht die Grafik zu erreugen. Was mache ich falsch.

Mein  Perl Programm sieht wie folgt aus:
#!/usr/bin/perl -w
use strict;
use db_lib;
use Chart::LinesPoints;
my $diagr = Chart::LinesPoints->new(600,600);
my @achse;
my @data1;
my $db="wetterstation";
my $q="SELECT temperatur FROM messwerte_csv where datum = '2001-01-02'";
my $dbh=connect_db($db);
my $sth=query_result($q,$dbh);
my $text = $sth;
$text =~ s/,/\./g;
# Datensaetze einlesen
$text =~ m/Mit Nahrungsaufnahmen(.*?)$/s;
@data1 = $1 =~ /(\d+.\d*)/g;
# x-Achsenticks berechnen
for (my $loop=0; $loop <= $#data1; $loop++) {
   push(@achse, ($loop));
   }
$diagr->set('title' => 'test stefan');
$diagr->set('y_label' => 'Y-Lybel');
$diagr->set('x_label' => 'Zeit [min]');
$diagr->set('legend_labels' => ['temperatur']);
$diagr->add_dataset(@achse);
$diagr->add_dataset(@data1);
$diagr->png("test.png");

Danke für eure Hilfe
Stefan




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

Date: 28 Jan 2001 21:27:37 GMT
From: jimtaylor5@aol.com (Jimtaylor5)
Subject: How to make Perl wait
Message-Id: <20010128162737.16317.00001537@ng-cn1.aol.com>

I've written a perl program which writes out a form with certain options, and I
want to force everyone to answert the question within "say 60 seconds." Where,
if not, my perl program would write to a file and go to another page. The part
I am having problems with is having perl wait. Does anyone know of an effective
way to do this? I tried sleep(60); at the end of the printout. That waited
alright, but it didn't allow any html to be printed to screen until after the
60 seconds. Of course then the program writes to file and goes on to the next
page. Can anytone help me with this PLEASE! 


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

Date: Sun, 28 Jan 2001 19:46:24 GMT
From: "creafin1998" <creafin1998@yahoo.com>
Subject: Re: How to pass $vars to a script from within another script and e-mail results to a group.
Message-Id: <01c08963$53d96e60$48c249d8@rjuliano>

Tina,

Could you give an example or 2, please?  I'd like to see one using lwp. 
This is a little advanced for me.  I wasn't able to get what I needed from
the perldocs.

thank you.



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

Date: 28 Jan 2001 18:58:01 -0000
From: Steve50@zxmail.com
Subject: How to send a file ...
Message-Id: <1UUY75UO36919.8319560185@frog.nyarlatheotep.org>

After a script has created a file on the server, I would like to email it
automatically to one mail address.

How can I do ? (I am a newbie :-)

Thanks !
Steve




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

Date: Sun, 28 Jan 2001 19:30:30 GMT
From: bits101010@my-deja.com
Subject: Re: How to send a file ...
Message-Id: <951s0m$6ak$1@nnrp1.deja.com>

Steve,

In Unix, do:
$file = '/path/to/file';
`cat $file | mail -s "Sub: $file" you@dot.com`;

Winston.

In article <1UUY75UO36919.8319560185@frog.nyarlatheotep.org>,
  Steve50@zxmail.com wrote:
> After a script has created a file on the server, I would like to
email it
> automatically to one mail address.
>
> How can I do ? (I am a newbie :-)
>
> Thanks !
> Steve
>
>


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


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

Date: 28 Jan 2001 21:33:51 -0000
From: steve50@zxmail.com
Subject: Re: How to send a file ...
Message-Id: <N97N30KI36919.9401736111@frog.nyarlatheotep.org>


Winston,

Thanks !

It works .. byt I always get an empty file.

Maybe it comes from the fact that this file is created by :

script [params]  >file.log

And this is this file.log I want send by email

I put the command `cat $file | mail -s "Sub: $file" you@dot.com`; Just
before the script ends (The next line is just '1')
Maybe it sends the file BEFORE the file is closed ?

How can I fix this ?


Thanks,

Steve


On Sun, 28 Jan 2001, bits101010@my-deja.com wrote:
>Steve,
>
>In Unix, do:
>$file = '/path/to/file';
>`cat $file | mail -s "Sub: $file" you@dot.com`;
>
>Winston.
>
>In article <1UUY75UO36919.8319560185@frog.nyarlatheotep.org>,
>  Steve50@zxmail.com wrote:
>> After a script has created a file on the server, I would like to
>email it
>> automatically to one mail address.
>>
>> How can I do ? (I am a newbie :-)
>>
>> Thanks !
>> Steve
>>
>>
>
>
>Sent via Deja.com
>http://www.deja.com/





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

Date: Sun, 28 Jan 2001 22:53:01 GMT
From: bits101010@my-deja.com
Subject: Re: How to send a file ...
Message-Id: <9527sa$fui$1@nnrp1.deja.com>

Steve,

Before you execute the cat/mail command, make sure you modify the
variable $file to reflect the real path to the file and the file name,
such as:
$file = '/home/steve/file.log';
`cat $file | mail -s "Sub: $file" you@dot.com`;

If you still get empty file in your email, make sure you open up
file.log directly and see if it's really empty  :)

Winston.

In article <N97N30KI36919.9401736111@frog.nyarlatheotep.org>,
  steve50@zxmail.com wrote:
>
> Winston,
>
> Thanks !
>
> It works .. byt I always get an empty file.
>
> Maybe it comes from the fact that this file is created by :
>
> script [params]  >file.log
>
> And this is this file.log I want send by email
>
> I put the command `cat $file | mail -s "Sub: $file" you@dot.com`; Just
> before the script ends (The next line is just '1')
> Maybe it sends the file BEFORE the file is closed ?
>
> How can I fix this ?
>
> Thanks,
>
> Steve
>
> On Sun, 28 Jan 2001, bits101010@my-deja.com wrote:
> >Steve,
> >
> >In Unix, do:
> >$file = '/path/to/file';
> >`cat $file | mail -s "Sub: $file" you@dot.com`;
> >
> >Winston.
> >
> >In article <1UUY75UO36919.8319560185@frog.nyarlatheotep.org>,
> >  Steve50@zxmail.com wrote:
> >> After a script has created a file on the server, I would like to
> >email it
> >> automatically to one mail address.
> >>
> >> How can I do ? (I am a newbie :-)
> >>
> >> Thanks !
> >> Steve
> >>
> >>
> >
> >
> >Sent via Deja.com
> >http://www.deja.com/
>
>


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


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

Date: Sun, 28 Jan 2001 20:07:12 GMT
From: "creafin1998" <creafin1998@yahoo.com>
Subject: How to send contents of html file in email?
Message-Id: <01c08966$444de900$48c249d8@rjuliano>

Under unix I use the following perl code.

`$prog | mail $group`;

The e-mail function works fine, only the display is in text, not html from
yahoo mail.

How do I get it to send the mail and tell yahoo mail that it's html?

Thanks.


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

Date: Sun, 28 Jan 2001 21:25:28 GMT
From: "creafin1998" <creafin1998@yahoo.com>
Subject: Re: How to send contents of html file in email?
Message-Id: <01c08971$319daa60$48c249d8@rjuliano>

I may have found a resource and answer my own question.  For those of you
interested, check out the free script here: 
http://www.zdnet.com/devhead/stories/articles/0,4413,2587501,00.html

Thanks.



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

Date: Mon, 29 Jan 2001 10:17:51 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: How to send contents of html file in email?
Message-Id: <95229v$ron$1@hermes.nz.eds.com>


"creafin1998" <creafin1998@yahoo.com> wrote in message
news:01c08966$444de900$48c249d8@rjuliano...
> Under unix I use the following perl code.
>
> `$prog | mail $group`;
>
> The e-mail function works fine, only the display is in text, not html from
> yahoo mail.
>
> How do I get it to send the mail and tell yahoo mail that it's html?

http://search.cpan.org/search?mode=module&query=MIME%3A%3ALite




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

Date: Sun, 28 Jan 2001 21:19:26 GMT
From: tigra@sky.deep.ru
Subject: Re: mod_perl Perl:
Message-Id: <9522co$bhd$1@nnrp1.deja.com>

In article <951n2o$2dt$1@nnrp1.deja.com>,
  Rob <a565a87@my-deja.com> wrote:
> I'm a real neophyte at Perl, and I got involved in it because I want
to
> experiment with Apache against OLE.
>
> Please correct my if I'm wrong (and I'm paraphrasing wildly here):
>
> 1.  It is my understanding that mod_perl lends a complete, native Perl
> API to Apache, making Apache higher performance than if conventional
> CGI scripting is used.  Is this the case?

Yes. And not only higher performance but also some kind of new
understanding how to create sites.

> 2.  Does mod_perl really in fact simply encapsulate whatever existing
> installation of perl that I have on my machine.  E.g., if what I
> currently use for perl is CPAN 5.6.0, does my mod_perl .DLL build just
> take that CPAN 5.6.0 installation that currently suffices for my perl
> environment and make that available, in-process, to Apache?  (Or is my
> mod_perl build some kind of a completely separate perl from that of my
> preexisting 5.6.0?  It's a really stupid question, but I just wanted
> some kind of confirmation.)

Yes, again.

More information on modperl can be found at perl.apache.org. But (IMHO)
the best documentation which covers the subject is the book 'Writing
Apache Modules with C and Perl'. You can find it at O'Reillys site
(www.ora.com)

Sergey

PS. If you are a real neophyte studying mod_perl tricks may turn to be a
headache. Perhaps, it's better to start up from plain CGI scripting.


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


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

Date: 28 Jan 2001 21:05:26 GMT
From: gt4556a@acmez.gatech.edu (John Doe)
Subject: Re: MUA in perl?
Message-Id: <slrn9792cm.edg.gt4556a@acmez.gatech.edu>

On Tue, 16 Jan 2001 10:46:13 -0500, mine <ball@merck.com> wrote:

>Does anyone know of a mail user agent in perl perl/tk?

Though it's written using Perl/Gtk and not Perl/Tk, you might be interested in
PMC (the Perl Mail Client):

http://www.irs-net.com/
-- 
Jörg Ziefle


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

Date: 28 Jan 2001 21:03:16 GMT
From: Jim Monty <monty@primenet.com>
Subject: Re: Perl is bad at (very) simple math!
Message-Id: <9521ek$lgb$1@nnrp2.phx.gblx.net>

jw_c@my-deja.com wrote:
> Michael Stopp <stopp@eye.ch> wrote:
> > Can anybody explain why a perl script as simple as this can fail?
> >
> > $a = 5.1;
> > $b = 5;
> > print $a-$b, "\n";
> >
> > This produces:
> >
> > 0.0999999999999996
>
> Horrors!
>
> > I tested this on a Linux box (Perl 5.005_02, Kernel 2.0.35) and
> > a Windows machine (Active Perl 5.005_03, Win98): same result.
> > Can this be true?!? What can one do about this?
>
> One can:
>
> 1. Read the Perl FAQ
> 2. Do a Deja/Google/AltaVista search on "floating point error"
> 3. Read the paper "What Every Computer Scientist Should Know About
>    Floating Point Math" that's hidden somewhere on most Suns
>         (or used to be).
> 4. Write the program you show in C, C++, Java, FORTRAN, etc.
> 4a. Run said program.
> 4b. Ponder the results.

I always enjoy using Microsoft Excel to demonstrate decimal
imprecision on binary digital computers:

    http://www.primenet.com/~monty/excel.jpg

This always rocks the world of Windows "gurus" and Excel "experts"!

-- 
Jim Monty
monty@primenet.com
Tempe, Arizona USA


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

Date: Sun, 28 Jan 2001 21:59:06 GMT
From: Anton Pieters <a.pieters@chello.nl>
Subject: Perl on 98
Message-Id: <3A7496EE.CC24E059@chello.nl>

I seem to have a problem running Perl on windows 98. As soon as I start
a CGI-script it bursts out in a DOS window and closes again. I have got
WPS installed and running. I just can't get it going. Is there someone
who can help me with this?

ANton



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

Date: Sun, 28 Jan 2001 21:53:05 GMT
From: "Appie" <a.pietersspam@chello.nl>
Subject: Perl with Windows98
Message-Id: <5x0d6.982660$%C1.12691639@Flipper>

I've tried to run cgi-scripts on my machine. I have got Perl installed. I
have got PWS installed. The only thing that happens is that I get a DOS
screen where the script runs and then the DOS screen closes again. There
must be something basicly wrong. I can not figure it out. Is there someone
who can help me?

ANton




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

Date: Sun, 28 Jan 2001 21:26:22 GMT
From: tigra@sky.deep.ru
Subject: Re: Text:CSV can't handle german characters
Message-Id: <9522pn$bnl$1@nnrp1.deja.com>

In article <951pia$fk82h$1@ID-23826.news.dfncis.de>,
  "Marc Beck" <marc.beck@bigfoot.com> wrote:
> > Hmm. BTW, what do you really want do do with these strings after
> > putting them into DB?
>
> The CSV file is generated by Outlook 2000 containing the calendar
> entries.
> I upload it via a perl-script to my sql-database.
> I then run a perl script via cron that queries the database for
> today's
> appointments and then reminds me via SMS on my mobile.
>
> You would say: Why isn't he using DBD::CSV?
> Just because I want to use MySQL :)
>

I don't know whether 8-bit chars are transferred as-is to mobiles via
SMS. If this is the case then it's better to have 8-bit mode enabled,
otherwise coping with transliteration to latin1 is probably the best
solution.

Sergey


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


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

Date: Sun, 28 Jan 2001 23:08:59 +0100
From: "Marc Beck" <marc.beck@bigfoot.com>
Subject: Re: Text:CSV can't handle german characters
Message-Id: <95259n$flh2v$1@ID-23826.news.dfncis.de>

> I don't know whether 8-bit chars are transferred as-is to mobiles via
> SMS. If this is the case then it's better to have 8-bit mode enabled,
> otherwise coping with transliteration to latin1 is probably the best
> solution.
> 
It works fine ... no problem with german service providers!

cu Marc



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

Date: Sun, 28 Jan 2001 19:01:42 GMT
From: roof2211@my-deja.com
Subject: uploading files
Message-Id: <951qai$4t9$1@nnrp1.deja.com>

hello,

I am having trouble getting all the info from a form on an html page to
upload a file to actually upload. Two of the three input fields get
sent fine, but 'user' does not. It always has a blank value.

Here is the form:
--------------------------------------------
<form ENCTYPE="multipart/form-data" action="upload.pl" method="post">
<input type="hidden" name="user" value="webmaster">
File: <input type="file" name="filename" size="20">
File Name:<input type="text" name="name" size="20">
<input type="Submit" value="Upload">
</form>
--------------------------------------------



Here is the first part of my .pl file:

-------------------------------------------
#!/usr/bin/perl

use CGI qw/:standard/;

#use CGI::Carp qw/fatalsToBrowser/;
$| = 1;

$limit= 100;

@ext= qw(jpg gif bmp htm html doc xls asp jsp php zip pl pdf);

$encoding='multipart/form-data';
$match=0;
$CGI::POST_MAX=1024 * $limit;
$q = new CGI;


#$user2 =~ /\w:[\\[\w- ]*\\]*([\w- ]*.\w{1,3})$/g;$use=$1;

$user = $q->param('user');
$filename = $q->param('filename');
$name = $q->param('name');
--------------------------------------


After this part, the code is fine except the $user variable is equal
to "" and not what the value is. I have tried it with using other names
for it and different types, and still no luck. I can't think of why
this doesn't work.

Please help.

Ian



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


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

Date: Sun, 28 Jan 2001 20:52:29 GMT
From: xpuc@my-deja.com
Subject: Wanted: Conversion from decimal Unicode values to UTF-8
Message-Id: <9520qb$a6q$1@nnrp1.deja.com>

Hi all,

I'm looking for a Perl routine that converts
characters given in decimal Unicode values (as in
HTML entities: &#372; &#1062; etc.) to UTF-8.

(I need to convert such entities in the text of
web pages to utf-8 to pass the text to a search
function)

Can anyone help me?

Thanks,
Christoph


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 V10 Issue 162
**************************************


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