[17161] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4573 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 10 18:10:49 2000

Date: Tue, 10 Oct 2000 15:10:22 -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: <971215822-v9-i4573@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 10 Oct 2000     Volume: 9 Number: 4573

Today's topics:
    Re: Newbie ,so sorry if im posting in the wrong place. <markmccarthy1@home.com>
    Re: Newbie ,so sorry if im posting in the wrong place. <madmanz123@hotmail.com>
    Re: Perl Books! <russ_jones@rac.ray.com>
    Re: Perl Books! <lmoran@wtsg.com>
    Re: Perl Books! (Craig Berry)
    Re: perl resource <jondecamp@home.com>
    Re: perl resource (Mark-Jason Dominus)
    Re: Perl with Apache - Several questions for you <Jonathan.L.Ericson@jpl.nasa.gov>
    Re: Perl with Apache - Several questions for you rbfitzpa@my-deja.com
        PIRATE CD'S pirate@ntlworld.com
        Printing HTML form using CGI.pl <g.soper@soundhouse.co.uk>
    Re: Printing HTML form using CGI.pl <tony_curtis32@yahoo.com>
    Re: Printing HTML form using CGI.pl <sterling@designmultimedia.com>
    Re: Printing HTML form using CGI.pl <jeff@vpservices.com>
    Re: Printing HTML form using CGI.pl <jeffp@crusoe.net>
    Re: Printing HTML form using CGI.pl <sterling@designmultimedia.com>
    Re: Printing HTML form using CGI.pl <flavell@mail.cern.ch>
    Re: Printing HTML form using CGI.pl <flavell@mail.cern.ch>
    Re: Printing HTML form using CGI.pl <jeff@vpservices.com>
        Problem with duplicate entries in database <michael.segulja@sgi-lsi.com>
    Re: Problems with Mail::Folder and cgi <linux@wizdom.org.uk>
    Re: re-start problem (Gwyn Judd)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 10 Oct 2000 20:27:55 GMT
From: "Mark McCarthy" <markmccarthy1@home.com>
Subject: Re: Newbie ,so sorry if im posting in the wrong place.
Message-Id: <fZKE5.24944$3_4.314692@news1.rdc1.sdca.home.com>

> Below is a sample of the code paypal generates.
> ######################################
> <!-- Begin PayPal Logo -->
> <A
>
HREF="https://secure.paypal.x.com/xclick/business=jamesb%40optonline.net&ite
>
m_name=Stuffimselling&item_number=0004&amount=24.00&shipping=5.00&return=htt
> p%3A//www.mystore.com" target="_blank"><IMG
> SRC="http://images.paypal.com/images/x-click-but5.gif" BORDER="0"
ALT="Make
> payments with PayPal - it's fast, free and secure!"></A>
> <!-- End PayPal Logo -->
>
Just stuff the above in a 'required' file. The parts that need changing,
like amount=24.00, replace by ##amount## say. In your script that generates
the checkout page use a regex:

$line=~s/##(\w+)##/$1=$amount_customer_owes/g;

It should re-create the above using the generated values.

Hope this points you in the right direction. Good luck with it.

Mark McCarthy




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

Date: Tue, 10 Oct 2000 21:17:30 GMT
From: "madman" <madmanz123@hotmail.com>
Subject: Re: Newbie ,so sorry if im posting in the wrong place.
Message-Id: <KHLE5.91040$4d.12698840@news02.optonline.net>

I'm on chapter 3 now, whoohoo, Thank you for that lead, will follow up as
soon as I know what I am doing.

MUCH appreciated oh perl gods ;)

Madman




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

Date: Tue, 10 Oct 2000 13:00:45 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Perl Books!
Message-Id: <39E3594D.8BC33E53@rac.ray.com>

YMEY wrote:
> 
  (much self-serving sophistry snipped)

>       ...Only when and if someone goes there to make a
> copy for them self's, then they are in violation... Not me!

