[22432] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4653 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 3 09:06:01 2003

Date: Mon, 3 Mar 2003 06:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 3 Mar 2003     Volume: 10 Number: 4653

Today's topics:
    Re: '@' symbol confusion <tore@aursand.no>
    Re: '@' symbol confusion <newsfeed2@boog.co.uk>
    Re: '@' symbol confusion <ncmike@nc.rr.com>
    Re: '@' symbol confusion <ncmike@nc.rr.com>
    Re: DBD and DBI on Solaris 64 bit (Joe Smith)
    Re: Guestbook Pro 1.0 (Tad McClellan)
    Re: Guestbook Pro 1.0 <me@privacy.net>
    Re: Guestbook Pro 1.0 (Sam Holden)
    Re: Guestbook Pro 1.0 <REMOVEsdnCAPS@comcast.net>
    Re: Guestbook Pro 1.0 <flavell@mail.cern.ch>
        Hash of functions? <rm@no-mail.com>
    Re: Hash of functions? <bernard.el-hagin@DODGE_THISlido-tech.net>
    Re: Hash of functions? <nobull@mail.com>
    Re: help with printing an array of strings <bigj@kamelfreund.de>
    Re: How to access proxy server for Perl Soap client news@roaima.freeserve.co.uk
    Re: Looking for a utility to remove duplicates <newsfeed2@boog.co.uk>
    Re: Need Newbie Programmers for Freelance Group <newsfeed2@boog.co.uk>
    Re: Need to trim word with parenthesis (Tad McClellan)
    Re: Need to trim word with parenthesis <pengtaoli@hotmail.com>
    Re: Need to trim word with parenthesis <bigj@kamelfreund.de>
        NEWBIE: PerlNET <jasonhood@tiscali.co.uk>
        PDF::Create Problem <spp@monaco377.com>
    Re: Perl & VB without activeperl on Windows?? (Sisyphus)
        Perl CGI components + demo <"ns_news [at] netspinner [point] co point] uk">
        Perl Mysql uploading a image in a database. (niels)
    Re: PerlCC Error on Win2k - Perl57.lib ?! (Martin Bohnert)
    Re: PerlCC Error on Win2k - Perl57.lib ?! <simon.andrews@bbsrc.ac.uk>
    Re: PerlCC Error on Win2k - Perl57.lib ?! (Helgi Briem)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 03 Mar 2003 11:30:46 +0100
From: "Tore Aursand" <tore@aursand.no>
Subject: Re: '@' symbol confusion
Message-Id: <pan.2003.03.03.10.19.54.227204@aursand.no>

On Mon, 03 Mar 2003 00:22:42 +0000, mike wrote:
> DBD::mysql::st execute failed: You have an error in your SQL syntax
> near '@dippy.com, 101FLippyWay, [...]

Nothing to do with Perl, really; MySQL - and other RDBMS systems - don't
like unquoted values.

> my $dbh = Mysql->Connect( ... )

Why don't you use DBI?

> my $sth = $dbh->query(INSERT INTO user_list VALUES (NULL, $fname,
> $lname, $email, $street, $city, $state, $zip, $notifmethod));

Please: Don't do it this way!

First of all; what happens when you change the table layout of the
'user_list' table?  Solve this problem by defining the field names.

Secondly; Bind the parameters into the SQL query, so that correct
representation of your data (quoting, for example) is taken care of.

