[10662] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4254 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 19 09:07:20 1998

Date: Thu, 19 Nov 98 06:00:18 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 19 Nov 1998     Volume: 8 Number: 4254

Today's topics:
        Any web site for learning we based perl programming. <pkarun@cisco.com>
    Re: Any web site for learning we based perl programming <perlguy@technologist.com>
    Re: Cutting down refering URL to 30 symbols? dave@mag-sol.com
    Re: HELP !Displaying images through ODBC from databases (Anita M Wilcox)
        Help with loading file into %hash? (Daniel Pray)
        How to call a cgi from html files automatically <fgrocholl@ftk.de>
    Re: How to call a cgi from html files automatically <bill@fccj.org>
    Re: How to call a cgi from html files automatically <admin@sidhe.net>
    Re: How to call a cgi from html files automatically <perlguy@technologist.com>
    Re: make ref to copy of data <jdf@pobox.com>
    Re: NT security + IIS + perl <perlguy@technologist.com>
    Re: Perl "Too Good" for UCLA's CSUA programming competi <iant@kbdnet.net.au>
        programing fun: trees: FlattenAt <xah@best.com>
    Re: reference problem <jdf@pobox.com>
    Re: reference problem <J.D.Gilbey@qmw.ac.uk>
        selective list assignment? <marty@catnmoose.com>
    Re: sendmail flags (I.J. Garlick)
    Re: sendmail flags (I.J. Garlick)
        Server Administration with Perl <admin@sidhe.net>
        shopping cart <marty@catnmoose.com>
    Re: Smarter Web Mailer <l.brocard@elsevier.nl>
    Re: Substitution Grief (I.J. Garlick)
        Syperl ct_cmd_drop() user api layer ... dgaulin@hotmail.com
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Thu, 19 Nov 1998 17:46:55 +0530
From: "Arun Kumar Padhi" <pkarun@cisco.com>
Subject: Any web site for learning we based perl programming.
Message-Id: <73121r$jdn$1@news-sj-2.cisco.com>


Thanx in advance
-Arun





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

Date: Thu, 19 Nov 1998 13:14:20 GMT
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: Any web site for learning we based perl programming.
Message-Id: <365419AC.F4D823C6@technologist.com>

http://www.perl.com
http://webreview.com

:-)
-- 
Java? I've heard of it, it is what I drink when I am hacking Perl. -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$            Brent Michalski             $
$         -- Perl Evangelist --          $
$    E-Mail: perlguy@technologist.com    $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


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

Date: Thu, 19 Nov 1998 11:51:21 GMT
From: dave@mag-sol.com
Subject: Re: Cutting down refering URL to 30 symbols?
Message-Id: <7310nm$3i7$1@nnrp1.dejanews.com>

In article <36530103.0@news.takas.lt>,
  vip@takas.lt (VYTiS) wrote:
> Hello!
>
> I have a problem when using $ENV{'HTTP_REFERER'}:
> Sometimes this URL is longer than 50 or even more symbols.
> And it messes up the page, so I'd like to ask if anyone would
> tell me how to notice when it's over 30 symbols and if it is,
> print only these first 30 symbols and "..."?
>
> Like I have:
> http://www.yahoo.com/cgi-bin/search?perl+example+or+just+anything&20
> And I need:
> http://www.yahoo.com/cgi-bin/s...

I situations like your example the bit that you're cutting off often contains
very important data which you would be truncating. One effective way I've
seen this tackled is to split the URL on the '?' and indent the rest on the
next line. This works particularly well if you're listing the same cgi script
with a number of differing parameter sets, e.g:

http://www.yahoo.com/cgi-bin/search
    ?perl+example+or+just+anything&20
    ?some+other+search&20
http://www.other.host.com/cgi/do_stuff
    ?action=wash%20the%20dishes
    ?action=feed%20the%cat
    ?action=walk%20the%20dog

hth,

Dave...

--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 19 Nov 1998 13:42:12 GMT
From: amw@world.std.com (Anita M Wilcox)
Subject: Re: HELP !Displaying images through ODBC from databases
Message-Id: <F2o8qC.JCr@world.std.com>