Violation schmiolation. Copyright law aside, you're still stealing
someone else's work. You didn't write these books, they're not yours
to give away. Justify it however you want, you're still a crawling
thief and you are beneath contempt.

-- 
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747

Quae narravi, nullo modo negabo. - Catullus


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

Date: Tue, 10 Oct 2000 17:02:36 -0400
From: Lou Moran <lmoran@wtsg.com>
Subject: Re: Perl Books!
Message-Id: <7q07uscekcjfqacfs42leg002pe83e40lp@4ax.com>

---Snip--
>Violation schmiolation. Copyright law aside, you're still stealing
>someone else's work. You didn't write these books, they're not yours
>to give away. Justify it however you want, you're still a crawling
>thief and you are beneath contempt.

You shouldn't hold this sort of stuff in, you need to emote, say
what's on your mind.

 :)



"Well that it explains everything fish-bulb"
lmoran@wtsg.com
Registered Linux user number 187055


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

Date: Tue, 10 Oct 2000 21:30:24 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl Books!
Message-Id: <su72jgeqjiik78@corp.supernews.com>

Al (nospamapgraham@ispchannel.com---) wrote:
: 1) If I leave a book on my desk and someone else picks it up and
: copies it, an I guilty of copywrite violation?

I don't typically do spelling-correction posts, but this one is
increasingly pervasive, and using the correct spelling actually adds to
the understanding of the issue.

It's 'copyright' -- the right to make copies -- not 'copywrite' --
presumably the writing of a copy.

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "Quidquid latine dictum sit, altum viditur."
   |


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

Date: Tue, 10 Oct 2000 19:04:14 GMT
From: Jon DeCamp <jondecamp@home.com>
Subject: Re: perl resource
Message-Id: <39E36925.DF185458@home.com>

Not yet.

brian d foy wrote:

> In article <39E3440B.9EBB521A@home.com>, Jon DeCamp
> <jondecamp@home.com> wrote:
>
> > Not to offend the perl-ism in this newgroup, but why write code when there are
> > tools that do this for you already?
> >
> > sort <textfile> | uniq
>
> not everyone is using a flavor of Unix.
>
> --
> brian d foy
> Perl Mongers <URL:http://www.perl.org>
> CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>



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

Date: Tue, 10 Oct 2000 22:04:28 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: perl resource
Message-Id: <39e3926b.9c1$35@news.op.net>
Keywords: Rumania, anthem, complaint, sulfa

In article <brian+usenet-661D2B.13585710102000@news.panix.com>,
brian d foy  <brian+usenet@smithrenaud.com> wrote:
>In article <39E3440B.9EBB521A@home.com>, Jon DeCamp 
><jondecamp@home.com> wrote:
>> sort <textfile> | uniq
>
>not everyone is using a flavor of Unix.

But Tom Christiansen's Perl Power Tools site has Perl implementations
of both sort and uniq.


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

Date: Tue, 10 Oct 2000 12:34:18 -0700
From: Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov>
Subject: Re: Perl with Apache - Several questions for you
Message-Id: <39E36F3A.86C5F723@jpl.nasa.gov>

thundaar54@my-deja.com wrote:
> I have a form that the web user will fill out, click the submit button,
> and then execute my script.  The script is designed to search a MS
> Access database and then return the results.  However, when I click on
> the button, the server just returns the text of my code, nothing else.

Chances are good that you have mis-configured your server.  In any case,
this is very likely _not_ a perl problem.  Try asking over at
comp.infosystems.www.servers.ms-windows.

Jon
-- 
Knowledge is that which remains when what is
learned is forgotten. - Mr. King


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

Date: Tue, 10 Oct 2000 21:27:39 GMT
From: rbfitzpa@my-deja.com
Subject: Re: Perl with Apache - Several questions for you
Message-Id: <8s01k2$qnq$1@nnrp1.deja.com>

1. You need to configure your 'cgi-bin' directory in
~apache/conf/http.conf file.