Example:

  my $sth = $dbh->prepare('INSERT INTO user_list
                           ( fname, lname, email, street )
                           VALUES (?, ?, ?, ?)');
  $sth->execute( $fname, $lname, $email, $street );
  $sth->finish();

Much better!


-- 
Tore Aursand - tore@aursand.no - http://www.aursand.no/



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

Date: Mon, 3 Mar 2003 11:27:52 -0000
From: "Peter Cooper" <newsfeed2@boog.co.uk>
Subject: Re: '@' symbol confusion
Message-Id: <d_G8a.10796$EN3.85431@newsfep4-glfd.server.ntli.net>

Tore Aursand said:
> Nothing to do with Perl, really; MySQL - and other RDBMS systems - don't
> like unquoted values.

Just incase this helps anyone.. mailing.database.mysql is an excellent newsgroup
for MySQL queries and questions. It's not an area of USENET I've seen before,
but I tried it out a few days ago and there's thousands of posts on it, so well
worth a read.

Until now I'd been lurking around alt.php.sql for MySQL stuff, but you can see
why that's not such a great place just from the newsgroup name ;-)

Cheers,
Pete




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

Date: Mon, 03 Mar 2003 13:02:50 GMT
From: "Mike" <ncmike@nc.rr.com>
Subject: Re: '@' symbol confusion
Message-Id: <_nI8a.10338$ki.624529@twister.southeast.rr.com>

Thanks for responding but I do have a question:
What is the advantage of using DBI over the method I chose?

Thanks,

Mike




"Tore Aursand" <tore@aursand.no> wrote in message
news:pan.2003.03.03.10.19.54.227204@aursand.no...
> On Mon, 03 Mar 2003 00:22:42 +0000, mike wrote:
> > DBD::mysql::st execute failed: You have an error in your SQL syntax
> > near '@dippy.com, 101FLippyWay, [...]
>
> Nothing to do with Perl, really; MySQL - and other RDBMS systems - don't
> like unquoted values.
>
> > my $dbh = Mysql->Connect( ... )
>
> Why don't you use DBI?
>
> > my $sth = $dbh->query(INSERT INTO user_list VALUES (NULL, $fname,
> > $lname, $email, $street, $city, $state, $zip, $notifmethod));
>
> Please: Don't do it this way!
>
> First of all; what happens when you change the table layout of the
> 'user_list' table?  Solve this problem by defining the field names.
>
> Secondly; Bind the parameters into the SQL query, so that correct
> representation of your data (quoting, for example) is taken care of.
>
> Example:
>
>   my $sth = $dbh->prepare('INSERT INTO user_list
>                            ( fname, lname, email, street )
>                            VALUES (?, ?, ?, ?)');
>   $sth->execute( $fname, $lname, $email, $street );
>   $sth->finish();
>
> Much better!
>
>
> --
> Tore Aursand - tore@aursand.no - http://www.aursand.no/
>




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

Date: Mon, 03 Mar 2003 13:23:36 GMT
From: "Mike" <ncmike@nc.rr.com>
Subject: Re: '@' symbol confusion
Message-Id: <sHI8a.10343$ki.627174@twister.southeast.rr.com>

Thanks Tore.  This worked perfectly.

Mike


"Tore Aursand" <tore@aursand.no> wrote in message
news:pan.2003.03.03.10.19.54.227204@aursand.no...
> On Mon, 03 Mar 2003 00:22:42 +0000, mike wrote:
> > DBD::mysql::st execute failed: You have an error in your SQL syntax
> > near '@dippy.com, 101FLippyWay, [...]
>
> Nothing to do with Perl, really; MySQL - and other RDBMS systems - don't
> like unquoted values.
>
> > my $dbh = Mysql->Connect( ... )
>
> Why don't you use DBI?
>
> > my $sth = $dbh->query(INSERT INTO user_list VALUES (NULL, $fname,
> > $lname, $email, $street, $city, $state, $zip, $notifmethod));
>
> Please: Don't do it this way!
>
> First of all; what happens when you change the table layout of the
> 'user_list' table?  Solve this problem by defining the field names.
>
> Secondly; Bind the parameters into the SQL query, so that correct
> representation of your data (quoting, for example) is taken care of.
>
> Example:
>
>   my $sth = $dbh->prepare('INSERT INTO user_list
>                            ( fname, lname, email, street )
>                            VALUES (?, ?, ?, ?)');
>   $sth->execute( $fname, $lname, $email, $street );
>   $sth->finish();
>
> Much better!
>
>
> --
> Tore Aursand - tore@aursand.no - http://www.aursand.no/
>




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

Date: Mon, 03 Mar 2003 10:16:04 GMT
From: inwap@inwap.com (Joe Smith)
Subject: Re: DBD and DBI on Solaris 64 bit
Message-Id: <EXF8a.4866$io.200569@iad-read.news.verio.net>

In article <3E5B774D.5020905@indra.com>, Ron Reidy  <rereidy@indra.com> wrote:
>Rich wrote:
>> I am running Solaris 9 64 bit which comes with Perl v5.6.1 built for
>> sun4-solaris-64int. I want to build in the DBD and DBI modules for
>
>Since you don't have a 64bit C compiler, dowload the 64bit gcc C 
>compiler from http://www.sunfreeware.com/, and rebuild Perl and all the 
>other modules you have installed.

An important point, worth repeating, is that you need to use the same
compiler for modules as the main program.

That is, if you are going to be using gcc to compile the modules, then
you need to compile perl from its sources.

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


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

Date: Mon, 3 Mar 2003 00:38:36 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Guestbook Pro 1.0
Message-Id: <slrnb65u3c.1rd.tadmc@magna.augustmail.com>

PCMedics <sales@pcmedix.org> wrote:
> tadmc@augustmail.com (Tad McClellan) wrote in message news:<slrnb5mt4d.40h.tadmc@magna.augustmail.com>...
>> PCMedics <sales@pcmedix.org> wrote:
>> 
>> > Guestbook pro is a unique guestbook,
>> 
>> 
>> And it was written by a spammer.
>> 
>> Commercial posts are not welcome in discussion newsgroups.
> 
> Thank you for your OPINION!... and it is disregarded! 


I could not care less if you pay attention or not, my
followup was not for your benefit.

It is your potential customers that I hope will not disregard it.


> please keep your
> OPIONIONS to your self. 


You do not understand how Usenet works (but we already knew that from
your commercial post).

If you do not want opinions then do not post.


> I beg to differ on the "SPAMMER" remark...


Please keep your opionions (sic) to your self (sic again).


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Mon, 3 Mar 2003 20:21:10 +1100
From: "Tintin" <me@privacy.net>
Subject: Re: Guestbook Pro 1.0
Message-Id: <b3v6q5$1p3vhm$1@ID-172104.news.dfncis.de>


"PCMedics" <sales@pcmedix.org> wrote in message
news:e826f4aa.0303021922.75fef4e0@posting.google.com...
> tadmc@augustmail.com (Tad McClellan) wrote in message
news:<slrnb5mt4d.40h.tadmc@magna.augustmail.com>...
> > PCMedics <sales@pcmedix.org> wrote:
> >
> > > Guestbook pro is a unique guestbook,
> >
> >
> > And it was written by a spammer.
> >
> > Commercial posts are not welcome in discussion newsgroups.
>
> Thank you for your OPINION!... and it is disregarded! please keep your
> OPIONIONS to your self. I beg to differ on the "SPAMMER" remark...

Spammers do not advertise unsolicted products in programming newgroups.





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

Date: 3 Mar 2003 10:47:20 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Guestbook Pro 1.0
Message-Id: <slrnb66clo.mqh.sholden@flexal.cs.usyd.edu.au>

On Mon, 3 Mar 2003 20:21:10 +1100, Tintin <me@privacy.net> wrote:
> 
> "PCMedics" <sales@pcmedix.org> wrote in message
> news:e826f4aa.0303021922.75fef4e0@posting.google.com...
>> tadmc@augustmail.com (Tad McClellan) wrote in message
> news:<slrnb5mt4d.40h.tadmc@magna.augustmail.com>...
>> > PCMedics <sales@pcmedix.org> wrote:
>> >
>> > > Guestbook pro is a unique guestbook,
>> >
>> >
>> > And it was written by a spammer.
>> >
>> > Commercial posts are not welcome in discussion newsgroups.
>>
>> Thank you for your OPINION!... and it is disregarded! please keep your
>> OPIONIONS to your self. I beg to differ on the "SPAMMER" remark...
> 
> Spammers do not advertise unsolicted products in programming newgroups.

I think you wrote the opposite of what you meant :)

-- 
Sam Holden



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

Date: Mon, 03 Mar 2003 05:55:45 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Guestbook Pro 1.0
Message-Id: <Xns933346738A41Esdn.comcast@216.166.71.239>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

sales@pcmedix.org (PCMedics) wrote in
news:e826f4aa.0303021922.75fef4e0@posting.google.com: 

> tadmc@augustmail.com (Tad McClellan) wrote in message
> news:<slrnb5mt4d.40h.tadmc@magna.augustmail.com>... 
>> PCMedics <sales@pcmedix.org> wrote:
>> 
>> > Guestbook pro is a unique guestbook,
>> 
>> 
>> And it was written by a spammer.
>> 
>> Commercial posts are not welcome in discussion newsgroups.
> 
> Thank you for your OPINION!... and it is disregarded! please keep your
> OPIONIONS to your self. I beg to differ on the "SPAMMER" remark...

That's not just Tad's opinion.  It is clearly stated in the charter for 
comp.lang.perl.misc.  If you can't politely abide by the posting guidelines 
for this group, then to hell with you.

- -- 
Eric
print scalar reverse sort qw p ekca lre reh 
ts uJ p, $/.r, map $_.$", qw e p h tona e;

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPmNCsWPeouIeTNHoEQJ/hQCbBQrVPxTQM8E1eNYi4KJ4TtOVXOwAn1P3
B4/ZVp8dDLrAhXOCK5k+v5T9
=dhki
-----END PGP SIGNATURE-----


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

Date: Mon, 3 Mar 2003 13:30:54 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Guestbook Pro 1.0
Message-Id: <Pine.LNX.4.53.0303031329590.4396@lxplus081.cern.ch>

On Mon, Mar 2, PCMedics wrote offensive and abusive drivel.

Please don't change your posting address.


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

Date: Mon, 3 Mar 2003 19:24:48 +0900
From: Roy Marteen <rm@no-mail.com>
Subject: Hash of functions?
Message-Id: <20030303192448.36b26dbb.rm@no-mail.com>

Hi all,

Say I have three functions:

sub func_one { print "Number One"; }
sub func_two { print "Number Two"; }
sub func_three { print "Number Three"; }

How can I write this is more simple way? Something like hash of functions?

if ($val eq "one") { func_one(); }
elsif ($val eq "two") { func_two(); }
elsif ($val eq "three") { func_three(); }

Thanks a lot.



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

Date: Mon, 3 Mar 2003 10:39:14 +0000 (UTC)
From: "Bernard El-Hagin" <bernard.el-hagin@DODGE_THISlido-tech.net>
Subject: Re: Hash of functions?
Message-Id: <Xns933375D55D1FDelhber1lidotechnet@62.89.127.66>

Roy Marteen wrote:

> Hi all,
> 
> Say I have three functions:
> 
> sub func_one { print "Number One"; }
> sub func_two { print "Number Two"; }
> sub func_three { print "Number Three"; }
>
> How can I write this is more simple way? Something like hash of
> functions? 
> 
> if ($val eq "one") { func_one(); }
> elsif ($val eq "two") { func_two(); }
> elsif ($val eq "three") { func_three(); }


my %disp = ( 'one'   => \&func_one,
             'two'   => \&func_two,
             'three' => \&func_three );


$disp{$val}->();


-- 
Cheers,
Bernard
--
echo 42|perl -pe '$#="Just another Perl hacker,"'



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

Date: 03 Mar 2003 12:46:54 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Hash of functions?
Message-Id: <u97kbgzkg1.fsf@wcl-l.bham.ac.uk>

"Bernard El-Hagin" <bernard.el-hagin@DODGE_THISlido-tech.net> writes:

> Roy Marteen wrote:

> > sub func_one { print "Number One"; }
> > sub func_two { print "Number Two"; }
> > sub func_three { print "Number Three"; }
> >
> >  Something like hash of functions? 
> 
> my %disp = ( 'one'   => \&func_one,
>              'two'   => \&func_two,
>              'three' => \&func_three );

I think it may also be worth telling the OP that he can cut out the
intermediate step:

my %disp = ( one => sub { print "Number One"; },
             two => sub { print "Number Two"; },
             three => sub { print "Number Three"; },
);

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


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

Date: Mon, 03 Mar 2003 10:22:07 +0100
From: "Janek Schleicher" <bigj@kamelfreund.de>
To: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: help with printing an array of strings
Message-Id: <pan.2003.03.03.09.12.15.444734@kamelfreund.de>

On Sat, 01 Mar 2003 16:51:09 +0000, Anno Siegel wrote:

>> # calculate length of longest element in array
>> $maxlen = (reverse sort { $a <=> $b } map { length $_ } @array)[0];
> 
> Using sort to find the maximum is the quick and dirty way.  It's quick
> on programmer time and dirty on system resources, so it may well be the
> right way.  I only mention it because it isn't the only way.  It's
> definitely wrong with very long lists.

And to give the answer what's a fine way,
here's an example:

use List::Util qw/max/;

my $maxlen = max map length, @array;


Cheerio,
Janek


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

Date: Mon, 3 Mar 2003 10:11:02 +0000
From: news@roaima.freeserve.co.uk
Subject: Re: How to access proxy server for Perl Soap client
Message-Id: <mn9v3b.q7l.ln@moldev.cmagroup.co.uk>

Sade Bhat Kalasabail <sade_bhat@yahoo.com> wrote:
> Have installed soaplite on a  solaris. The server is behind a
> firewall.
>  
> I am trying to run an example program 

> but keep getting the error message
> 500 Can't connect to services.soaplite.com:80 (Interrupted system
> call) at ./hibye.pl line 7

What happens if you try connecting from your Solaris box directly?
	telnet services.soaplite.com 80

You should get a "connected" response.

> IS it because I haven't given my proxy server and user/password
> access?

I don't know. Do you need to do this before you get access to external
web servers?

> If so how do I do it.  What gives the 500 error message.

Have you looked at the documentation for SOAP::Lite yet? Particularly
the "SOAP Cookbook" at http://cookbook.soaplite.com. This shows (with
examples) how to perform proxy authentication.