In article <72s9aq$cb$1@nnrp1.dejanews.com>,  <oricum@hotmail.com> wrote:
>HEllo !
>I'm trying to write a perl cgi script for displaying a image field from a
>database .I'm using Win32::ODBC from www.roth.com and Perl5 for Wni32
>I'm using a Access database with a OLE type "column" in order to store the
>image.When I fetch the data from the table , , the subroutine returns"no more
>records" even if I 'm having data in the table !!!
>sub getData
>{
>   $sql = "SELECT * FROM customer;";
>   $dsn = "sql422";
>
>  $db = new Win32::ODBC($dsn);	$db->Sql($sql);  while ($db->FetchRow()) { 
>(@picture, $name, $city , $city) = $db->Data("picture", "name" , "city"); 
>#here will come outputing the results  }  $db->close; I can't find a example
>which deals with image data type  (i've seen plenty with "normal" data types
>:characters , numbers etc;).I've downloaded examples from
>http://multiweb.lib.calpoly.edu/odbc/
>
>Any help is appreciated !
>Should I use another type of database in order to use Roth's ODBC ?
>
Well, I don't know about Access, but I had to do some funky stuff
to load/retrieve BLOB's (binary objects) from Oracle.  I ended up
writing a stored procedure for part of it.  You may have to do something
that checks the size of the field and retrieves "chunks" of it until
you have it all.  I think there is some sort of packet size limit
(or something like that) with ODBC that might restrict retrieving
large amounts of data at once.  The documentation on this type of
thing is practically nonexistent.

Anita




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

Date: Thu, 19 Nov 1998 12:26:21 GMT
From: daniel@intecomp.com (Daniel Pray)
Subject: Help with loading file into %hash?
Message-Id: <daniel-1911980428320001@usr19-dialup23.mix1.sacramento.cw.net>

I am trying to load a file that is pipe delimited into a hast, but it
doesn't seem to be working right.  I have tried many different methods as
you can see in my example.  I am using a print loop only to make sure that
the hash is full, but it doesn't print anything.  I will be loading four
similar files in the same way to be used in calculating shipping.

I've looked in books, but they don't have examples of this.  I'm not
getting the relationship between the %shipping and @SHIP and the $ship. 
Any help would be appreciated.

Thanks,

Daniel

open (SHIPDB, "$basepath$delim$shipdb1") || die "Can't open file\n";
while(<SHIPDB>){
    @shp1 = <SHIPDB>;
#    $test1{$weight1} = $rate1;
}
close(SHIPDB);
# @shp1 = keys %shipping1;
while(($weight1,$rate1)=each %shp1){
#    print "$weight1=$rate1 %shipping1\n";
#}
#    foreach $ship (@shp1) {
   @shp1 = split(/\|/,$ship);
#        print "$shp1[0] $shp1[1]\n";
    print "$weight1 $rate1\n";
    }
print "</b>\n";
if ($multiship eq 1) {
#open (SHIPDB, "$basepath$delim$shipdb2");
#close(SHIPDB);
#foreach $ship (@SHIP) {
#  my(@ship2)=split(/\|/,$ship);
#    }
#open (SHIPDB, "$basepath$delim$shipdb3");
#close(SHIPDB);
#foreach $ship (@SHIP) {
#  my(@ship3)=split(/\|/,$ship);
#    }
#open (SHIPDB, "$basepath$delim$shipdb4");
#close(SHIPDB);
#foreach $ship (@SHIP) {
#  my(@ship4)=split(/\|/,$ship);
#    }

-- 
dSoft Inc.  http://intecomp.com/dsoft/
Software Developer and FMP and 4D Developer

intecomp.com http://intecomp.com/
Computers and Peripherals


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

Date: Thu, 19 Nov 1998 12:46:59 +0100
From: Frank Grocholl <fgrocholl@ftk.de>
Subject: How to call a cgi from html files automatically
Message-Id: <36540532.78346564@ftk.de>


--------------A95727AEAE4A003886E5C0DB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello,

is it possible, to call an cgi automatically from an html-file?

Description:

I've got a cgi that generates a calender, which will be used on three
different servers.
Now I want to write an html-file with an insert-point or something like
that calls the cgi.
It should work like "Webbot" Include from Frontpage.

Could anybody help me fast???

Many thanks
Frank

mail: fgrocholl@ftk.de

--------------A95727AEAE4A003886E5C0DB
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello,
<p>is it possible, to call an cgi automatically from an html-file?
<p>Description:
<p>I've got a cgi that generates a calender, which will be used on three
different servers.
<br>Now I want to write an html-file with an insert-point or something
like that calls the cgi.
<br>It should work like "Webbot" Include from Frontpage.
<p>Could anybody help me fast???
<p>Many thanks
<br>Frank
<p>mail: <a href="mailto:fgrocholl@ftk.de">fgrocholl@ftk.de</a></html>

--------------A95727AEAE4A003886E5C0DB--



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

Date: Thu, 19 Nov 1998 07:19:37 -0500
From: Bill Jones <bill@fccj.org>
Subject: Re: How to call a cgi from html files automatically
Message-Id: <36540CD9.352C20B9@fccj.org>

Frank Grocholl wrote:
> 
> Hello,
> 
> is it possible, to call an cgi automatically from an html-file?
> 
> Description:
> 
> I've got a cgi that generates a calender, which will be used on three
> different servers.
> Now I want to write an html-file with an insert-point or something
> like that calls the cgi.
> It should work like "Webbot" Include from Frontpage.
> 
> Could anybody help me fast???
> 
> Many thanks
> Frank
> 
> mail: fgrocholl@ftk.de

PS - This is off topic, should have been posted to
either the HTML group or the CGI group.

Fast help - no, there is not way to 'automatically'
call a cgi from an HTML file.

Normal help - yes, you might be able to use something like:

HTTP-EQUIV=Refresh Content=0;URL=/cgi

OR maybe a JavaScript, something like

onMouseOver(do /cgi)

(Not real sure of the syntax, but research this
via DejaNews as I did post the correct Javascript code
to the CGI group some months ago.)

HTH,
-Sneex-


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

Date: Thu, 19 Nov 1998 13:30:06 +0100
From: Evert Smit <admin@sidhe.net>
Subject: Re: How to call a cgi from html files automatically
Message-Id: <36540F4E.2AE2792D@sidhe.net>

Yes it is. Assuming you're working on a unix based webserver, you should
use SSI(Server Side Includes) to call up CGI's automatically. the idea
is basically the same like ASP. The server parses the document before it
delivers it to you, and executes eventual commands you've put in it.

Check out http://www.sidhe.net to get an example. you'll notice on the
frontpage a small news section. it has been done with perl and miniSQL ,
using SSI to display it directly into the html file.

Read more about the works in the services part, the demo of the web news
application

Regards

Evert Smit
Unisys Switzerland

Frank Grocholl wrote:

> Hello,
>
> is it possible, to call an cgi automatically from an html-file?
>
> Description:
>
> I've got a cgi that generates a calender, which will be used on three
> different servers.
> Now I want to write an html-file with an insert-point or something
> like that calls the cgi.
> It should work like "Webbot" Include from Frontpage.
>
> Could anybody help me fast???
>
> Many thanks
> Frank
>
> mail: fgrocholl@ftk.de



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

Date: Thu, 19 Nov 1998 13:17:55 GMT
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: How to call a cgi from html files automatically
Message-Id: <36541A83.C4901EB7@technologist.com>

Frank Grocholl wrote:
> 
> Hello,
> 
> is it possible, to call an cgi automatically from an html-file?
> 
> Description:
> 
> I've got a cgi that generates a calender, which will be used on three
> different servers.
> Now I want to write an html-file with an insert-point or something
> like that calls the cgi.
> It should work like "Webbot" Include from Frontpage.
> 
> Could anybody help me fast???

Have you looked into Server Side Includes (SSI's)  Seems like and SSI
would solve this problem.

Also, If I remember correctly, an SSI must be called from the server it
runs on.  (Am I right everyone?)

If so, have a "small" SSI on each server which calls the "calendar"
program and retreives the results.  You could use the LWP modules for
this.

HTH,
Brent
-- 
Java? I've heard of it, it is what I drink when I am hacking Perl. -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$            Brent Michalski             $
$         -- Perl Evangelist --          $
$    E-Mail: perlguy@technologist.com    $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


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

Date: 19 Nov 1998 14:46:41 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: "Xah" <xah@best.com>
Subject: Re: make ref to copy of data
Message-Id: <m3n25nhk1q.fsf@joshua.panix.com>

"Xah" <xah@best.com> writes:

> The difference between "$ref = \@array" and "$ref2 = [@array]" is that
>  the former is a reference to @array, while the latter is a reference
>  to a copy of @array. The effect is that changes to @$ref will change @array,
>  but not so with @$ref2.
> 
> Am I not correct?

You are correct.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Thu, 19 Nov 1998 13:28:56 GMT
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: NT security + IIS + perl
Message-Id: <36541D18.A7BEFE59@technologist.com>

Josh,

The FAQ's at http://www.activestate.com have instructions for getting
CGI programs running on NT/IIS.

Good luck!
Brent
-- 
Java? I've heard of it, it is what I drink when I am hacking Perl. -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$            Brent Michalski             $
$         -- Perl Evangelist --          $
$    E-Mail: perlguy@technologist.com    $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


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

Date: Wed, 18 Nov 1998 23:41:53 +1100
From: Ian T <iant@kbdnet.net.au>
Subject: Re: Perl "Too Good" for UCLA's CSUA programming competition...
Message-Id: <3652C091.5D9E@kbdnet.net.au>

> Rich Morin wrote:
> 
> > >From http://www.perl.org/advocacy/chiem.html
> >
> > Perl "Too Good"
> >
> > This is a true story. Names have not been changed.
> >
> >   UCLA's Computer Science Undergraduate Association regularly hosts its
> >   programming competition.  Contestants are given six complex problems and
> >   have three hours to write programs to solve as many of the problems as
> >   possible.  In 1997, the rules stated that any programming language could
> >   be used so long as you solved the problem, so then-undergraduate Keith
> >   Chiem entered and used Perl.
> >
> >   Keith did not merely win, he conquered. He solved five of the six problems
> >   in the three hours allotted. The second-place two-person team solved only
> >   three problems.   They, needless to say, were not using Perl.
> >
> >   But if you're a UCLA undergraduate contemplating entering the contest and
> >   using Perl, don't bother.  After Keith's conquest, Perl was banned from
> >   the contest.
> >
> >   You've got to admire a language that is banned because it makes problems
> >   too easy to solve.
> >
> > These days, Keith is a sysadmin at Yahoo! Inc., and is wondering what to do
> > with the copy of Visual C++ that was his prize.

Donate it to the computing department at UCLA. They will probably give
him a plaque or something equally usefull.

------------------------------------
"Everything is in a constant state of flux, change or movement, this
process creates a vibration and these vibrations are perceived as
manifestations of light, sound and feeling."
-Hermes


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

Date: Thu, 19 Nov 1998 04:03:55 -0800
From: "Xah" <xah@best.com>
Subject: programing fun: trees: FlattenAt
Message-Id: <3654092d$0$12782@nntp1.ba.best.com>

This week's fun on programing trees: Write the function FlattenAt.
Here's the specs:

#_____ FlattenAt _____ _____ _____ _____

=pod

B<FlattenAt>

FlattenAt(tree, positionIndex) returns a modified version of given tree
where the node (subtree) at positionIndex is moved up to its
parent generation (flattened).

Related: Flatten, Sequence, xxxxx.

Example:

FlattenAt(['a', ['b']], [1]); # returns ['a', 'b'].

FlattenAt(['a', 'b'], [0]); # xxxxx returns 0 and prints "Error: position
[0] of tree has no parts and cannot be flattened".

FlattenAt([[8,['a']], [3] ], [0]); # returns [8, ['a'], [3] ]

FlattenAt([ [8, ['a']], [3] ], [0,1]); # returns [ [8, 'a'], [3] ]

=cut

For simplicity, we don't need to do input checks. That is,
assume inputs are correct. e.g. FlattenAt(['a', 'b'], [0])
would be a bad input.

This one should be simple. I'll post my solution on Saturday.
Folks, respond if you like seeing these things, because I'm beginning
to feel that there's no interest.

 Xah, xah@best.com
 http://www.best.com/~xah/PageTwo_dir/more.html
 "unix = the world's most impressive shit pile"


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

Date: 19 Nov 1998 14:52:00 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: kjones@cib.org.uk
Subject: Re: reference problem
Message-Id: <m3k90rhjsv.fsf@joshua.panix.com>

kjones@cib.org.uk writes:

> 2. How do I get the second one to output the value of $hash{test}?

perlfaq4: "How can I expand variables in text strings?"

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Thu, 19 Nov 1998 13:56:28 +0000
From: Julian Gilbey <J.D.Gilbey@qmw.ac.uk>
Subject: Re: reference problem
Message-Id: <3654238B.25587A48@qmw.ac.uk>

> But if I do the following:
> 
> $hash{test} = "Fred";
> open INF, "test.dat" or die "$!";
> $line = <INF>;
> chop $line;
> ($dummy, $name, $value) = split /\t/, $line;
> print "$value\n";
> 
> Where test.dat contains
> fred   bill    $hash{test}\n
> 
> Then I get "$hash{test}" output!
> 
> I've got two questions on this:
> 
> 1. What's going on?

Well, that's the third piece of data on the line, is it not?
Perl would be pretty bad if it automatically evaluated what
it read in from files.  How would you be able to read what
was actually written in such a case?

> 2. How do I get the second one to output the value of $hash{test}?

print eval($value),"\n";

See perlfunc(1), description of eval.

HTH,

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

            Julian Gilbey             Email: J.D.Gilbey@qmw.ac.uk
       Dept of Mathematical Sciences, Queen Mary & Westfield College,
                  Mile End Road, London E1 4NS, ENGLAND
      -*- Finger jdg@goedel.maths.qmw.ac.uk for my PGP public key. -*-


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

Date: Thu, 19 Nov 1998 08:28:54 -0500
From: Marty Landman <marty@catnmoose.com>
Subject: selective list assignment?
Message-Id: <36541D16.2512D657@catnmoose.com>

Thanks to all for your prompt and helpful replies.

--
_____ Marty Landman _______  http://www.catnmoose.com/ ______

 Living Glass           http://www.catnmoose.com/livinglass
 Mountain Man    http://www.catnmoose.com/mountainman

__________Cat 'n Moose Web Site Design & Development_________




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

Date: Thu, 19 Nov 1998 09:45:40 GMT
From: ijg@csc.liv.ac.uk (I.J. Garlick)
Subject: Re: sendmail flags
Message-Id: <F2nxs5.8Hu@csc.liv.ac.uk>

In article <19981118214732.15220.00002864@ng118.aol.com>,
theeadsnet@aol.com (TheEadsNet) writes:
> Can someone tell me how to format the sendmail command such that I can make 
> sendmail recognize Errors-To: headers.  I read the man page concerning the 
> -ol  flag, but I can't seem to get it to work.
> 
> I want to route all incoming sendmail errors to a separate e-mail address.
> 
> Thank you , in advance.
> 
> -Joe Halbrook
> 

I may have missed something here, but why go to all of the trouble of
inventing your own non-standard mail header when you could just put

	Sendmail Error:

in the subject line. Then all you would need was a regex to match that
and redirect (forward) the mail to the relevant folder.

I am no dmail expert but i always thought it was customary to start
non-standard headers with an 'X', eg X-Errors-To:

Just a suggestion.

BTW have you tried just using the -t option of sendmail?

To: someone@s.fic.cjbdkknc
From: Me
Subject: Anything you want
X-Errors-To: This is a sendmail error

A test error message (well not really :-) )


The above works from the command line, so unless the -ol flag does
something spectacular, I don't see the problem. (well it would if the
address was real)

-- 
--
Ian J. Garlick
<ijg@csc.liv.ac.uk>

Real World, The n.:
        1. In programming, those institutions at which programming may
be used in the same sentence as FORTRAN, COBOL, RPG, IBM, etc.  2. To
programmers, the location of non-programmers and activities not related
to programming.  3. A universe in which the standard dress is shirt and
tie and in which a person's working hours are defined as 9 to 5.  4.
The location of the status quo.  5. Anywhere outside a university.
"Poor fellow, he's left MIT and gone into the real world."  Used
pejoratively by those not in residence there.  In conversation, talking
of someone who has entered the real world is not unlike talking about a
deceased person.



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

Date: Thu, 19 Nov 1998 09:53:39 GMT
From: ijg@csc.liv.ac.uk (I.J. Garlick)
Subject: Re: sendmail flags
Message-Id: <F2ny5F.8z8@csc.liv.ac.uk>

In article <19981118214732.15220.00002864@ng118.aol.com>,
theeadsnet@aol.com (TheEadsNet) writes:
> Can someone tell me how to format the sendmail command such that I can make 
> sendmail recognize Errors-To: headers.  I read the man page concerning the 
> -ol  flag, but I can't seem to get it to work.
> 
> I want to route all incoming sendmail errors to a separate e-mail address.
> 
> Thank you , in advance.
> 
> -Joe Halbrook
> 
Whoops should have RTFM before I posted that last message. Sorry.

%^&*@##$$#!! news reader, wont let me cancel last post.

I will keep my mouth shut next time.

>From sendmail man page:-

Options 
      There are also a number of processing options that may be set. 
      Normally these will only be used by a system administrator.  Options 
      may be set either on the command line using the -o flag or in the
      configuration file. ..... 


      l           Pay attention to the Errors-To: header.

Again Sorry Joe.

Well you learn something new every day :-)

-- 
--
Ian J. Garlick
<ijg@csc.liv.ac.uk>



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

Date: Thu, 19 Nov 1998 13:25:14 +0100
From: Evert Smit <admin@sidhe.net>
Subject: Server Administration with Perl
Message-Id: <36540E2A.EA0BCCF9@sidhe.net>

Hello everyone,

i am looking for a solution to have a web based application, that let's
users edit their various services on a webserver. Issues like managing
the e-mail forwarder account, issues like creating new e-mail accounts
or simple things like passwort protecting their directories. Any help,
hints and tips will be greatly apprecitated.

regards

Evert Smit
Unisys Switzerland



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

Date: Thu, 19 Nov 1998 08:27:41 -0500
From: Marty Landman <marty@catnmoose.com>
Subject: shopping cart
Message-Id: <36541CCD.AEF19CB0@catnmoose.com>

Dustin Puryear <dpuryear@usa.net> wrote:

>I'm looking for a free shopping cart program that is well documented.
Any
>suggestions?

I'm in the same boat and have picked up the (free) distribution of
Commerce.cgi from http://www.dial411.com/, it's a good product imo, very
well documented (in fact I removed the comments from the main pgm when
starting to make changes because I didn't want to keep waiting for 90+K
ftp transfers)!

Curious to hear the opinion of others but personally I'm in the process
of writing my own, modelling it after commerce.cgi which in turn was
modelled after another shopping cart, info at link above.
--
_____ Marty Landman _______  http://www.catnmoose.com/ ______

 Living Glass           http://www.catnmoose.com/livinglass
 Mountain Man    http://www.catnmoose.com/mountainman

__________Cat 'n Moose Web Site Design & Development_________




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

Date: Thu, 19 Nov 1998 14:00:59 +0100
From: Leon Brocard <l.brocard@elsevier.nl>
Subject: Re: Smarter Web Mailer
Message-Id: <3654168B.1C53AFEE@elsevier.nl>

"I.J. Garlick" wrote:

> JTJ <jtjohnston@courrier.usherb.ca> writes:
> > I am playing with a Web-Based E-mailer. How do I extract a web address
> > in a block of text and replace it with a link:

> I am having a similar prob. I got this far
> 
>         s!(^|[^=])(\s*)(http://.*?)(\s+|/\W\s+)!$2<A HREF=$3>$3</A>$4!gs;

> However I suspect your just trying to improve that Web based email client
> you where crowing about earlier :-) :-)