2. You need to set the content-type propery in the beggining of your
script. Try running your script on the command line and capture the
output, it should be identical to an HTML page - if theres no
'content-type: text/html' at the top it might display as a text file.



In article <8rsu1q$847$1@nnrp1.deja.com>,
  thundaar54@my-deja.com wrote:
> Greetings all.
>
> Bear with me as I'm a newbie to perl and apache but I'm learning!
>
> I'm running Apache 1.3.12 for Windows, running it on a Windows NT
> server.  I am also running ActiveState Perl, latest build of perl.
> Here's the nuff:
>
> I have a form that the web user will fill out, click the submit
button,
> and then execute my script.  The script is designed to search a MS
> Access database and then return the results.  However, when I click on
> the button, the server just returns the text of my code, nothing else.
>
> I've made sure that the first line of my code is the path to my
> perl.exe, double-checked the ODBC driver for the database and that is
> correct.  I think that I have the httpd.conf file for the server
> correct but am unsure.  Any thoughts or should I just give up and have
> a beer?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


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


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

Date: Tuesday, 10 Oct 2000 21:45:00 -0600
From: pirate@ntlworld.com
Subject: PIRATE CD'S
Message-Id: <10100021.4500@ntlworld.com>

====================
PIRATE CD'S :
====================

++++++++++++++++++++
http://piratediscs.8m.com
++++++++++++++++++++


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

Date: Tue, 10 Oct 2000 19:11:49 +0100
From: Geoff Soper <g.soper@soundhouse.co.uk>
Subject: Printing HTML form using CGI.pl
Message-Id: <4a0b694faag.soper@soundhouse.co.uk>

I've been using the O'Reilly Learning Perl book and wanted to create an
HTML form. In the book the elements are printed in the fashion:

print header; # prints an HTML header

I need more element types than the book covers so I went to the CGI.pm
documentation to discover more. Here they are called in the following
fashion:

print $query->header; # prints an HTML header

I gather this is something to do with object orientated programming? I
know nothing of object-orientated and don't really want to just yet! Is it
OK to carry on formatting things as in the first example?

Many thanks

-- 
Geoff Soper
g.soper@soundhouse.co.uk
Take a look at the Soundhouse page http://www.soundhouse.co.uk/


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

Date: 10 Oct 2000 13:23:27 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Printing HTML form using CGI.pl
Message-Id: <874s2kpnc0.fsf@limey.hpcc.uh.edu>

>> On Tue, 10 Oct 2000 19:11:49 +0100,
>> Geoff Soper <g.soper@soundhouse.co.uk> said:

> I've been using the O'Reilly Learning Perl book and
> wanted to create an HTML form. In the book the elements
> are printed in the fashion:

It's called CGI.pm not .pl by the way.
                ^^

> print header; # prints an HTML header

> I need more element types than the book covers so I went
> to the CGI.pm documentation to discover more. Here they
> are called in the following fashion:

> print $query->header; # prints an HTML header

> I gather this is something to do with object orientated
> programming? I know nothing of object-orientated and
> don't really want to just yet! Is it OK to carry on
> formatting things as in the first example?

If you need to create more than one CGI object, then use
the object-oriented style.  Usually I'd guess you don't,
so you can stick with the function-oriented style.
Or whichever you happen to prefer (TMTOWTDI).

hth
t
-- 
Namaste!
And an "oogabooga" to you too!
                                         -- Homer Simpson


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

Date: Tue, 10 Oct 2000 18:26:01 GMT
From: "Sterling Hughes" <sterling@designmultimedia.com>
Subject: Re: Printing HTML form using CGI.pl
Message-Id: <ZaJE5.5684$mC.384527@monger.newsread.com>


> I've been using the O'Reilly Learning Perl book and wanted to create an
> HTML form. In the book the elements are printed in the fashion:
>
> print header; # prints an HTML header
>
> I need more element types than the book covers so I went to the CGI.pm
> documentation to discover more. Here they are called in the following
> fashion:
>
> print $query->header; # prints an HTML header
>
> I gather this is something to do with object orientated programming? I
> know nothing of object-orientated and don't really want to just yet! Is it
> OK to carry on formatting things as in the first example?
>

