[16031] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3443 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 21 14:10:42 2000

Date: Wed, 21 Jun 2000 11:10:30 -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: <961611029-v9-i3443@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 21 Jun 2000     Volume: 9 Number: 3443

Today's topics:
    Re: NT or Unix at runtime <gellyfish@gellyfish.com>
    Re: NT or Unix at runtime <dan@tuatha.sidhe.org>
    Re: Perl -> AT unix scheduler ? <rootbeer@redcat.com>
        perl / win32 and threads <philippe.simonet@swisscom.com>
    Re: perl / win32 and threads <dan@tuatha.sidhe.org>
    Re: perl CONSTANTS <tony_curtis32@yahoo.com>
    Re: perl CONSTANTS <W.Hielscher@mssys.com>
    Re: Perl DBI Oracle? (FactoryJS)
    Re: Perl Upgration. <rootbeer@redcat.com>
        Perl use DBI memory error christykelly@my-deja.com
        Perl, CGI, Browser differences <barrowman_99@yahoo.com>
    Re: Perl, CGI, Browser differences <flavell@mail.cern.ch>
    Re: Perl, system and Cron wmcn@my-deja.com
    Re: Print in bold to file <gellyfish@gellyfish.com>
    Re: Print in bold to file <shcorey@nortelnetworks.com>
    Re: Print in bold to file nobull@mail.com
    Re: Print in bold to file <care227@attglobal.net>
    Re: Print in bold to file <tony_curtis32@yahoo.com>
    Re: Problem with sockets <ssearle at maplesoft>
    Re: Problems with IIS (for a change) - DBD::CSV::st - m <rootbeer@redcat.com>
    Re: Problems with IIS (for a change) - DBD::CSV::st - m <jeff@vpservices.com>
        Programming questions <beefcakegt@hotmail.com>
    Re: Programming questions robb4444@my-deja.com
    Re: Programming with Perl -melting dowin name, icq into (Bart Lateur)
    Re: Proper Shopping Cart design.... eriks78@my-deja.com
    Re: Proper Shopping Cart design.... eriks78@my-deja.com
    Re: s/:(/:)/ if (@yourMind =~ m/SSL/) (Brandon Metcalf)
    Re: s/:(/:)/ if (@yourMind =~ m/SSL/) robb4444@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 21 Jun 2000 15:20:43 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: NT or Unix at runtime
Message-Id: <f3545.518$My4.49613@news.dircon.co.uk>

On Wed, 21 Jun 2000 06:28:27 PDT, Larry R. Waibel Wrote:
> In article <8io8j8$iq7$1@bcrkh13.ca.nortel.com>, Brandon Metcalf wrote:
>> Don't use the Perl distribution that comes with clearcase.  It's old and
>> incomplete.  Install your own.
>>
> But that would mean that all the client users would have to install Perl as 
> well and ClearCase.  Using what comes with it means the triggers will work 
> since it's already installed.
> 

But its patently broken.  If $^O doesnt work then waht else wont ? 

/J\


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

Date: Wed, 21 Jun 2000 17:23:26 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: NT or Unix at runtime
Message-Id: <iS645.6335$Zg4.23400@news1.rdc1.ct.home.com>

Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Wed, 21 Jun 2000 06:28:27 PDT, Larry R. Waibel Wrote:
>> In article <8io8j8$iq7$1@bcrkh13.ca.nortel.com>, Brandon Metcalf wrote:
>>> Don't use the Perl distribution that comes with clearcase.  It's old and
>>> incomplete.  Install your own.
>>>
>> But that would mean that all the client users would have to install Perl as 
>> well and ClearCase.  Using what comes with it means the triggers will work 
>> since it's already installed.
>> 

> But its patently broken.  If $^O doesnt work then waht else wont ? 

Not broken, old. Which arguably means broken, as anything old enough to
not have $^O in it likely has buffer overrun issues, but...

					Dan


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

Date: Wed, 21 Jun 2000 09:14:11 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl -> AT unix scheduler ?
Message-Id: <Pine.GSO.4.10.10006210912340.4312-100000@user2.teleport.com>

On Wed, 21 Jun 2000 fperkins@my-deja.com wrote:

> Goal:  Im trying to start a shell script via a perl script that will be
> kicked off in the browser.
> 
> Scenario:  In simpliest form, I have:
> 
> #!/usr/local/bin/perl
> 
> print "Content-type: text/html\n\n";
> $test = `at now < /local/home/admin/migrate/18.sh`;
> print "$test<br>\n";
> print "Done<br>\n";
> exit;
> 
> Problem:  The shell script, 18.sh, is never started.  

Could it be that 'at' is trying in vain to start it as user 'nobody', or
something like that? You may wish to make your program run set-id; see the
perlsec manpage. Cheers!

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



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

Date: Wed, 21 Jun 2000 18:04:25 +0200
From: "philippe simonet" <philippe.simonet@swisscom.com>
Subject: perl / win32 and threads
Message-Id: <8iqove$8k8$1@exnews.swisscom.com>

Are threads implemented with the activestate version of perl 5.6.

perl -v gives :
This is perl, v5.6.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2000, Larry Wall
Binary build 613 provided by ActiveState Tool Corp.
http://www.ActiveState.com
Built 12:36:25 Mar 24 2000

this program
my $t = new Thread \ts, ('-t1-', 15, 1);

gives as output :
No threads in this perl at D:\data\wol\th.pl line 14.

Thanks in advace

Philippe Simonet






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

Date: Wed, 21 Jun 2000 17:27:10 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: perl / win32 and threads
Message-Id: <OV645.6337$Zg4.23400@news1.rdc1.ct.home.com>

philippe simonet <philippe.simonet@swisscom.com> wrote:
> Are threads implemented with the activestate version of perl 5.6.

Nope. Activestate's not likely to ship a version of perl with threads
anytime soon, either. (Due mainly to the instability of the current
threading code) If you want threads you need to build a new perl with them
enabled.

					Dan


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

Date: 21 Jun 2000 10:06:34 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: perl CONSTANTS
Message-Id: <87lmzzrs3p.fsf@limey.hpcc.uh.edu>

>> On Wed, 21 Jun 2000 14:56:25 GMT,
>> smullen@oppunl.com (Samuel A. Mullen) said:

> Does anyone know how much if any performance degradation
> is caused by the use of perl constants via the "use
> constant <CONSTANT_NAME>" module/pragma/whatever?
> I know that there is also a way of creating constant
> variables through the use of references and typeglobs.

"constant variables"?

> Is one way preferred over another?

use Benchmark;

and you can find out...

hth
t
-- 
"Trying is the first step towards failure"
                                           Homer Simpson


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

Date: Wed, 21 Jun 2000 18:10:45 +0200
From: Wolfgang Hielscher <W.Hielscher@mssys.com>
Subject: Re: perl CONSTANTS
Message-Id: <3950E905.FF9D32E8@mssys.com>

Tony Curtis wrote:
> > I know that there is also a way of creating constant
> > variables through the use of references and typeglobs.
> 
> "constant variables"?

Probably references to constant scalars, like
   $s = \"Hello world";   $i = \12;


Cheers
	Wolfgang


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

Date: 21 Jun 2000 17:25:59 GMT
From: factoryjs@aol.com (FactoryJS)
Subject: Re: Perl DBI Oracle?
Message-Id: <20000621132559.22348.00002642@ng-cv1.aol.com>

Well, Perl is the preferred method for Perl programmers! It is in any case a
very good way to manage "unix" data in flat files. If it is an Oracle
environment you should also look at PL/SQL for extraction. We better support
from the Oracle folks (dba etc...) when we did extraction and updates in PL/SQL
but the balance of out data manipulation in Perl.

 Check into CRON for schedule issues also quite likley there will be other
scheduling software in the Unix environment. I don't know about all vendors but
Sun Unix (Solaris?) boxes will have Perl.
I too was a VB programmer when I started my first Unix job. The name for most
everthing will be different but you will find Unix is like command line WinNT
or MS-DOS. The new OReilly book is good, reads quickley and gets right to the
point. Snoop around CPAN and other resources for examples. Read Programming
Perl (also OReilly) if you get then time. Good information and more than a few
grins

Have Fun!


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

Date: Wed, 21 Jun 2000 08:52:21 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl Upgration.
Message-Id: <Pine.GSO.4.10.10006210842340.4312-100000@user2.teleport.com>

On Wed, 21 Jun 2000, Kig-Keat Yong wrote:

> I want to upgrate the perl5.002 to the perl 5.002_03 version. 

I don't think there ever was such a version number. Could you mean you
want to install 5.005_03? That sounds much wiser.