Start at http://cookbook.soaplite.com/#accessing%20service%20with%20basic%20authentication
and read that and the next section.

Chris
-- 
@s=split(//,"Je,\nhn ersloak rcet thuarP");$k=$l=@s;for(;$k;$k--){$i=($i+1)%$l
until$s[$i];$c=$s[$i];print$c;undef$s[$i];$i=($i+(ord$c))%$l}


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

Date: Mon, 3 Mar 2003 09:30:20 -0000
From: "Peter Cooper" <newsfeed2@boog.co.uk>
Subject: Re: Looking for a utility to remove duplicates
Message-Id: <SgF8a.10706$EN3.84731@newsfep4-glfd.server.ntli.net>

Tore Aursand said:
>       if ( exists $fruits{$fruit} ) {
>           if ( $weight > $fruits{$fruit} ) {
>               $fruits{$fruit} = $weight;
>           }
>       }
>       else {
>           $fruits{$fruit} = $weight;
>       }
>
> And, yes, you can - eventually - simplify the 'if' statement inside the
> 'while' block above.  And, no, I haven't tested the code. :)

Regarding the thread of about a week ago on brackets and using 'if' after the
statement, I have to confess this is somewhere where I'd use the shorter syntax.

$fruits{$fruit} = $weight if !exists($fruits{$fruit});
$fruits{$fruit} = $weight if $fruits{$fruit} > $weight;