For the most part yes, as long as you export the :standard option you should be
ok, also take a look at the PROGRAMMING STYLE and HOW TO IMPORT FUNCTIONS
sections of the CGI documentation.

Good Luck,

Sterling Hughes
sterling@designmultimedia.com:




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

Date: Tue, 10 Oct 2000 11:23:55 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Printing HTML form using CGI.pl
Message-Id: <39E35EBB.E7A7FA76@vpservices.com>

Geoff Soper wrote:
> 
> I've been using the O'Reilly Learning Perl book and wanted to create an
> HTML form. In the book the elements are printed in the fashion:
> 
> print header; # prints an HTML header
> 
> I need more element types than the book covers so I went to the CGI.pm
> documentation to discover more. Here they are called in the following
> fashion:
> 
> print $query->header; # prints an HTML header
> 
> I gather this is something to do with object orientated programming? I
> know nothing of object-orientated and don't really want to just yet!

Other than putting in some pretty arrows -> there is not much to the
object style in CGI.pm.

> Is it
> OK to carry on formatting things as in the first example?

Yes, most things can be done with either style, see the section of the
documentation called 
"using the function oriented interface".

-- 
Jeff


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

Date: Tue, 10 Oct 2000 14:42:35 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Printing HTML form using CGI.pl
Message-Id: <Pine.GSO.4.21.0010101434550.14163-100000@crusoe.crusoe.net>

On Oct 10, Tony Curtis said:

>> Geoff Soper <g.soper@soundhouse.co.uk> said:
>> print header; # prints an HTML header
>> print $query->header; # prints an HTML header
>
>If you need to create more than one CGI object, then use
>the object-oriented style.  Usually I'd guess you don't,
>so you can stick with the function-oriented style.
>Or whichever you happen to prefer (TMTOWTDI).

I prefer the non-kludging-up-your-namespace style.   Witness:

jeffp@friday [2:41pm] scratch #1562> perl report CGI
Before CGI: 29 symbols
  Scalars: 11; Arrays: 3; Hashes: 6; Functions: 1

After CGI: 46 symbols
  Scalars: 17; Arrays: 3; Hashes: 14; Functions: 1

jeffp@friday [2:41pm] scratch #1563> perl report CGI '":standard"'
Before CGI ":standard": 29 symbols
  Scalars: 11; Arrays: 3; Hashes: 6; Functions: 1

After CGI ":standard": 183 symbols
  Scalars: 17; Arrays: 3; Hashes: 14; Functions: 138

-- 
Jeff "japhy" Pinyan     japhy@pobox.com     http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine            http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc.    http://www.perlarchive.com/
CPAN - #1 Perl Resource  (my id:  PINYAN)        http://search.cpan.org/





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

Date: Tue, 10 Oct 2000 19:12:24 GMT
From: "Sterling Hughes" <sterling@designmultimedia.com>
Subject: Re: Printing HTML form using CGI.pl
Message-Id: <sSJE5.5692$mC.385032@monger.newsread.com>


> >> Geoff Soper <g.soper@soundhouse.co.uk> said:
> >> print header; # prints an HTML header
> >> print $query->header; # prints an HTML header
> >
> >If you need to create more than one CGI object, then use
> >the object-oriented style.  Usually I'd guess you don't,
> >so you can stick with the function-oriented style.
> >Or whichever you happen to prefer (TMTOWTDI).
>
> I prefer the non-kludging-up-your-namespace style.   Witness:
>
> jeffp@friday [2:41pm] scratch #1562> perl report CGI
> Before CGI: 29 symbols
>   Scalars: 11; Arrays: 3; Hashes: 6; Functions: 1
>
> After CGI: 46 symbols
>   Scalars: 17; Arrays: 3; Hashes: 14; Functions: 1
>
> jeffp@friday [2:41pm] scratch #1563> perl report CGI '":standard"'
> Before CGI ":standard": 29 symbols
>   Scalars: 11; Arrays: 3; Hashes: 6; Functions: 1
>
> After CGI ":standard": 183 symbols
>   Scalars: 17; Arrays: 3; Hashes: 14; Functions: 138
>