> If i directly upgrate the perl, is that any impact or whether it will
> affects the scripts running or not?

Except perhaps if you've really got some weird antique version of Perl,
the INSTALL file should have a helpful section called "Coexistence with
earlier versions of perl5". Does that answer your questions?

Cheers!

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



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

Date: Wed, 21 Jun 2000 17:27:19 GMT
From: christykelly@my-deja.com
Subject: Perl use DBI memory error
Message-Id: <8iqttn$82h$1@nnrp2.deja.com>

I am a beginner with perl running it on Windows
NT. I am trying to connect to a Microsoft Access
Database, using DBI and ODBC. I have DBI and DBD-
ODBC installed, and when i run the simple
command,
use DBI;

i am getting a fatal memory error. I know this is
really stupid, but i am running out of ideas on
what is wrong.

I would appreciate any help that i can get.



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


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

Date: Wed, 21 Jun 2000 17:01:41 +0100
From: "Phil" <barrowman_99@yahoo.com>
Subject: Perl, CGI, Browser differences
Message-Id: <8iqot4$e7$1@bignews.shef.ac.uk>

Can anyone tell me why a simple script that outputs html can work OK with
IExplorer but with Netscape the text appears underlined?  No matter what
<Font> tags I try.
Thanks

p.s. viewing the HTML source of the output page does not indicate any reason
why it should be underlined




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

Date: Wed, 21 Jun 2000 19:11:08 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Perl, CGI, Browser differences
Message-Id: <Pine.GHP.4.21.0006211909200.6396-100000@hpplus03.cern.ch>

On Wed, 21 Jun 2000, Phil wrote:

> Can anyone tell me why a simple script that outputs html can work OK with
> IExplorer but with Netscape the text appears underlined?

Yes, but you don't have a Perl language question.

Post the URL of the offending item to the HTML authoring group.

> p.s. viewing the HTML source of the output page does not indicate any reason
> why it should be underlined

With respect, I'd say let us be the best judges of that.  You're the
one who doesn't yet understand the problem, after all.




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

Date: Wed, 21 Jun 2000 15:26:52 GMT
From: wmcn@my-deja.com
Subject: Re: Perl, system and Cron
Message-Id: <8iqmr4$a38$1@nnrp1.deja.com>

In article <B559363B.509D%elaine@chaos.wustl.edu>,
  Elaine Ashton <elaine@chaos.wustl.edu> wrote:
> in article 8h05lf$9p7$1@news.tuwien.ac.at, e8825393 at
> e8825393@stud2.tuwien.ac.at quoth:
>
> > thanx john - the problem is, that not I am opening a file but linux
does on
> > entering the quota-command to modify the quota.
> > And the user-wrights-problem - if the script is started by cron from
user
> > root - does'nt it have the same rights as root ?
>
> wrights? Orville and Wilbur or something else...? Look, if you want to
> modify quotas you are going to have to run it out of roots crontab or
have
> it suid root. I would highly recommend reading some of the
documentation for
> cron and the perlvar pod. While I gather that your native language is
not
> English, you can certainly find Unix documentation in a language near
if not
> in your native language. In system V you might know that there is an
> /etc/defualt/cron which even allows you to set the default path and
other

If your going to be pretentious to a newbie, you may as well type
in your assistance correctly so you don't confuse more.
That would be /etc/default/cron and don't mind that bag, we all knew
what you meant.

> behaviour....if you are root.
>
> e.
>
>


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


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

Date: Wed, 21 Jun 2000 16:02:55 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Print in bold to file
Message-Id: <PG545.522$My4.49626@news.dircon.co.uk>

On Wed, 21 Jun 2000 14:23:27 GMT, fperkins@my-deja.com Wrote:
> 
>> 	I have a question: Is there any way to write to file, a text
> file,
>> a bold text, like in HTML the command <B>???
>> 	I'm with a work to do that some words need to be printed in
> bold.
>> 	Somebody told me that there is a command like that \n, to a new
>> line, but I don't discovered which command it is!!!
>> 	So, if someone knows anything about it, please reply me!!!
>> 	[]'s
>>
> 
> Use this snippet and go crazy with it:
> 
> #!/usr/local/bin/perl
> 
> print "Content-type: text/html\n\n";
> print "This isnt bold<br>\n";
> print "<b>and this is</b><br>\n";
> exit;
> 
> \n just means put it on a new line.
> 

Except the OP was not asking about HTML.

