[22700] in Perl-Users-Digest
Perl-Users Digest, Issue: 4921 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 1 14:07:28 2003
Date: Thu, 1 May 2003 11:05:06 -0700 (PDT)
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, 1 May 2003 Volume: 10 Number: 4921
Today's topics:
Re: $::var notation (Randal L. Schwartz)
Re: $::var notation <bart.lateur@pandora.be>
Re: $::var notation <bart.lateur@pandora.be>
Re: $::var notation <ben_altman@deadspam.com>
Alpaca! (was Re: books from beginner to guru - reading (Randal L. Schwartz)
Re: Announcement: The regex coach <edi@agharta.de>
Re: built in function 'map' examples? (Sam Holden)
Re: built in function 'map' examples? <w.koenig@acm.org>
Re: Comparing strings with small differences <mlm@nospam.com>
Re: complex text/file search. help please!!! (William R. Mattil)
Re: complex text/file search. help please!!! <mbudash@sonic.net>
Re: complex text/file search. help please!!! (William R. Mattil)
Re: complex text/file search. help please!!! <mbudash@sonic.net>
Re: CPAN Solaris problem <tony_curtis32@yahoo.com>
Re: Executing a MySQL dump file from within a perl scri ctcgag@hotmail.com
Re: Executing a MySQL dump file from within a perl scri <abuse@mweb.co.za>
mod_perl cannot be loaded? (Ernie Oporto)
Oracle 9i problem (yu-yu bai)
perlcc does not compile when split to array function is (Domenico Discepola)
Re: perlcc does not compile when split to array functio <usenet@tinita.de>
Re: Test::Harness annoyance + perldoc format (remove the obvious)
Re: What is the best software to run for an aspiring Pe <ian@WINDOZEdigiserv.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 01 May 2003 16:03:36 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
To: newsgroup3.replies.benaltw@xoxy.net
Subject: Re: $::var notation
Message-Id: <ec82aeb8f53dc1c49602ffad93eb399e@TeraNews>
>>>>> "Ben" == Ben <ben_altman@deadspam.com> writes:
Ben> Thanks. Now to figure out why the author didn't just write $var...
Maybe there was a lexical $bar in scope:
$var = "package";
print $var; # prints package
my $var = "lexical";
print $var; # prints lexical
print $::var; # prints package
print "Just another Perl hacker,";
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Thu, 01 May 2003 16:26:43 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: $::var notation
Message-Id: <gki2bvs9l1k5kaumcl7esdnktfe5ra5e9k@4ax.com>
Janek Schleicher wrote:
>$::var notation
>
>stands for the variable called 'var' from the current package.
Nope.$::var is synonymous to $main::var, whatever the current package
may be.
--
Bart.
------------------------------
Date: Thu, 01 May 2003 16:29:01 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: $::var notation
Message-Id: <fni2bvo2omng8fetugahhi6hefdlc4f3jp@4ax.com>
Ben wrote:
> Now to figure out why the author didn't just write $var...
Two reasons:
* to pass strict. $::var is a fully qualified name
* to indicate that this is a "super-global" (my term), i.e. the same
global variable from anywhere in the script, from whatever package
you're currently in. I sometimes use this for config variables.
--
Bart.
------------------------------
Date: Thu, 01 May 2003 11:41:21 -0500
From: Ben <ben_altman@deadspam.com>
Subject: Re: $::var notation
Message-Id: <b8rinh$cpe67$1@ID-121117.news.dfncis.de>
Bart Lateur wrote:
> Ben wrote:
>
>
>>Now to figure out why the author didn't just write $var...
>
>
> Two reasons:
>
> * to pass strict. $::var is a fully qualified name
That's probably it.
Thanks,
Ben
------------------------------
Date: Thu, 01 May 2003 16:03:36 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Alpaca! (was Re: books from beginner to guru - reading order)
Message-Id: <d34a38c4cf6f0f08d85e63a713de9349@TeraNews>
>>>>> "qanda" == qanda <fumail@freeuk.com> writes:
qanda> Learning Perl
And, in a few short weeks, you'll be able to get the followup book:
Learning Perl Objects, References, and Modules (the 'Alpaca' book).
Details at <http://www.oreilly.com/catalog/lrnperlorm/>.
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 01 May 2003 17:59:30 +0200
From: Edi Weitz <edi@agharta.de>
Subject: Re: Announcement: The regex coach
Message-Id: <87n0i64pzx.fsf@bird.agharta.de>
William Goedicke <goedicke@goedsole.com> writes:
> You should deliver the source so we can determine it's not a virus.
Just don't download it and you should be more or less safe.
Good luck,
Edi.
------------------------------
Date: 1 May 2003 14:32:23 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: built in function 'map' examples?
Message-Id: <slrnbb2bv4.nc5.sholden@flexal.cs.usyd.edu.au>
On Thu, 1 May 2003 08:02:58 -0500,
Barry Kimelman <barryk2@SPAM-KILLER.mts.net> wrote:
> [This followup was posted to comp.lang.perl.misc]
>
> In article <HE64to.2qG@news.boeing.com>, Robert
> (robert.j.sipe@boeing.com) says...
>> The built in 'map' function is really a powerful tool and have used it a
>> fair amount. However, the syntax of its use is still confusing for the more
>> elaborate uses. I have read the perldoc page and studied the Effective Perl
>> Programming book but would like to find more examples to draw upon.
>> Pointers to good books, webpages, user examples, FAQs... would be
>> appreciated.
>>
>> Thanx in advance.
>
> The following line of code uses "map" to find the length of the longest
> element in an array :
>
> $maxlen = (reverse sort { $a <=> $b} map { length $_ } @lines)[0];
$maxlen=undef;
for (@lines) {$maxlen=length if !defined $maxlen || $maxlen < length}
Would be O(N) instead of O(NlogN). Plus the useless 'reverse' when
an index of -1 could have been used for the same effect seems wasteful
(or simply $b<=>$a in the comparison func - though concievably a perl
might optimise $a<=>$b I guess).
> The following example constructs a hash from an array :
>
> @list = ( "hello" , "world" , "goodbye" );
> @indexlist = ( 0 .. $#list );
> %hash1 = ( map { $_ , shift @indexlist } @list );
@hash1{@list} = @indexlist;
Is far better, in my opinion, and doesn't destroy the array.
There are plenty of uses of map which are actually not better done other
ways, surely you could pick from of those to use as examples. Instead of
things I would replace with something more understandable as soon as I
saw it in code I had to maintain.
For example, map would be useful in your first example, if you had an function
which returned the maximum value it was passed:
$maxlen = max(map {length} @lines);
--
Sam Holden
------------------------------
Date: Thu, 01 May 2003 18:13:41 +0200
From: Winfried Koenig <w.koenig@acm.org>
Subject: Re: built in function 'map' examples?
Message-Id: <3EB147B5.4090301@acm.org>
Sam Holden wrote:
> For example, map would be useful in your first example, if you had an function
> which returned the maximum value it was passed:
>
> $maxlen = max(map {length} @lines);
With perl v5.8.0 you may use:
#!/usr/local/bin/perl
use strict;
use warnings;
use List::Util qw(min max);
my @lines = qw(ab abcde abc);
my $minlen = min(map {length} @lines);
my $maxlen = max(map {length} @lines);
print "$minlen $maxlen\n";
__END__
Winfried Koenig
------------------------------
Date: Thu, 01 May 2003 08:27:35 -0500
From: mlm <mlm@nospam.com>
Subject: Re: Comparing strings with small differences
Message-Id: <6MWdnbViHJNavSyjXTWcqA@giganews.com>
Aha. Thank you for demonstrating this. I've certainly learned
something. I think this technique will improve performance, although it
still requires a pattern-match.
Mark
Winfried Koenig <w.koenig@acm.org> wrote in news:3EB0497A.30007@acm.org:
> mlm wrote:
>> OK I give up. How does this work. It looks like magic to me. I see
>> that ^ does a bitwise XOR OK. But what is \000 matching? A binary
>> number? I can't figure out how the difference is extracted. I was
not
>> aware you could treat $+ and $- as arrays.
>>
>> Thanks
>> Mark
>>
>>
>> mlm <mlm@nospam.com> wrote in
news:yVCdnbUOMcxlszKjXTWcog@giganews.com:
>>
>>
>>>Hey that is a great help Winfried. I am working out how it works now
>>>...
>>>
>>>Thanks
>>>mark
>>>
>>>
>>>Winfried Koenig <w.koenig@acm.org> wrote in news:3EAD9204.9010508
>>>@acm.org:
>>>
>>>
>>>>#!/usr/local/bin/perl
>>>>
>>>>use strict;
>>>>use warnings;
>>>>
>>>>my @a = (
>>>> "Polka dot (18), sheet 07.",
>>>> "Polka dot (19), sheet 07.",
>>>> "Polka dot (20), sheet 07.",
>>>>);
>>>>
>>>>foreach my $i (1 .. $#a) {
>>>> my $diff = $a[$i -1 ] ^ $a[$i];
>>>> if ($diff =~ m/[^\000]+/) {
>>>> printf "%d,%d\n", $-[0], $+[0] - $-[0];
>>>> }
>>>>}
>>>>
>
> Hi Mark,
>
> I hope this helps:
>
> a b c d e f g # string 'abcdefg'
> 61 62 63 64 65 66 67 # hex representation of string
'abcdefg'
> a b c D E f g # string 'abcDEfg'
> 61 62 63 44 45 66 67 # hex representation of string
'abcDEfg'
> --------------------
> 00 00 00 20 20 00 00 # exclusiv or of both strings (hex)
> 0 1 2 3 4 5 6 # positions in strings
> 3 # value of $-[0] after match
> 5 # value of $+[0] after match
>
> The regular expression m/[^\000]+/ matches the first sequence of
> characters not containing a \000 character.
>
> For @- and @+ see 'perldoc perlvar'. Search for the strings
> 'LAST_MATCH_START' and 'LAST_MATCH_END'.
>
> Winfried
>
>
------------------------------
Date: 1 May 2003 14:49:25 GMT
From: wrm@rrscfi1.irngtx.tel.gte.com (William R. Mattil)
Subject: Re: complex text/file search. help please!!!
Message-Id: <b8rc5l$7bn$1@news.gte.com>
In article <mbudash-7FE40E.11091130042003@typhoon.sonic.net>,
Michael Budash <mbudash@sonic.net> wrote:
>i don't see the problem...?
Hummmm Perhaps I am being dumb... But consider that what he wanted was:
#from record 1
145 Main St 001-34562032-100 831
7002 SPARK PLUG 45345
7002 SPARK PLUG 234234
#from record 3
145 Main St 001-6734232-100 831
7002 SPARK PLUG 4342534523
And the program provided returns:
145 Main St 001-34562032-100 831
7002 SPARK PLUG 45345
7002 SPARK PLUG 234234
7002 SPARK PLUG 4342534523
So by my reckoning the Customer Number "001-6734232-100" gets *lost* But
I will also admit that I could very well be wrong.
Regards
Bill
--
William R. Mattil | Micro$ofts definition of 24x7 is 24 Hours
Sr. System Aministrator | out of 7 days
(972) 399-4106 |
------------------------------
Date: Thu, 01 May 2003 16:05:38 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: complex text/file search. help please!!!
Message-Id: <mbudash-A829B6.09053801052003@typhoon.sonic.net>
In article <b8rc5l$7bn$1@news.gte.com>,
wrm@rrscfi1.irngtx.tel.gte.com (William R. Mattil) wrote:
> In article <mbudash-7FE40E.11091130042003@typhoon.sonic.net>,
> Michael Budash <mbudash@sonic.net> wrote:
> >i don't see the problem...?
>
> Hummmm Perhaps I am being dumb... But consider that what he wanted was:
>
> #from record 1
> 145 Main St 001-34562032-100 831
> 7002 SPARK PLUG 45345
> 7002 SPARK PLUG 234234
>
> #from record 3
> 145 Main St 001-6734232-100 831
> 7002 SPARK PLUG 4342534523
>
> And the program provided returns:
>
> 145 Main St 001-34562032-100 831
> 7002 SPARK PLUG 45345
> 7002 SPARK PLUG 234234
> 7002 SPARK PLUG 4342534523
>
> So by my reckoning the Customer Number "001-6734232-100" gets *lost* But
> I will also admit that I could very well be wrong.
hmm... when i run this script:
#-------------------------------
open (D, "data") or die ("Can't open data: $!");
local $/ = "\f";
while (<D>) {
if (/^7002/m) {
my @lines = split /\n/;
print shift @lines, "\n";
foreach (@lines) {
print "$_\n" if /^7002/;
}
}
}
#-------------------------------
over this data:
#-------------------------------
145 Main St 001-34562032-100 831
Pete's Auto Parts
John Doe 345 Generic Lane (617)564.34235
1001 GAS TANK
1005 GAS CAP
7002 SPARK PLUG 45345
7002 SPARK PLUG 234234
9199 PAINT
001 Beach Insurance
^L145 Main St 001-3754332-100 831
Pete's Auto Parts
Britney Spears 35 Hotbody Lane (617)444.3415
1002 BUMPER
9199 PAINT
001 Sandbar Insurance
014 Rockafeller Ins.
^L145 Main St 001-6734232-100 831
Pete's Auto Parts
Filipe Rogers 31 Rockstar Lane (617)134.34435
1001 GAS Valve
7002 SPARK PLUG 4342534523
9189 DEISEL FUEL
001 Beach Insurance
#-------------------------------
i get these results:
#-------------------------------
145 Main St 001-34562032-100 831
7002 SPARK PLUG 45345
7002 SPARK PLUG 234234
145 Main St 001-6734232-100 831
7002 SPARK PLUG 4342534523
#-------------------------------
no "lost" data... ??
--
Michael Budash
------------------------------
Date: 1 May 2003 16:47:14 GMT
From: wrm@rrscfi1.irngtx.tel.gte.com (William R. Mattil)
Subject: Re: complex text/file search. help please!!!
Message-Id: <b8rj2i$7e2$1@news.gte.com>
In article <mbudash-A829B6.09053801052003@typhoon.sonic.net>,
Michael Budash <mbudash@sonic.net> wrote:
>#-------------------------------
>
>i get these results:
>
>#-------------------------------
>145 Main St 001-34562032-100 831
>7002 SPARK PLUG 45345
>7002 SPARK PLUG 234234
>145 Main St 001-6734232-100 831
>7002 SPARK PLUG 4342534523
>#-------------------------------
>
>
>no "lost" data... ??
Michael,
Not me .... <laughs>
#---------------------
145 Main St 001-34562032-100 831
7002 SPARK PLUG 45345
7002 SPARK PLUG 234234
7002 SPARK PLUG 4342534523
#---------------------
$ perl -v
This is perl, v5.6.0 built for aix
Whats up with that ? Any ideas ? Or just an old perl ?
Usual precautions taken with the data input to insure accuracy.
Regards
Bill
--
William R. Mattil | de-moc-ra-cy (di mok' ra see) n. Three
Sr. System Aministrator | wolves and a sheep voting on what's for
(972) 399-4106 | dinner. Unknown
------------------------------
Date: Thu, 01 May 2003 17:25:48 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: complex text/file search. help please!!!
Message-Id: <mbudash-683F97.10254901052003@typhoon.sonic.net>
In article <b8rj2i$7e2$1@news.gte.com>,
wrm@rrscfi1.irngtx.tel.gte.com (William R. Mattil) wrote:
> In article <mbudash-A829B6.09053801052003@typhoon.sonic.net>,
> Michael Budash <mbudash@sonic.net> wrote:
> >#-------------------------------
> >
> >i get these results:
> >
> >#-------------------------------
> >145 Main St 001-34562032-100 831
> >7002 SPARK PLUG 45345
> >7002 SPARK PLUG 234234
> >145 Main St 001-6734232-100 831
> >7002 SPARK PLUG 4342534523
> >#-------------------------------
> >
> >
> >no "lost" data... ??
>
> Michael,
>
> Not me .... <laughs>
>
> #---------------------
> 145 Main St 001-34562032-100 831
> 7002 SPARK PLUG 45345
> 7002 SPARK PLUG 234234
> 7002 SPARK PLUG 4342534523
> #---------------------
>
> $ perl -v
>
> This is perl, v5.6.0 built for aix
>
>
> Whats up with that ? Any ideas ? Or just an old perl ?
> Usual precautions taken with the data input to insure accuracy.
my guess is it's your data (not time to test that guess). i specifically
used formfeeds (^L) as records seps, not formfeed-newline, which gives:
145 Main St 001-34562032-100 831
7002 SPARK PLUG 45345
7002 SPARK PLUG 234234
7002 SPARK PLUG 4342534523
that's my last guess! and the o.p. said it worked for him...
hth-
--
Michael Budash
------------------------------
Date: Thu, 01 May 2003 08:44:41 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: CPAN Solaris problem
Message-Id: <87el3iwzli.fsf@limey.hpcc.uh.edu>
>> On Thu, 01 May 2003 12:15:46 GMT,
>> William Goedicke <goedicke@goedsole.com> said:
> Dear Tony - Tony Curtis <tony_curtis32@yahoo.com>
> writes:
>> Did you put *your* perl somewhere like /usr/local, but
>> CPAN is picking up the perl in /usr/bin/perl which is a
>> (n installed) link to /usr/perl5/bin/perl ?
> I thought of that and checked it.
How are you invoking installation through CPAN?
------------------------------
Date: 01 May 2003 14:39:14 GMT
From: ctcgag@hotmail.com
Subject: Re: Executing a MySQL dump file from within a perl script?
Message-Id: <20030501103914.694$Vd@newsreader.com>
garam@swirve.com (Garam) wrote:
> I have an SQL file created by MySQL dump in the from of:
>
> -- MySQL dump 8.22
> --
> -- Host: localhost Database: database
> ---------------------------------------------------------
> -- Server version 3.23.52
>
> --
> -- Table structure for table 'tablename'
> --
>
> CREATE TABLE tablename (
> ...
>
> It contains a bunch of CREATE TABLE statements. Does anyone know how I
> can execute the statements in this file from within a Perl script
> (preferably using DBI, not by using the shell)?
1) parse out the CREATE TABLE statements.
2) pass them to a DBI database handle execution method.
This seems fairly straight forward. If you have a more specific
question, perhaps I can give a more specific answer.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service New Rate! $9.95/Month 50GB
------------------------------
Date: Thu, 01 May 2003 19:52:26 +0200
From: "Nico Coetzee" <abuse@mweb.co.za>
Subject: Re: Executing a MySQL dump file from within a perl script?
Message-Id: <pan.2003.05.01.17.52.22.144374@mweb.co.za>
From http://www.mysql.com/doc/en/mysqldump.html :
mysqldump --opt database > backup-file.sql
You can read this back into MySQL with:
mysql database < backup-file.sql
or
mysql -e "source /patch-to-backup/backup-file.sql" database
You can ofcourse call these routines from Perl
Cheers
On Wed, 30 Apr 2003 19:04:43 -0700, Garam wrote:
> I have an SQL file created by MySQL dump in the from of:
>
> -- MySQL dump 8.22
> --
> -- Host: localhost Database: database
> ---------------------------------------------------------
> -- Server version 3.23.52
>
> --
> -- Table structure for table 'tablename'
> --
>
> CREATE TABLE tablename (
> ...
>
> It contains a bunch of CREATE TABLE statements. Does anyone know how I
> can execute the statements in this file from within a Perl script
> (preferably using DBI, not by using the shell)?
--
Nico Coetzee
http://www.itfirms.co.za/
http://za.pm.org/
http://forums.databasejournal.com/
To the systems programmer, users and applications serve only to provide a
test load.
------------------------------
Date: 1 May 2003 08:15:01 -0700
From: ernieoporto@yahoo.com (Ernie Oporto)
Subject: mod_perl cannot be loaded?
Message-Id: <40f750f.0305010715.6742e3e0@posting.google.com>
I had attempted to install mod_perl, yet received a warning about not
using mod_perl as a DSO for my setup because of that version of Perl's
malloc pollution. I've successfully performed this under various
other systems, but this is the only one that did not follow the quick
and easy steps. So I created a new Perl install in the web server
area just for this use, but not in /usr/local/bin or /usr/bin which is
our production Perl for the site. After successfully compiling and
installing mod_perl, I get the following when I start the web server.
Some relevant info about my mod_perl setup and Perl version follows.
Does anyone have any recommendations on how I might fix this?
vector.151:/nj/adm/web/conf# /nj/adm/web/bin/apachectl start
Syntax error on line 245 of /nj/adm/web/conf/httpd.conf:
Cannot load /nj/adm/web/libexec/libperl.so into server: ld.so.1:
/nj/adm/web/bin/httpd: fatal: relocation error: file
/nj/adm/web/libexec/libperl.so: symbol main: referenced symbol not
found
/nj/adm/web/bin/apachectl start: httpd could not be started
vector.159:/nj/adm/web/conf# /nj/adm/web/bin/apachectl configtest
Syntax OK
vector.163:/nj/adm/web/conf# which perl
/nj/adm/web/bin/perl
vector.210:~# ls -l /nj/adm/web/libexec/libperl.so
-rwxr-xr-x 1 sysmgr sysadmin 1797184 Apr 30 4:10
/nj/adm/web/libexec/libperl.so*
# for i in `printenv LD_LIBRARY_PATH | sed s/:/\ /g`; do
> find $i -name ld.so.1
> done
/usr/lib/sparcv9/ld.so.1
/usr/lib/ld.so.1
from /nj/adm/web/conf/httpd.conf:
LoadModule perl_module libexec/libperl.so
AddModule mod_perl.c
<IfModule mod_perl.c>
Alias /perl/ /nj/adm/web/content/modperl/
PerlModule Apache::Registry
<Location /perl/>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
PerlSendHeader On
allow from all
</Location>
</IfModule>
vector.224:~# /nj/adm/web/bin/perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1)
configuration:
Platform:
osname=solaris, osvers=2.7, archname=sun4-solaris
uname='sunos vector 5.7 generic_106541-20 sun4u sparc
sunw,ultra-60 '
config_args='-Ubincompat5005 -Duselargefiles -Dcc=gcc
-Dprefix=/nj/adm/web'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.2 19991024 (release)',
gccosandvers='solaris2.7'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc -liconv
perllibs=-lsocket -lnsl -ldl -lm -lc -liconv
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E'
cccdlflags='-fPIC', lddlflags=' -W,l-E -G -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under solaris
Compiled at Apr 30 2003 12:26:06
@INC:
/nj/adm/web/lib/perl5/5.6.1/sun4-solaris
/nj/adm/web/lib/perl5/5.6.1
/nj/adm/web/lib/perl5/site_perl/5.6.1/sun4-solaris
/nj/adm/web/lib/perl5/site_perl/5.6.1
/nj/adm/web/lib/perl5/site_perl
.
------------------------------
Date: 1 May 2003 06:57:00 -0700
From: yuyu.bai@syngenta.com (yu-yu bai)
Subject: Oracle 9i problem
Message-Id: <fcd1a874.0305010557.61e5f93a@posting.google.com>
I have some perl DBI scripts that loaded data into an Oracle 8i
instance without any problem.
I created a copy of my tables in an Oracle 9i instance and tried
to load the same data using those scripts. But I got a bunch of erros
as following:
DBD::Oracle::st execute failed: ORA-01461: can bind a LONG value only
for insert into a LONG column (DBD ERROR: OCIStmtExecute)
Cannot execute:ORA-01461: can bind a LONG value only for insert into a
LONG column (DBD ERROR: OCIStmtExecute)
DBD::Oracle::st execute failed: ORA-03120: two-task conversion
routine: integer overflow (DBD ERROR: OCIStmtExecute)
Cannot execute:ORA-03120: two-task conversion routine: integer
overflow (DBD ERROR: OCIStmtExecute)
Thanks for any help on this.
Yu-yu
------------------------------
Date: 1 May 2003 08:20:45 -0700
From: joeminga@yahoo.com (Domenico Discepola)
Subject: perlcc does not compile when split to array function is used
Message-Id: <698c67f.0305010720.6e57ea1b@posting.google.com>
Hi all. Has anyone encountered this situation when compiling a perl
script using perlcc? If so, how did you fix it?
If I use a split function to populate an array (see commented line in
code below), perlcc does not compile the script. Funny that the
script does run otherwise. I'm running Redhat 8 and perl 5.8.0 for
i386. I tested this "phenomena" in other scripts and got the same
problem.
#######################
#!/usr/bin/perl -w
#Generate comma-seperated list from dir list
@arr01 = `ls / -Fm`;
foreach $FN ( @arr01 ) {
#This is the problem line
@arr02 = split /,/, ${FN};
}
foreach $FN ( @arr02 ) {
printf "${FN}\n";
}
exit 0;
#######################
perlcc error message:
/usr/bin/perlcc: p1.pl did not compile, which can't happen:
Starting compile
Walking tree
Regards,
Domenico Discepola
------------------------------
Date: 1 May 2003 17:48:18 GMT
From: Tina Mueller <usenet@tinita.de>
Subject: Re: perlcc does not compile when split to array function is used
Message-Id: <b8rml1$cpeq3$1@ID-24002.news.dfncis.de>
Domenico Discepola <joeminga@yahoo.com> wrote:
> Hi all. Has anyone encountered this situation when compiling a perl
> script using perlcc? If so, how did you fix it?
i haven't, but you might want to use the PAR-module to
convert your script into a binary. it's easy to
use, as it comes with a script, so you don't actually
have to use the module, just call the script.
hth, tina
--
http://www.tinita.de/ \ enter__| |__the___ _ _ ___
http://Movies.tinita.de/ \ / _` / _ \/ _ \ '_(_-< of
http://www.perlquotes.de/ \ \ _,_\ __/\ __/_| /__/ perception
http://www.tinita.de/peace/link.html - Spread Peace
------------------------------
Date: Thu, 01 May 2003 15:32:58 GMT
From: "--Rick" <no_trick@my-de(remove the obvious)ja.com>
Subject: Re: Test::Harness annoyance + perldoc format
Message-Id: <K6bsa.61288$cO3.4102521@bgtnsc04-news.ops.worldnet.att.net>
"--Rick" <no_trick@my-de(remove the obvious)ja.com> wrote in message
news:pXxra.130701$ja4.5739234@bgtnsc05-news.ops.worldnet.att.net...
| | > This sounds like a cousin to the problem I reported a couple of
| months
| | back:
| | > That when I installed ActivePerl 8.0 (Perl 5.8.0) on Win95, I
got
| screwy
| | > results in the console when I called 'perldoc'. The solution
| (short of
| | > installing arcane patches) was to wait till I was upgraded to
| Win2K before
| | > installing 5.8.
|
| That one was related to the interaction of the OS pager and perldoc.
|
| One of the work-arounds was to install less.exe on the Win98
machine,
| and set pager to it in the environment. I used that on my console
at
| work.
|
| The other was to install a module that contains an earlier version
of
| perldoc. I'll have to look it up and report the module name. I did
| that on my console at home.
The module was Pod::Perldoc. For ActiveState users: PPM>install
Pod::Perldoc is all it takes and it even sets up the perldoc.bat file
for you. After installation perldoc is readable again.
| Both work fine.
|
| This was discussed in a perlbug report and the module name may also
| have been listed there. Joseph Newton was one of the primary
| participants in the discussion.
Correction here: The name was Phillip Newton. Sorry for the mix_up.
--Rick
------------------------------
Date: Thu, 01 May 2003 13:06:47 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: What is the best software to run for an aspiring Perl programer?
Message-Id: <pk62bv8mq9mhbhh6once4ovo21f6m05aua@4ax.com>
Keywords: Remove WINDOZE to reply
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
In a fit of excitement on 30 Apr 2003 11:51:32 -0700,
dalgould@hotmail.com (dalgould) managed to scribble:
> Hello,
>
> I have a question for anyone who may be able to answer.
> What is the best and most avaiable way of testing my perl script
> from my computer itself and not from my web server. I would like
> to test my perl script locally on my computer first. What is the
> best
> software to run for an aspiring Perl programer, on my home
> computer?
>
> Im getting a little tired of uploading my perl script to my
> CGI-directory over and over just to debug my script.
>
> thank you in advance for any advice or tips!
>
Hmm, some of the replies here are a little "choice" especially as you
state, you're new to the language =)
My _personal_ suggestion, would be to download a copy of Apache from
http://httpd.apache.org/ and if on a windoze platform, ActiveState
Perl (www.activestate.com). Neither are hard to configure to get you
setup basically (both are windoze installers if that platform is
required, or a general unix untar ./configure etc for *nix).
You might also consider dropping over to www.mysql.com too and grab a
MySQL server and install that (is easy too, even for a beginner =) ).
With this "lil lot", you're could, if desired, run your complete site
from your local box, permanently, or like I do, develop all my code
locally with a working server solution as described above, and then
upload the complete site (or large chunks of as I go) to my server.
HTH.
Regards,
Ian
-----BEGIN xxx SIGNATURE-----
Version: PGP 8.0
iQA/AwUBPrEbfmfqtj251CDhEQIRbQCgp0s8YWVWGK9UINrKTfssKVEsNu8Anj3s
M1GLPc5Ji2QtBLq2jliKmFEl
=OQrr
-----END PGP SIGNATURE-----
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Scripting, Web design, development & hosting.
------------------------------
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 4921
***************************************