While its true that using the :standard option will kludge up your ns a bit, it
does have a large readability increase (not to mention less programming time)
when you are generating large amounts of HTML, compare:

use CGI;
use strict;

my $q = new CGI;

print $q->header, $q->start_html,
       $q->h1("Simple HTML Generation"), $q->br,
       "If OO CGI.pm is messy for this small amount of HTML ",
       "Imagine what happens with larger sections of code....",
       $q->end_html;


to:

use CGI qw(:standard);
use strict;

print header, start_html,
       h1("Simply HTML Generation"), br,
       "See how much nicer the function-oriented style is, ",
       "not at all as yucky as the OO interface!",
       end_html;


And as scripts get larger, the readability using the OO interface only
decreases...


-Sterling

--
Sterling Hughes
sterling@designmultimedia.com
"Politics is for the moment, an equation is for eternity" -Albert Einstein




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

Date: Tue, 10 Oct 2000 21:28:55 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Printing HTML form using CGI.pl
Message-Id: <Pine.GHP.4.21.0010102110410.21331-100000@hpplus03.cern.ch>

On Tue, 10 Oct 2000, Geoff Soper wrote:

> I need more element types than the book covers so I went to the CGI.pm
> documentation to discover more. Here they are called in the following
> fashion:

Sadly, none of the four f'ups I've read so far seem to have answered
your question, although they contained generally useful and
interesting answers to different questions  ;-}

You're referring to the use of the '-any' pragma, I believe.

(Documentation: go to http://stein.cshl.org/WWW/software/CGI/#import 
and scroll down a little bit to "Pragmas")

The '-any' pragma sets CGI.pm to assume that any $q->fubar that
it sees refers to the as-yet-unknown 'fubar' tag/element in HTML.

> print $query->header; # prints an HTML header
> 
> I gather this is something to do with object orientated programming? I
> know nothing of object-orientated and don't really want to just yet!

Simply copy the examples in the documentation!  You don't, initially,
need to know what's going on behind the scenes or how to program it
yourself.

As Heisenberg is reported to have said about the lucky horseshoe over
his door "they tell me it works even if you don't believe in it".

> Is it
> OK to carry on formatting things as in the first example?

I don't think so, because you would be calling an unknown function,
and that isn't allowed by perl; whereas invoking an unknown method on
an object is OK and is handled, in this case usefully.

The :standard "method family" would import into your namespace only
the functions which CGI.pm already knows about: if you want to
persuade it about a new one which it doesn't already know, then you
either have to use the $q->fubar type of syntax, or else you'd have to
add your new tags into the CGI.pm code itself.
 
As far as I know, anyway.





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

Date: Tue, 10 Oct 2000 23:15:26 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Printing HTML form using CGI.pl
Message-Id: <Pine.GHP.4.21.0010102139350.12746-100000@hpplus03.cern.ch>

On Tue, 10 Oct 2000, Alan J. Flavell wrote:

[re. using unknown HTML tags in function- as against object-style
usage of CGI.pm]

> I don't think so, because you would be calling an unknown function,

Well, after posting that, I kind-of stumbled on what appears
to me to be a feature of CGI.pm.  Let there be two additional
HTML tags, fubar and wibble:


use CGI qw(:standard fubar wibble);

[...usual stuff omitted...]

print fubar('bar'), wibble;


Actually sends out 

<FUBAR>bar</FUBAR><WIBBLE>

at least for the version I tried.

Whether the author actually aims to support this method of adding
further HTML elements, I'm not certain, since it doesn't seem to be
documented as such.