Although I can see how that might actually be less enlightening to a newer user,
so now at least they've got both ways :-) BTW, she wanted the lower weight to
end up in the hash, not the highest. I made that mistake myself a few posts up
:-)

Cheers,
Pete




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

Date: Mon, 3 Mar 2003 11:29:17 -0000
From: "Peter Cooper" <newsfeed2@boog.co.uk>
Subject: Re: Need Newbie Programmers for Freelance Group
Message-Id: <p%G8a.10797$EN3.85440@newsfep4-glfd.server.ntli.net>

"Jas" <JasB19@aol.com> wrote:
> I am currenty looking for programmers how would like to join a
> freelance programming group. I am looking for people who know or are
> learning PHP and PERL. But other programmers are wanted. I am looking
> for it to be a small group of around 5 people. It will be part time .

Sounds like an interesting concept. Somewhat like a "Rent-a-Wreck" of the
programming world. :-)

Pete




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

Date: Mon, 3 Mar 2003 00:45:15 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Need to trim word with parenthesis
Message-Id: <slrnb65ufr.1rd.tadmc@magna.augustmail.com>

impervious@attbi.com <impervious@attbi.com> wrote:
> Can someone tell me how I could trim a string that looks like this:
> 
> (Tue) Mar 04, 2004
> 
> So that it looks like this:
> 
> Mar 04, 2004
> 
> I tried the following code but it has some sort of syntax error.  