/J\


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

Date: Wed, 21 Jun 2000 13:05:02 -0400
From: Shawn Corey <shcorey@nortelnetworks.com>
Subject: Re: Print in bold to file
Message-Id: <3950F5BE.6AF2C2A5@nortelnetworks.com>

Hi,

#!/bin/perl
$bold_text = "test";

$bold_text =~ s/(.)/$1\b$1/g;
print "This is a $bold_text.\n";

__END__

Use the backspace character to print each character twice. This may not
work on all printers.


Igor Campos Leal wrote:
> 
>         Hello all!!
>         I have a question: Is there any way to write to file, a text file,
> a bold text, like in HTML the command <B>???
>         I'm with a work to do that some words need to be printed in bold.
>         Somebody told me that there is a command like that \n, to a new
> line, but I don't discovered which command it is!!!
>         So, if someone knows anything about it, please reply me!!!
>         []'s


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

Date: 21 Jun 2000 18:11:08 +0100
From: nobull@mail.com
Subject: Re: Print in bold to file
Message-Id: <u9ya3z558z.fsf@wcl-l.bham.ac.uk>

Igor Campos Leal <igorleal@dcc.ufmg.br> writes:

> 	I have a question: Is there any way to write to file, a text file,
> a bold text, like in HTML the command <B>???

The answer is, obviously, tautologically "yes".  That is if by "a text
file" you include text/html and text/rtf formats.  If by text you mean
text/plain then the answer is, obviously, tautologically "no".

Except... actually by historic accident there _is_ a way to represent
bold and underline in plain text files.

print "This is b\bbo\bol\bld\bd.\n";
print "This is _\bu_\bn_\bd_\be_\br_\bl_\bi_\bn_\be_\bd.\n";

This only really works if you are printing to an old-fashoined
teletype.  A few other methods of viewing the file will also render
this correctly.

Arguably a file containing this trick can no longer be considered
plain text. 

To see this as bold or underlined on a terminal you'd need to run the
text through the Unix "colcrt" program which converts this
representation into the appropriate escape sequences for your
terminal.

Of course none of this has anything whatever to do with Perl.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Wed, 21 Jun 2000 13:36:57 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Print in bold to file
Message-Id: <3950FD39.380A1900@attglobal.net>

Igor Campos Leal wrote:
> 
>         Hello all!!
>         I have a question: Is there any way to write to file, a text file,
> a bold text, like in HTML the command <B>???
>         I'm with a work to do that some words need to be printed in bold.
>         Somebody told me that there is a command like that \n, to a new
> line, but I don't discovered which command it is!!!
>         So, if someone knows anything about it, please reply me!!!
>         []'s

If you are on a system with troff or one of its relatives, you 
could add the proper formatting markups so that the output would
be bold (or italicised, or whatever).  

on a UNIX system, type 

$ man troff

And then see _what_ the markups are.  Adding them via a Perl script
should be easy enough.  (probably easier to add them via ex thou. shh)


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

Date: 21 Jun 2000 12:44:11 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Print in bold to file
Message-Id: <87hfanrkt0.fsf@limey.hpcc.uh.edu>

>> On Wed, 21 Jun 2000 13:36:57 -0400,
>> Drew Simonis <care227@attglobal.net> said:

> Igor Campos Leal wrote:
>>  Hello all!!  I have a question: Is there any way to
>> write to file, a text file, a bold text, like in HTML
>> the command <B>???  I'm with a work to do that some
>> words need to be printed in bold.  Somebody told me
>> that there is a command like that \n, to a new line,
>> but I don't discovered which command it is!!!  So, if
>> someone knows anything about it, please reply me!!!
>> []'s

> If you are on a system with troff or one of its
> relatives, you could add the proper formatting markups
> so that the output would be bold (or italicised, or
> whatever).

Putting *roff markup into a file has the same effect as
putting HTML in there.  The OP appears to have a mistaken
notion of what HTML is and how the various tags like <b>
do what they do in browsers capable of displaying bold
text.

<b> in and of itself doesn't make text appear bold, you
need interpretation for that.  And of course, "bold" has
many different interpretations depending on the semantics
of the output device.

But getting wildly off-topic for clpm.

-- 
"Trying is the first step towards failure"
                                           Homer Simpson


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

Date: Wed, 21 Jun 2000 12:40:09 -0400
From: "Scott Searle" <ssearle at maplesoft>
Subject: Re: Problem with sockets
Message-Id: <3950f003@vega>