Cheers



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

Date: Tue, 10 Oct 2000 14:49:01 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Printing HTML form using CGI.pl
Message-Id: <39E38ECD.7CD12CD0@vpservices.com>

"Alan J. Flavell" wrote:
> 
> use CGI qw(:standard fubar wibble);
> 
> [...usual stuff omitted...]
> 
> print fubar('bar'), wibble;
> 
> Actually sends out
> 
> <FUBAR>bar</FUBAR><WIBBLE>
> 
> at least for the version I tried.
> 
> Whether the author actually aims to support this method of adding
> further HTML elements, I'm not certain, since it doesn't seem to be
> documented as such.

_Official Guide to Programming with CGI.pm_, page 264:

"You can even add new HTML tags just by importing them in the use
statement."

-- 
Jeff


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

Date: Tue, 10 Oct 2000 19:22:45 GMT
From: Michael Segulja <michael.segulja@sgi-lsi.com>
Subject: Problem with duplicate entries in database
Message-Id: <8rvq9s$k37$1@nnrp1.deja.com>

I have written a perl script that reads in a specific directory of mp3
files and inserts the tag info into a MySql database.  I don't really
know if this is more of a MySql question or a perl question, so forgive
me if this is not the appropriate place to ask.

Everything works great except that each mp3 file is entered twice in
the database.  If I output the tag info to STDOUT, I see each song
once.  But if I insert the output into my database, each song is
entered twice.  I have included the perl source to see if that's the
problem.  I'm using this to learn perl, so I'm pretty clueless on what
to look for.

I really appreciate any help anybody can give.  If it's a MySql problem
let me know, and I'll ask in that group.  Something I'm also trying to
figure out is how to create a unique index on the title column, but
that's definitely for the MySql group.


Thanks again,

Michael

-- Begin perl code --

#!/usr/bin/perl -w

use strict;
use diagnostics;
use MP3::Info;
use File::Find;
use DBI;

my $mp3dir = "/var/audio/mp3";

print "\n" x 3;
print "Scanning $mp3dir and entering songs into database...\n";

&insert_mp3;

print "\nDone\n";

##	Begin MP3 tag information