It has no syntax error at all!

Perhaps you meant semantic error instead?


> 	$_ = s/^[(.{3}) ]//;


That is equivalent to:

    $_ = s/^[ 3.(){}]//;

The order of characters in a character class do not matter.


   s/^\(.{3}\) //;


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Mon, 3 Mar 2003 17:33:03 +0800
From: "Franklin Lee" <pengtaoli@hotmail.com>
Subject: Re: Need to trim word with parenthesis
Message-Id: <b3v7gh$j5n@netnews.proxy.lucent.com>

$_=s/^\(.{3}\)//;

U need \;




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

Date: Mon, 03 Mar 2003 10:28:59 +0100
From: "Janek Schleicher" <bigj@kamelfreund.de>
To: tadmc@augustmail.com
Subject: Re: Need to trim word with parenthesis
Message-Id: <pan.2003.03.03.09.27.39.53771@kamelfreund.de>

On Mon, 03 Mar 2003 00:45:15 -0600, Tad McClellan wrote:

> That is equivalent to:
> 
>     $_ = s/^[ 3.(){}]//;
> 
> The order of characters in a character class do not matter.
> 
> 
>    s/^\(.{3}\) //;

or

s/^\(...\) //;

what is one character less to type :-)
and I believe also that it is a bit quicker,
as Perl doesn't need to count (but I didn't benchmarked it).