Well, in *my* Web-based email client[1] I use

$txt =~ s|(https?://[a-z\-0-9/~._,\#=;?&]+[a-z\-0-9/_])|<a href="$1"><tt>$1</tt></a>|igm;
$txt =~ s|([^/>])(www\.[a-z\-0-9/~._,\#=;?&]+\.[a-z\-0-9/_]+)|$1<a href="http://$2"><tt>$2</tt></a>|igm;
$txt =~ s|<a href="(.+?)&gt"><tt>(.+?)&gt</tt></a>;|<a href="$1"><tt>$2</tt></a>&gt;|igm;
$txt =~ s|(ftp://[a-z\-0-9/~._,]+[a-z\-0-9/_])|<a href="$1"><tt>$1</tt></a>|igm;
$txt =~ s|([a-z\-0-9._,]+\@[a-z.]+[a-z])|<a href="mailto:$1"><tt>$1</tt></a>|igm;
$txt =~ s|([^\"])(mailto:[a-z\-0-9._,]+@[a-z\-0-9.]+[a-z\-0-9])|$1<a href="$2"><tt>$2</tt></a>|igm;

Hmm. Betcha the above strings don't wrap around properly in the post.

Anyway, the above RE should catch most things, with the added
side effect that they put the URL/MAILTO inside <TT></TT> tags.
Note that the RE's count on this, so take them out *later* if you 
don't want them.

Hope this helps, Leon

[1] No plugs included. Well, okay, it's called 'acmemail' ;-)
--
$monger{Amsterdam.pm}[0] # $laptop--


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

Date: Thu, 19 Nov 1998 09:19:58 GMT
From: ijg@csc.liv.ac.uk (I.J. Garlick)
Subject: Re: Substitution Grief
Message-Id: <F2nwLB.70u@csc.liv.ac.uk>

In article <3652A72B.1E012A6@sprynet.com>,
Balazs Rauznitz <prauz@sprynet.com> writes:
> JTJ wrote:
>> 
>> I am playing with a Web-Based E-mailer. How do I extract a web address
>> in a block of text and replace it with a link:
>> 
>> -------- Sample message ---------
>> here is the link:
>> http://somewhere.com
>> ---------------------------------
>> 
>> ---------- What I want ----------
>> here is the link:
>> <A HREF="http://somewhere.com">http://somewhere.com</A>
>> ---------------------------------
>> 
>> I would use a substitution string:
>> 
>> $message =~ s/???/???/g;
>> 
>> Something like??
>> 
>>         $message =~ s/http:\/\/\s*(\w+|$)/????/go;
>> 
>> Thanks in advance.
>> 
>> JTJ
> 
> I'd use something like this:
> $message  =~ s{(http://[\w.\/]+)}{<a href="$1">$1</a>}g;
> 
> Hope that's what you wanted:

Does some, but fails on some really easy ones.

	http://www.xxx.yyyy/script?abc=4
	<A HREF=http://www.xxx.yyyy/index.html>xxx yyyy</A>
	http://www.xxx.yyyy/~someone/

The really fun ones though involve punctuation which I must say yours does
deal with rather well if it's fairly standard.

However all of the above could appear in a mail message and are valid.

Whether you would want to change the first is open to debate as it is more
than likely it would be a CGI script. The second gives real headaches as
it's already a link :-). The third is also valid as anyone who has an account
on a machine running an apache web server can attest (probably other web
servers as well, but I only know apache).

This exact same message was posted under the subject 'Smarter Web Mailer' in
this very news group. I posted a reply to that answers some of the above but
fails on punctuation :-( Must analize yours and see if I can combine the 2
:-)


-- 
--
Ian J. Garlick
<ijg@csc.liv.ac.uk>
<postmaster@merseymail.com>

Real World, The n.:
        1. In programming, those institutions at which programming may
be used in the same sentence as FORTRAN, COBOL, RPG, IBM, etc.  2. To
programmers, the location of non-programmers and activities not related
to programming.  3. A universe in which the standard dress is shirt and
tie and in which a person's working hours are defined as 9 to 5.  4.
The location of the status quo.  5. Anywhere outside a university.
"Poor fellow, he's left MIT and gone into the real world."  Used
pejoratively by those not in residence there.  In conversation, talking
of someone who has entered the real world is not unlike talking about a
deceased person.



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

Date: Thu, 19 Nov 1998 13:13:57 GMT
From: dgaulin@hotmail.com
Subject: Syperl ct_cmd_drop() user api layer ...
Message-Id: <7315ic$76m$1@nnrp1.dejanews.com>

Hi

I using perl and Syperl under Unix to create a program that will eventually
generate a report.  I always get the error message :

Open Client Message: Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1)
NUMBER = (159) Message String: ct_cmd_drop(): user api layer: external error:
This routine can be called only if the command structure is idle.

I am a newbies in perl, I am newbies in Sybase so I really need help.  I know
that I am running perl 5.004 and that our syperl library are static whithin
perl.  But  I really have no idea what this is cause by.  I read some place
about error in open client for sybase and bug fixes but all I read about
wasn't concerning any unix stuff.

Any comments or suggestion is appreciated

Thanks

David Gaulin
dgaulin@hotmail.com

P.S. Please post and e-mail

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 4254
**************************************

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