Buffered I/O sounds like the problem.  Have a look at $|

    -S

<fgont@my-deja.com> wrote in message news:8ipq00$kib$1@nnrp1.deja.com...
> Hi!
>
> I've made some cliente/server applications using perl, and have found the
> following problem:
>
> If I send some data from the client to the server, and this data does not
end
> with a newline (\n), the server can't get it.
>
> That means, suppose I have a NSOCK socket at the client, and I make a:
>
> print NSOCK "Hello, World!";
>
> Well, the server will not get this data (actually, the data is *really*
sent,
> but when I try to read() it, I don't anything).
>
> But if I make a:
>
> print NSOCK "Hello, World!\n";
> # Please note that it contains a newline
>
> This data IS GOT by the server (that means, if I try to read() it at the
> server, I get it)
>
>
> And I made another test: I tried to send a fairly "big" amount of data
(say
> 2000 bytes) to a tcp server. And whether the string had a newline or not,
the
> client got the data.
>
>
> It seems that you can only read() the data if it's finished by a newline
> (\n), or if it's a "big" amount of data.
>
>
> I say that the data is really sent (and that the problem should be at the
> program that tries to read it), as I used tcpdump, to see the packets that
go
> through my Network card...  (anyway, I tested it with the loopbak, and it
> didn't work, either)
>
> I tried to use while(<SOCKET>) and recv() to get the data, but the problem
> continues.
>
> I made the same program using C language, and the problem does not appear.
So
> that I don't know if Perl configures some option of the sockets so that
they
> behave like this, or what...
>
>
> Here's a tcp server with which you can test what I'm explaining. (If you
want
> the tcp client, feel free to ask it to me...)
>
>
> ----- cut here -----
> #!/usr/local/bin/perl
> ##############################################################
> # TCP server
> ##############################################################
> $port= 2345;
>
> $AF_INET=2;
> $SOCK_STREAM=1;
> $sockaddr = 'S n a4 x8';
>
> ($name, $aliases, $proto) = getprotobyname('tcp');
>
> print "Port = $port\n";
>
> $this = pack($sockaddr, $AF_INET, $port, "\0\0\0\0");
> socket(S, $AF_INET, $SOCK_STREAM, $proto) || die "socket: $!";
> bind(S, $this) || die "bind: $!";
> listen(S, 1) || die "connect: $!";
>
> print "Listening for connection....\n";
>
> ($addr = accept(NS, S)) || die $!;
> print "accept ok\n";
>
> ($af, $port, $inaddr) = unpack($sockaddr, $addr);
> @inaddr = unpack ('C4', $inaddr);
> $ip = "@inaddr[0].@inaddr[1].@inaddr[2].@inaddr[3]";
> print "$af $port @inaddr\n";
>
>
> for( ; ;){
> read(NS, $entrada, 1);
> print $entrada;
> }
>
> close(NS);
>
> ----- cut here -----
>
>
> Best regards,
>
> Fernando Ariel Gont
> e-mail: fgont [at] softhome [dot] net
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.




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

Date: Wed, 21 Jun 2000 08:32:07 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Problems with IIS (for a change) - DBD::CSV::st - more info
Message-Id: <Pine.GSO.4.10.10006210827470.4312-100000@user2.teleport.com>

On Wed, 21 Jun 2000, Guy Fraser wrote:

> I've traced the problem so far to this bit of code:
> 
>     if ($file !~ /^$open_table_re/o) {
>  $file = $haveFileSpec ?
>      File::Spec->catfile($data->{Database}->{'f_dir'}, $table)
>   : $data->{Database}->{'f_dir'} . "/$table";
>     }
> 
> The command that is generating the gibberish is:
> 
> File::Spec->catfile($data->{Database}->{'f_dir'}, $table)
> 
> Before this, the value for $file is "c:/Inetpub/wwwroot/cgi-bin/glossary"
> but after this command it gets turned in to
> "C:\Inetpub\wwwroot\cgi-bin\glossary\c:/Inetpub/wwwroot/cgi-bin/glossary".
> I've still not been able to find a reference doc for catfile so don't know
> what exatly this command is trying to do yet...

It's portably assembling the parts of a filename. Generally, that's a
directory name (...'f_dir'?) and a filename ($table?). It looks as if one
or both of those items is already a full filename. Oops!

Good luck with it!

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



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

Date: Wed, 21 Jun 2000 09:44:17 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Problems with IIS (for a change) - DBD::CSV::st - more info
Message-Id: <3950F0E1.A1BB4AED@vpservices.com>

Guy Fraser wrote:
> 
> Hi.
> 
> More info on problem below...
> 
> I've traced the problem so far to this bit of code:
> 
>     if ($file !~ /^$open_table_re/o) {
>  $file = $haveFileSpec ?
>      File::Spec->catfile($data->{Database}->{'f_dir'}, $table)
>   : $data->{Database}->{'f_dir'} . "/$table";
>     }
> 
> The command that is generating the gibberish is:
> 
> File::Spec->catfile($data->{Database}->{'f_dir'}, $table)
> 
> Before this, the value for $file is "c:/Inetpub/wwwroot/cgi-bin/glossary"
> but after this command it gets turned in to
> "C:\Inetpub\wwwroot\cgi-bin\glossary\c:/Inetpub/wwwroot/cgi-bin/glossary".

f_dir should be the directory path to where you store files.

filename should *not* be an absolute path like you have it, since f_dir
will get appended on front of it.

-- 
Jeff


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

Date: Wed, 21 Jun 2000 16:42:03 GMT
From: Steve Lee <beefcakegt@hotmail.com>
Subject: Programming questions
Message-Id: <8iqr8n$dpc$1@nnrp1.deja.com>

Hi all,

Clueless Perl newbie here (but loving and learning the language!), and
I want to know if the following is possible?  I've browsed through
countless manpages and module documentation, but just can't figure it
out.  Oh, and my apologies if this isn't the appropriate forum; I'm not
sure where to turn to..

Without further ado:

I want to write a script that will send e-mail to a specific e-mail
address, and have the results returned to different (reply-to) e-mail
addresses.  I would also like the script to notify me when those
specific e-mail clients receive e-mail.

TIA for any and all help!
Steve


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


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

Date: Wed, 21 Jun 2000 17:11:56 GMT
From: robb4444@my-deja.com
Subject: Re: Programming questions
Message-Id: <8iqt0c$f6i$1@nnrp1.deja.com>

There's a good intro book called 'Perl by Example'.
In it, you will find an introduction to sockets. There's an (incomplete)
example of a program that uses SMTP mail service to send mail. Although
it is incomplete, its a good start.

Robb

In article <8iqr8n$dpc$1@nnrp1.deja.com>,
  Steve Lee <beefcakegt@hotmail.com> wrote:
> Hi all,
>
> Clueless Perl newbie here (but loving and learning the language!), and
> I want to know if the following is possible?  I've browsed through
> countless manpages and module documentation, but just can't figure it
> out.  Oh, and my apologies if this isn't the appropriate forum; I'm
not
> sure where to turn to..
>
> Without further ado:
>
> I want to write a script that will send e-mail to a specific e-mail
> address, and have the results returned to different (reply-to) e-mail
> addresses.  I would also like the script to notify me when those
> specific e-mail clients receive e-mail.
>
> TIA for any and all help!
> Steve
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


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


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

Date: Wed, 21 Jun 2000 16:59:33 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Programming with Perl -melting dowin name, icq into a template and password to access directory
Message-Id: <3952f237.1383066@news.skynet.be>

karen wrote:

>I. 1. name card program for kids that can have a choice of 50 (pictures)
>for examples;
>2. email the name card to kids
>3. edit the name card  with field name, address, phone, ( icq)
>4. edit the background of the card
>
>Questions:
>
>1. How to create template in HTML and so that kids can fill in point #3 in
>the background picture ?
>2. How to melt down the point # 3  into a a picture.

It sounds to me like you want allow people (kids) to select a background
picture, enter some text, and you generating a picture file, with that
original picture as the background, and the text as the foreground.

Both GD and Image::Magick support this, I think. I've not done it
myself. From what I've read, I expect a lot better quality from
Image::Magick, because the font control in GD is basically quite crude.
You get a choice between 4 bitmap fonts, and that's it. Or, it should
support TTF.

Image::Magick will allow you to produce real professional quality
images, i.e. anti-aliased text and finetunable control of the font. The
function to put text on top of a pictue is "annotate", IIRC.

>3. How to write a perl to control access of designate directory. Where can
>store the password so the logic is: if the password is correct then kids can
>access the specified directory.

Ooh, that is a totally unrelated matter. You porbably want to use
 .htaccess if the server is Apache or related. You can add users, even
using perl, to the .htpasswd file, by this simple perl code:

	open HTPWD, ">>.htpasswd";
	print HTPWD, "$user:" . crypt($pwd, $salt) . "\n";

Where:
	$user = user name
	$pwd  = password in plain text
	$salt = two letter string (randomly picked)

One Win32, the passwords are not encrypted.

-- 
	Bart.


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

Date: Wed, 21 Jun 2000 17:35:11 GMT
From: eriks78@my-deja.com
Subject: Re: Proper Shopping Cart design....
Message-Id: <8iqucf$ge1$1@nnrp1.deja.com>

the reason i posted the origonal message in the comp.lang.perl.misc
group was because i am required, by a client and my boss, to code from
scrath, in perl, a shopping cart.  kind of a pain an why i can't use a
pre existing one is not for me to decide.  they made the decision after
i presented them with may other programs and analysis.

anyway, to the point.  the architecture question is because this app
has to be cross platform (*NIX, WIN, MAC).  perl is a prime choice for
this, since java was voted down by everybody except me.  being the
case, i was hoping that since there are numerous carts writen in perl,
that an author might be able to give an informed opinion of which style
was best.

to the person who brought up minivend, minivend is a great program, but
1)it's overkill for right now, 2) because of it's coding and the
behavior of the UNIX fork() command, it would take a while to make it
compatable for each OS, so it elmininates that option.

realistically, we hope to have a VERY high throughput of consumers on
the system at one time.  this is why i am concerned about file locking,
threads diing, server crashes (IIS), and general mayhem.  it is also
why i was looking at sessions passed via html pages and using db's on
seperate machines to handle the locking.

any other help or opinions?


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


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

Date: Wed, 21 Jun 2000 17:53:59 GMT
From: eriks78@my-deja.com
Subject: Re: Proper Shopping Cart design....
Message-Id: <8iqvfd$hav$1@nnrp1.deja.com>


> We have designed a frame shopping cart,
> and a window shopping cart.
> if interested, please visit
> http//www.gboworld.com/index.html
>
> It is easy to use and design.
> One of our customers has a site
> http://intercomp.com.au/e-bellingen
> You may like to visit it also.
>
> Our shopping cart should be in a different
> type which is not listed in your list.

thanks for the link, i took the time and looked at your cart and your
code.  origonal, i'll give you that, but unfortunately, it's not at all
what i need.  the entire cart mechanism appears to be done in
javascript with cgi at the very end.  the cart i have to make has to be
written in perl.  javascripts are like cookies, if the user is scared
of them or disables them because they don't know what they are/do or
some "computer guru" told them to, 1) you lose a sale, 2) you can't
collect info, 3) you're stuck.  by disabling javascript or using an old
browser, wouldn't your cart fail?