Cheerio,
Janek


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

Date: Mon, 3 Mar 2003 13:15:31 -0000
From: "Jason Hood" <jasonhood@tiscali.co.uk>
Subject: NEWBIE: PerlNET
Message-Id: <3e635512_2@mk-nntp-2.news.uk.tiscali.com>

Hi,

Im looking into PerlNET as a solution.

I've installed activestate perl, the PDK and visual perl.
When i use this command.

use namespace "System";

it tells me that namespace.pm cannot be found.

Any Ideas.

Cheers,

Jason



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003




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

Date: Mon, 03 Mar 2003 11:08:17 +0100
From: =?ISO-8859-15?Q?S=E9bastien?= Cottalorda <spp@monaco377.com>
Subject: PDF::Create Problem
Message-Id: <3e632c48$0$7890$626a54ce@news.free.fr>

Hi all,

I encoutered problem using PDF::Create Module on win32 Platform:
        Win2000 Server with ActivePerl 5.6.1

I manage without any problem to create PDF files and:
        - With Acrobat Reader, read and print them.
        - With Ghostscript 7.34 or Ghostscript 8.00 => NO WAY

I always get :
"Error: syntaxerror in readxref ... Unrecoverable error exit code 1".

No problems with the same module but using Linux version.

If someone has a clue ?

Thanks in advance

Sébastien


Here is the script code that generate simple pdf file:

use PDF::Create
my $pdf = new PDF::Create('filename' => 'mypdf.pdf',
                                'Version' => 1.2,
                                'PageMode' => 'UseOutlines',
                                'Author' => 'Sébastien',
                                'Title' => 'My Title');