sub insert_mp3 {
my ($title, $artist, $album, $year, $comment, $genre);
my ($durationM, $durationS, $bitrate, $version, $layer);
my @files;

my $db = "mp3db";
my $host = "localhost";
my $user = "mp3";
my $password = "mp3pass";

find sub {push @files, $File::Find::name if /\.mp3\z/ && -f,}, $mp3dir;

foreach my $mp3file(@files) {
	my $info = get_mp3info($mp3file);
	my $tag = get_mp3tag($mp3file);
	if ($tag) {
		($title, $artist, $album, $year, $comment, $genre)=
		@{$tag}{qw(TITLE ARTIST ALBUM YEAR COMMENT GENRE)};
	}

	$durationM = $info->{MM};
	$durationS = $info->{SS};
	$bitrate = $info->{BITRATE};
	$version = $info->{VERSION};
	$layer = $info->{LAYER};

# Uncommenting these lines will output the tag info to the console.
# Each song (or MP3 file) is output only one time.
#
#	print "Duration	=> $durationM:$durationS\n";
#	print "Title		=> $title\n";
#	print "Artist		=> $artist\n";
#	print "Album		=> $album\n";
#	print "Genre		=> $genre\n";
#	print "Year		=> $year\n";
#	print "Comment		=> $comment\n";
#	print "Bitrate		=> $bitrate\n";
#	print "Version		=> $version\n";
#	print "Layer		=> $layer\n";

# This obviously the code to send the output to the database.
# Each song (or MP3 file) is output two times identically.

	# Connect to the database mp3db.
	my $dbh = DBI->connect("DBI:mysql:database=$db;host=$host",
			$user, $password, {RaiseError => 1} );

	# Insert MP3 tag info into table mp3main.
	my $sth=$dbh->prepare("INSERT INTO mp3main
	   (album, artist, title, genre, comment, bitrate, version,
mpeg_layer, durationM,
	      durationS, year) VALUES (?,?,?,?,?,?,?,?,?,?,?)" );

	$sth->execute($album, $artist, $title, $genre, $comment,
$bitrate, $version, $layer,
			$durationM, $durationS, $year) || die "Insert
Failed";
	$sth->execute();

	# Disconnect from database.
	$dbh->disconnect();
}

print "\n" x 3;
}
##	End MP3 tag information

-- End perl code --


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


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

Date: Tue, 10 Oct 2000 21:59:50 +0100
From: Mark Worsdall <linux@wizdom.org.uk>
Subject: Re: Problems with Mail::Folder and cgi
Message-Id: <KlBeegAGN445Ew$6@worsdall.demon.co.uk>

In article <8qat76$553$1@nnrp1.deja.com>, mluebke@my-deja.com writes
>Can anybody help here? Im desperate!
>
>
>In article <8q8rnt$q1e$1@nnrp1.deja.com>,
>  mluebke@my-deja.com wrote:
>> Im trying to write a simple script to parse a
>> mail folder and to display the subject lines on a
>> web page. The scipt I am pasting below -works-
>> when I run it through command line (it does what
>> it should), but when run as a CGI script it does
>> not. It will print the header and anything I tell
>> it to before I start opening the mailbox, then
>> quits printing anything at all.
>>
>> --- begin code ---
>>
>> #!/usr/bin/perl -w
>> use Mail::Folder::Mbox;
>> $| = 1;
>> print "Content-type: text/html\n\n";
>> print "TEST1";
>> $folder = new Mail::Folder ('mbox', "foldername");
>> print "TEST2";
>> $mref = $folder->get_header(1);
>> print "TEST3";
>> $subj = $mref->get('Subject'); chomp($subj);
>> print "TEST4";
>> print "$subj";
>> $folder->close;
>>
>> --- end code ---
>>
>> In the example above, from command line, I'll get
>> all the TEST# statements printed, along with the
>> subject of email #1 in my mailbox, however from
>> the web, I get only TEST1TEST2 as the output.
>>
>> Any thought?
>>

It might be that via a webserver you don't have permission, maybe via
cgiwrap, I am new to that myself though.

M.

-- 
He came from Econet - Oh no, I've run out of underpants :(
Home:- jaydee@wizdom.org.uk       http://www.wizdom.org.uk
Shadow:- webmaster@shadow.org.uk  http://www.shadow.org.uk
Work:- netman@hinwick.demon.co.uk http://www.hinwick.demon.co.uk
Web site Monitoring:-             http://www.shadow.org.uk/SiteSight/


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

Date: Tue, 10 Oct 2000 19:49:02 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: re-start problem
Message-Id: <slrn8u6srq.3sj.tjla@thislove.dyndns.org>

I was shocked! How could theomats <ejw@windsor.igs.net>
say such a terrible thing:
>Is the bug in line 17 in the Bishops.java file ? or in the .cgi ?

How are we supposed to know if you don't post any code? If it's in the
java file then we don't really want to know (this is a Perl newsgroup
after all). That "line 17" thing is the standard answer when someone
posts impossibly general questions about programs we know nothing about.

>Should I be using Notepad and then Wordpad if file too large ?
>or should I use Dos editor?

I prefer vim myself although I admit to liking editplus under windows.

>Maybe the word "volunteer" is the terrible thing,  :) but I am on a
>shoestring budget until things get rolling with the game.

*shrug* can't help you if you don't know enough to help yourself. Maybe
you need to invest in a little more paid programmer time since I doubt
you are going to be able to fix this even with our help.

Also, if you are going to reply, then put your answers below the
(suitably trimmed) original text, as I am doing. This makes it much
easier to read and quicker to download.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
PRESENT

n. That part of eternity dividing the domain of disappointment from
the realm of hope.


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

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


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