sorry to be harsh, but as a cart system, there are lots of holes in
this one.


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


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

Date: 21 Jun 2000 15:10:07 GMT
From: bmetcalf@baynetworks.com (Brandon Metcalf)
Subject: Re: s/:(/:)/ if (@yourMind =~ m/SSL/)
Message-Id: <8iqlsf$btl$1@bcrkh13.ca.nortel.com>

robb4444@my-deja.com writes:

 > Perl:  s/:(/:)/ if (@yourMind =~ m/SSL/)
 > English: it will really turn my frown upside down if any here knows...
 >          how to retrieve the Certificate headers from an HTTP response.

No it won't ...

s/:\(/:\)/  will ...

Brandon


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

Date: Wed, 21 Jun 2000 17:15:03 GMT
From: robb4444@my-deja.com
Subject: Re: s/:(/:)/ if (@yourMind =~ m/SSL/)
Message-Id: <8iqt65$feo$1@nnrp1.deja.com>

Thanks

In article <8iqlsf$btl$1@bcrkh13.ca.nortel.com>,
  bmetcalf@baynetworks.com wrote:
> robb4444@my-deja.com writes:
>
>  > Perl:  s/:(/:)/ if (@yourMind =~ m/SSL/)
>  > English: it will really turn my frown upside down if any here
knows...
>  >          how to retrieve the Certificate headers from an HTTP
response.
>
> No it won't ...
>
> s/:\(/:\)/  will ...
>
> Brandon
>


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


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

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


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