my $root = $pdf->new_page('MediaBox' => [ 0, 0, 612, 792 ]);
my $page = $root->new_page;
my $f1 = $pdf->font('Subtype' => 'Type1',
                        'Encoding' => 'WinAnsiEncoding',
                        'BaseFont' => 'Helvetica');
$page->stringl($f1, 11, 300, 400, "Hello World !");
$pdf->close;
exit;


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

Date: 3 Mar 2003 04:53:40 -0800
From: kalinabears@hdc.com.au (Sisyphus)
Subject: Re: Perl & VB without activeperl on Windows??
Message-Id: <e615828f.0303030453.c1b23b6@posting.google.com>

autrijus@autrijus.org (Autrijus Tang) wrote in message news:<12bcf56.0303021914.49e12e0c@posting.google.com>...
> nobody <noemail@nowhere.net> wrote in message news:<Xns932E63F4972FFabccbaabc@129.250.170.100>...
> > I've read the documentation again and I can't think what led me to 
> > my earlier conclusion. My mistake. 
> 
> No problem.  I should have made it clearer up-front anyway. :-)
> 
> > For an MSWIN app using ActivePerl, it sounds like I'd just need to
> > deliver the app .exe and perl56.dll (for example). Great!
> 
> Thanks!  Also note that 0.63 has a rather unpleasant bug relating
> to binmode() that prevents it to dynamically load packed .dll
> files on windows... 0.64 has been released to correct this problem,
> and I look forward to your feedback. :)
> 
> See http://nntp.x.perl.org/group/perl.par/31 for the release announcement.
> 
> If you don't have Microsoft VC++, just wait for a few days and
> the new version should make its way to the ActivePerl PPM repository.
> 
> Thanks,
> /Autrijus/

Google generally refuses to let me post just lately (and my ISP's news
server is non-functional) so I sent Autrijus an email pointing out
that I couldn't get Par-0.64 to build on either ActiveState or
mingw32-built perl.
I was trying to build it on perl 5.6.1, but finally worked out that
Par-0.64 source code is specific to perl 5.8 - at least it is if perl
is built with ithreads support.
I was able to build it on AS build 802 - 'pp' seems to work nicely,
too :-)
But I couldn't build it on mingw32-built perl 5.8.0.
Dmake croaks complaining that it doesn't know how to make 'all'. Looks
like there must be some nmake-specific syntax in the makefile that's
generated.
It would be nice if that could be fixed.

Cheers,
Rob


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

Date: Mon, 03 Mar 2003 10:52:31 +0000
From: "ns_news [at] netspinner [point] co point] uk" <"ns_news [at] netspinner [point] co point] uk">
Subject: Perl CGI components + demo
Message-Id: <3e633280$0$11762$fa0fcedb@lovejoy.zen.co.uk>

I'd be interested in feedback on some Perl CGI
components that I've developed. You can see them
here.

http://www.netspinner.co.uk/cgi-bin/WebUtilities/cgi-bin/util_demo.pl

There's a link at the top of the page that takes
you to the code for the script that generates it.

At the moment:

a) the tab widget only works correctly in IE. I believe
that the generated HTML is correct but Mozilla seems to
render it incorrectly.

b) the popup menu widget also only works in IE. This is
because the associated Javascript is IE specific. I
will fix this in the future. (In addition, the popup
menu seems to think it is limited to about 1/3 of the
width of the page. I can't see why, and if anyone can,
I'd be *very* grateful to know.)

I'm interested in:

1. Browser support problems
2. The ease of use of the API
3. Other useful functionality that could be provided.

At some point in the future, I will be open-sourcing
the code, but that won't happen till it's fairly complete
and tested.

Steve Collyer



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

Date: 3 Mar 2003 05:15:56 -0800
From: niels_bond@hotmail.com (niels)
Subject: Perl Mysql uploading a image in a database.
Message-Id: <6772e388.0303030515.a5a78a5@posting.google.com>

Hello there,

I'm trying to upload a image from a html form to a mysql database. 

For some reason i can't manage to do this right. Don't tell me to save
the image in a directory and save a url in the database. I just don't
want that.

Here's the code:

local $/=undef;
$afbeelding=<$reclame_image>;#(Reclame_image is the variable from the
form)

$afbeelding=$dbh->quote($afbeelding);
$sql="insert into imgarchief(image)values('$afbeelding')";
      $sth=Execute_Query($sql);#just a sub that executes the query

Sometimes, he saves the image right. sometimes i get an error.

To show the image i use this. 

$reclame_imgno=shift;

print "Content-Type: image/jpeg\n\n";
print "$reclame_imgno";

my $reclamesth=Execute_Query("select image from imgarchief where
img_id=$reclame_imgno");

while($return=$reclamesth->fetchrow)
{
print $return;
}


What's wrong with this. 

Thanks in advance.

Niels Bond


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

Date: 2 Mar 2003 23:00:44 -0800
From: martin.bohnert.ibm@froeschl.de (Martin Bohnert)
Subject: Re: PerlCC Error on Win2k - Perl57.lib ?!
Message-Id: <c08299c0.0303022300.110c6e48@posting.google.com>

kalinabears@hdc.com.au (Sisyphus) wrote in message news:<e615828f.0302271538.11ea2f77@posting.google.com>...
> The 'perlcc.bat' that ships with 5.8 has a hard coded reference to
> 'perl57.lib'. Find it, and change it to 'perl58.lib'.
> I think that's all there is to it - though I haven't checked.

Found that. Compiler running for 24hrs now ;)
 
> 'perlcc' is experimental, buggy, and poorly (if at all) supported. The
> executable built is huge and will not run independently of
> 'perl58.dll'.Imo, perlcc's only value is one of entertainment :-)
> 
> Hth.
> 
> Cheers,
> Rob

I`m just doing it to a.) obscure the code and b.) b/c I dont`t want to
install a complete perl on the (all window$) client machines.

Thanks a lot !


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

Date: Mon, 03 Mar 2003 10:21:19 +0000
From: Simon Andrews <simon.andrews@bbsrc.ac.uk>
Subject: Re: PerlCC Error on Win2k - Perl57.lib ?!
Message-Id: <3E632C9F.CD5EF27D@bbsrc.ac.uk>

Martin Bohnert wrote:

> I`m just doing it to a.) obscure the code and b.) b/c I dont`t want to
> install a complete perl on the (all window$) client machines.

Take a look at the current thread entitled "Perl & VB without activeperl
on Windows??", which has turned into a discussion of a couple of ways to
do part b) of your requirements.

For part a) you should also read "perldoc -q hide" :-)

HTH

Simon.


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

Date: Mon, 03 Mar 2003 13:45:38 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: PerlCC Error on Win2k - Perl57.lib ?!
Message-Id: <3e635bcf.2080481634@news.cis.dfn.de>

On 2 Mar 2003 23:00:44 -0800, martin.bohnert.ibm@froeschl.de
(Martin Bohnert) wrote:

>kalinabears@hdc.com.au (Sisyphus) wrote in message news:<e615828f.0302271538.11ea2f77@posting.google.com>...
>> The 'perlcc.bat' that ships with 5.8 has a hard coded reference to
>> 'perl57.lib'. Find it, and change it to 'perl58.lib'.
>> I think that's all there is to it - though I haven't checked.
>
>Found that. Compiler running for 24hrs now ;)

And it's going to be running *a lot' longer before
it's over.  How long do you have?

>> 'perlcc' is experimental, buggy, and poorly (if at all) supported. The
>> executable built is huge and will not run independently of
>> 'perl58.dll'.Imo, perlcc's only value is one of entertainment :-)

>I`m just doing it to a.) obscure the code 

That's a complete waste of time and effort.  Forget  it.

Read perldoc -q hide

>b.) b/c I dont`t want to install a complete perl on the (all window$) 
>client machines.

Have a look at PAR.
http://search.cpan.org/author/AUTRIJUS/PAR-0.64/PAR.pm

Or
-- 
Regards, Helgi Briem
helgi AT decode DOT is


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.  

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

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

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


------------------------------
End of Perl-Users Digest V10 Issue 4653
***************************************


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