[17025] in Perl-Users-Digest
Perl-Users Digest, Issue: 4437 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 26 18:15:52 2000
Date: Tue, 26 Sep 2000 15:15:38 -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: <970006538-v9-i4437@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 26 Sep 2000 Volume: 9 Number: 4437
Today's topics:
Questions about space-saving techniques (James Weisberg)
Re: Questions about space-saving techniques <godzilla@stomp.stomp.tokyo>
Re: Questions about space-saving techniques <tim@ipac.caltech.edu>
Re: Questions about space-saving techniques <bkennedy@hmsonline.com>
Salary Range for Perl Programmers stepheneko@my-deja.com
Salary Range for Perl Programmers steveko@home.com
Re: Salary Range for Perl Programmers <ronnie@catlover.com>
Re: Salary Range for Perl Programmers (Jerome O'Neil)
Re: Salary Range for Perl Programmers <roger.atkinson@cubic.com>
Re: Salary Range for Perl Programmers <sariq@texas.net>
Re: Salary Range for Perl Programmers <russ_jones@rac.ray.com>
Re: sendmail <anmcguire@ce.mediaone.net>
Re: Storable compile error on AIX 4.2 (Jens-Uwe Mager)
Syslog module problems <fs.mail@wanadoo.be>
Re: Thnaks to the Gurus! <russ_jones@rac.ray.com>
Re: Uncaught exception question <ren.maddox@tivoli.com>
Re: Uncaught exception question <dbohl@sgi.com>
Undefined subroutine? (My first XSUB isn't working!) <eric.kort@vai.org>
Re: Undefined subroutine? (My first XSUB isn't working <randy@theoryx5.uwinnipeg.ca>
Re: Win32::API needs help <perin@panix.com>
WorkFromWhereYouARE-PERL-JAVA-JS-CSS-DreamWeaver PerlTelecommuter@PerlJavaGlobal.com
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 26 Sep 2000 18:11:59 GMT
From: chadbour@wwa.com (James Weisberg)
Subject: Questions about space-saving techniques
Message-Id: <PF5A5.4929$l35.113204@iad-read.news.verio.net>
I'm in the process of using MLDBM to use multidimensional ties to
a DB_File database and I'm wondering if someone can lend some ideas on
how to tackle some memory space issues. Each record in my database is
looked up using three keys: $date, $object, and $interval and the record
itself is an array of 40 integers.
With this paradigm, the databases on the hard disk do not get very
large and I'm satisfied with the result. But when it comes to pulling
records out of the databases (one for each day) into a large hash, I
find that it is taking quite a bit of memory. When I tie this hash to
a database, it looks like:
@{$DB{$date}{$object}{$interval}} = @record;
where record is the 40-integer record described above. So what I
am hoping to do is to pack those 40 fields into a tighter data structure
in memory and then pull them out as needed in the data processing routines.
I'm looking at both pack() and vec() but I am confused on how to go
about using them to serve this purpose. One problem is that the fields
of @record are not always defined. Currently, the data processing routines,
when they encounter an undefined element in @record, can skip over it and
then later when output packets are created, I can substitute a "-1" for
the undefined values. What I would like to do is squeeze the fields of
@record into a tighter entity to save space, if possible, and then pull
fields back out as neccessary to create these packets.
For example, if I originally have a record:
@record = (20000306,10,,20,...);
is there a way to store this record more compactly and then later
arrange for @record to be re-created for the data processing routines?
Note here that $record[2] is undefined and $record[1] + $record[3] = 30.
The goal is to store many records (perhaps several thousand) in memory
after reading records from the database(s), and then set about processing
those records. As I only need to process one record at a time, if I could
store them in such a way that they are very compact until they need to be
split out into fields, that would be *most* economical in terms of memory,
though at the cost of some processing time.
Thanks for any ideas/insights.
--
World's Greatest Living Poster
------------------------------
Date: Tue, 26 Sep 2000 12:41:13 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Questions about space-saving techniques
Message-Id: <39D0FBD9.AE88A6F9@stomp.stomp.tokyo>
James Weisberg wrote:
(misc snippage)
> I'm in the process of using MLDBM to use multidimensional ties to
> a DB_File database and I'm wondering if someone can lend some ideas on
> how to tackle some memory space issues. Each record in my database is
> looked up using three keys: $date, $object, and $interval and the record
> itself is an array of 40 integers.
> For example, if I originally have a record:
> @record = (20000306,10,,20,...);
> is there a way to store this record more compactly and then later
> arrange for @record to be re-created for the data processing routines?
> Note here that $record[2] is undefined and $record[1] + $record[3] = 30.
Well, I see a way to save a significant amount of space
per each data base line, right off.
My presumption is " 20000306 " represents March 6 2000
Delete your zeroes save for the year. Knock it down to one zero:
2036
Allowing for variable space padding, right there you
have saved fifty percent just in your date alone.
You show 10 and 20. If these values will always be
over nine, 10 to 99, 100 to 999, and so forth, delete
those zeroes. They are not needed,
1 to 9 is actually 10 to 99
10 to 99 is actually 100 to 999
There ya go. Another fifty percent savings for those variables.
Without more examples of your data, I can only use examples.
Should you be storing URL addresses, as an example, suffixes
such as .com , .net , .org , .mil etc... can be represented
by a single unique character.
Ç = .com
Ò = .org
Right on down the line to cover for all known server suffixes,
including two letter country suffixes. Reducing a three character
suffix to one, is a savings of sixty-six percent, two characters
down to one, being a savings of fifty percent. Lots of space saved
by this method of symbolically representing repeating strings. You
indicate a series of digits. Same principle applies for digits.
One hundred could be " C ".
One thousand could be " M ".
This is simplified of course. However, finding those common
letters mixed in with pure numbers, would not be a problem;
they would not be confusing to your script.
Rather than try to modify your manipulation code, look at your
data base with logical imagination, and work on compressing
your data base as much as possible with symbolic representation
along with knocking out zeroes where not needed. I wouldn't be
surprised, if you work at this, if you could reduce your overall
data base size by one-third or more.
Incidently, you can represent delimiters symbolic. A little tricky
on the coding. However, if your program detects you will have or
do have ten empty fields, during data base creation, have your program
print a symbol, " ç1 ", symbolically representing "comma times ten".
easy enough to plug in ten commas before splitting your line to
pull variables. Lots of space saving there, yes?
ç5 = "," x 5;
ç1 = "," x 10;
ç2 = "," x 20;
Simple matter of substituting these in before a split.
Hmm.. ten down to two, is an eighty percent savings,
twenty down to two is, well, a lot of space saved.
Have fun,
Godzilla!
--
Dr. Kiralynne Schilitubi ¦ Cooling Fan Specialist
UofD: University of Duh! ¦ ENIAC Hard Wiring Pro
BumScrew, South of Egypt ¦ HTML Programming Class
------------------------------
Date: Tue, 26 Sep 2000 13:44:11 -0700
From: Tim Conrow <tim@ipac.caltech.edu>
Subject: Re: Questions about space-saving techniques
Message-Id: <39D10A9B.7A0122D9@ipac.caltech.edu>
> For example, if I originally have a record:
>
> @record = (20000306,10,,20,...);
>
> is there a way to store this record more compactly and then later
> arrange for @record to be re-created for the data processing routines?
> Note here that $record[2] is undefined and $record[1] + $record[3] = 30.
$record = pack "l*", map {defined $_ ? $_ : -1} @record;
@record = unpack "l*", map {$_ != -1 ? $_ : undef} $record;
A more detailed, specific template than "l*" could save more memory. E.g. for
numbers <= 65535, you can use 'S' instead of 'l' (since you imply all numbers
will be positive). If <= 255, you can use 'C'.
A good chunk of the memory being used may be the hash structures holding these
records. You'll have to get more exotic with your data structure if that turns
out to be a problem.
--
-- Tim Conrow tim@ipac.caltech.edu |
------------------------------
Date: Tue, 26 Sep 2000 21:31:28 GMT
From: "Ben Kennedy" <bkennedy@hmsonline.com>
Subject: Re: Questions about space-saving techniques
Message-Id: <QA8A5.9129$td5.1542660@news1.rdc2.pa.home.com>
"James Weisberg" <chadbour@wwa.com> wrote in message
news:PF5A5.4929$l35.113204@iad-read.news.verio.net...
described above. So what I
> am hoping to do is to pack those 40 fields into a tighter data structure
> in memory and then pull them out as needed in the data processing
routines.
> I'm looking at both pack() and vec() but I am confused on how to go
> about using them to serve this purpose
To use pack and unpack, you could loop through the record array, and
depending on the size of the number use the appropriate template. This
avoids packing a small number (say 10) into a 4 byte long, since only one
byte is really necessary. Assuming unsigned numbers -
sub rec_compress {
my(@array) = @_;
my @back;
foreach my $num (@array) {
if ($num eq '') {
push @back, '';
} elsif ($num < 0) {
die "No negative numbers\n";
} elsif ($num < 256) {
push @back, pack('C',$num);
} elsif ($num < 65536) {
push @back, pack('S',$num);
} elsif ($num < 4294967296) {
push @back, pack('L',$num);
} else {
die "Number too large\n";
}
}
return @back;
}
and then to uncompress a record, look at the length of the data to determine
what was used to pack it in
sub rec_uncompress {
my(@array) = @_;
my @back;
foreach my $num (@array) {
if (length($num) == 1) {
push @back, unpack('C',$num);
} elsif (length($num) == 2) {
push @back, unpack('S',$num);
} elsif (length($num) == 4) {
push @back, unpack('L',$num);
} else {
push @back, '';
}
}
return @back;
}
There also may be some applicable modules at CPAN, seach for Compress at
www.cpan.org.
--Ben Kennedy
------------------------------
Date: Tue, 26 Sep 2000 18:00:48 GMT
From: stepheneko@my-deja.com
Subject: Salary Range for Perl Programmers
Message-Id: <8qqo8a$61i$1@nnrp1.deja.com>
I have a performance review Thursday 9/28/00 and
my supervisor asked me to come up with a
suggested raise. I'm highly valued at my company
and have been involved with many of the key
projects here. He pretty much said something
along the lines of he'll try to get me whatever I
ask for, but of course I'd like to come up with a
fair and realistic figure.
I'm located in San Diego. I started at 50,000 and
have just completed my first year there. Any
suggestions on how much I should ask for?
P.S. I'm also looking for someone who would be
interested in helping me improve my Perl coding
techniques. I'm completely self taught and
probably do quite a few things sloppily. This
should be a very easy task for advanced Perl
programmers. If you have a PayPal account and
might be interested, please send me email to
steveko@home.com
Thanks,
Steve
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 26 Sep 2000 18:04:19 GMT
From: steveko@home.com
Subject: Salary Range for Perl Programmers
Message-Id: <8qqoes$63o$1@nnrp1.deja.com>
I have a performance review Thursday 9/28/00 and my supervisor asked me
to come up with a suggested raise. I'm highly valued at my company and
have been involved with many of the key projects here. He pretty much
said something along the lines of he'll try to get me whatever I ask
for, but of course I'd like to come up with a fair and realistic figure.
I'm located in San Diego. I started at 50,000 and have just completed
my first year there. Any suggestions on how much I should ask for?
P.S. I'm also looking for someone who would be interested in helping me
improve my Perl coding techniques. I'm completely self taught and
probably do quite a few things sloppily. This should be a very easy
task for advanced Perl programmers. If you have a PayPal account and
might be interested, please send me email to steveko@home.com
Thanks,
Steve
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 26 Sep 2000 15:29:32 -0400
From: "Ron Grabowski" <ronnie@catlover.com>
Subject: Re: Salary Range for Perl Programmers
Message-Id: <8qqtcq$hmn$1@news.cis.ohio-state.edu>
>P.S. I'm also looking for someone who would be
>interested in helping me improve my Perl coding
>techniques. I'm completely self taught and
>probably do quite a few things sloppily. This
Why not post some code on a web page and let people critique it for free?
Reading the newsgroups and looking at sources for better known modules might
help too.
------------------------------
Date: Tue, 26 Sep 2000 19:45:50 GMT
From: jerome@activeindexing.com (Jerome O'Neil)
Subject: Re: Salary Range for Perl Programmers
Message-Id: <O17A5.526$DU6.145393@news.uswest.net>
stepheneko@my-deja.com elucidates:
> I'm located in San Diego. I started at 50,000 and
> have just completed my first year there. Any
> suggestions on how much I should ask for?
Ask him to double it. Or tripple it.
The worst he can do is say no.
--
"Civilization rests on two things: the discovery that fermentation
produces alcohol, and the voluntary ability to inhibit defecation.
And I put it to you, where would this splendid civilization be without
both?" --Robertson Davies "The Rebel Angels"
------------------------------
Date: Tue, 26 Sep 2000 13:22:45 -0700
From: Roger Atkinson <roger.atkinson@cubic.com>
Subject: Re: Salary Range for Perl Programmers
Message-Id: <39D10595.622D6C67@cubic.com>
IMHO your way under paid for this area. Having said that I'd say $50K
for a first year is not bad. You should be making upwards of $60K as
long as you are doing more than just PERL coding. Here is my suggestion,
take it for what it's worth:
1) Ask for a 20% pay raise.
or
2) Demand a 10% pay raise with a guaranteed training budget and go take
some of the seminars or courses at UCSD. I went to a two day PERL class
there and while it was designed for the beginner, I know they have some
very good PERL coders there. The two day class cost me (my company) $412
($12 for parking at the Super Computer Center) and I found it well worth
the while. The instructor I had wrote a PERL program called "mktalk"
which builds an HTML formatted presentation including links and graphics
connections. Awesome program for a PERL Script ! The students all
followed the presentation as well as wrote our own scripts on SGI Indigo
Impact workstations. It was great !
BTW You should take all of the above with a grain of salt depending on
how much you like where you are and how short your commute is. Good pay
is nice but it isn't everything when you live this close to the beach
:-)
Cheers, Roger A.
stepheneko@my-deja.com wrote:
>
> I have a performance review Thursday 9/28/00 and
> my supervisor asked me to come up with a
> suggested raise. I'm highly valued at my company
> and have been involved with many of the key
> projects here. He pretty much said something
> along the lines of he'll try to get me whatever I
> ask for, but of course I'd like to come up with a
> fair and realistic figure.
>
> I'm located in San Diego. I started at 50,000 and
> have just completed my first year there. Any
> suggestions on how much I should ask for?
>
> P.S. I'm also looking for someone who would be
> interested in helping me improve my Perl coding
> techniques. I'm completely self taught and
> probably do quite a few things sloppily. This
> should be a very easy task for advanced Perl
> programmers. If you have a PayPal account and
> might be interested, please send me email to
> steveko@home.com
>
> Thanks,
>
> Steve
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Tue, 26 Sep 2000 20:39:12 GMT
From: Tom Briles <sariq@texas.net>
Subject: Re: Salary Range for Perl Programmers
Message-Id: <39D109C2.3A542C05@texas.net>
Roger Atkinson wrote:
>
> I went to a two day PERL class
> there and while it was designed for the beginner, I know they have some
> very good PERL coders there. The two day class cost me (my company) $412
> ($12 for parking at the Super Computer Center) and I found it well worth
> the while.
Any class that allows its students to leave calling 'Perl' 'PERL' isn't
worth two cents, much less four hundred bucks.
- Tom
------------------------------
Date: Tue, 26 Sep 2000 16:06:48 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Salary Range for Perl Programmers
Message-Id: <39D10FE8.CD734129@rac.ray.com>
Tom Briles wrote:
>
> Any class that allows its students to leave calling 'Perl' 'PERL' isn't
> worth two cents, much less four hundred bucks.
>
I'd hope that any programming class that cost four hundred bucks would
concentrate on programming and ignore a bit of arcane trivia that has
no practical value to a working Perl programmer and is useful only to
the cognoscenti who wish to lord their superior knowledge over the
less fortunate.
--
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, 26 Sep 2000 13:26:12 -0500
From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
Subject: Re: sendmail
Message-Id: <Pine.LNX.4.21.0009261323500.17425-100000@hawk.ce.mediaone.net>
On Tue, 26 Sep 2000, ldbarlet quoth:
l> Can anyone point me in the right direction to learn how to use sendmail to
l> send email in html format?
I do not know what on earth you would post this in a Perl newsgroup for,
but sendmail will deliver email in HTML format without any modifications,
you just have to have an MUA capable of rendering it.
anm
--
# Andrew N. McGuire
my $j = [ [ qw+ 4A 75 73 74 20 61 0 +] => [ qw+ 6E 6F 74 68 65 72 0 + ] =>
,,,,,,,,, [ qw+ 20 50 65 72 6C 20 0 +] => [ qw+ 48 61 63 6B 65 72 A + ] ];
;;;;;;;;; print map chr(hex()) => map @$_ => map @$j->[$_-0xA], 0xA .. 0xD
------------------------------
Date: 26 Sep 2000 19:01:24 GMT
From: jum@anubis.han.de (Jens-Uwe Mager)
Subject: Re: Storable compile error on AIX 4.2
Message-Id: <slrn8t1so6.oo.jum@anubis.han.de>
On Mon, 25 Sep 2000 18:35:39 GMT, abdissa_aga@my-deja.com <abdissa_aga@my-deja.com> wrote:
>Attempting to build Storable version 0.7 on AIX 4.2 results in
>compilation error. I have no problem building it on Solaris and HP-UX.
>I ca build it using gcc, I must use the native xlc compiler that I
>invoked as "cc_r4". Can some tell me if I'm missing a compiler option?
>Here is the error:
>
>cp Storable.pm blib/lib/Storable.pm
>AutoSplitting blib/lib/Storable.pm (blib/lib/auto/Storable)
>blib/lib/Storable.pm: some names are not unique when truncated to 8
>characters:
> directory blib/lib/auto/Storable:
> retrieve.al, retrieve_fd.al truncate to retrieve
>/build/AIX/perlext/exports/bin/perl
>"-I/build/AIX/perlext/exports/lib/perl5/arch"
>"-I/build/AIX/perlext/exports/lib/perl5" -e 'use Ex
>tUtils::Mksymlists; \
>Mksymlists("NAME" => "Storable", "DL_FUNCS" => { }, "FUNCLIST" => [],
>"DL_VARS" => []);'
>/build/AIX/perlext/exports/bin/perl
>-I/build/AIX/perlext/exports/lib/perl5/arch
>-I/build/AIX/perlext/exports/lib/perl5 /build/AIX/per
>lext/exports/lib/perl5/ExtUtils/xsubpp -typemap
>/build/AIX/perlext/exports/lib/perl5/ExtUtils/typemap Storable.xs >
>Storable.xsc &&
>mv Storable.xsc Storable.c
>cc_r4 -c -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
>-I/usr/local/include -O -DVERSION=\"0.702\" -DXS_VERSION=
>\"0.702\" -I/build/AIX/perlext/exports/lib/perl5/arch/CORE Storable.c
>"Storable.xs", line 35.20: 1506-342 (W) "/*" detected in comment.
>"Storable.xs", line 36.20: 1506-342 (W) "/*" detected in comment.
>"Storable.xs", line 644.12: 1506-131 (S) Explicit extent specification
>or initializer required for an auto or static array.
>"Storable.xs", line 647.11: 1506-131 (S) Explicit extent specification
>or initializer required for an auto or static array.
>"Storable.xs", line 648.11: 1506-131 (S) Explicit extent specification
>or initializer required for an auto or static array.
>make: *** [Storable.o] Error 1
First you _must_ use the same C compiler perl was built with, you cannot
mix different thread runtime models in one process. And Storable uses a
few questionable constructs that the IBM C compiler refuses to compile.
I changed my Storable with the patch below to make it compile:
--- old/Storable-0.7.0/Storable.xs Fri Aug 4 00:05:07 2000
+++ Storable-0.7.0/Storable.xs Fri Aug 18 23:40:46 2000
@@ -626,11 +626,11 @@
static int store();
static SV *retrieve();
-static int (*sv_store[])();
+static int (*sv_store[6])();
#define SV_STORE(x) (*sv_store[x])
-static SV *(*sv_old_retrieve[])();
-static SV *(*sv_retrieve[])();
+static SV *(*sv_old_retrieve[22])();
+static SV *(*sv_retrieve[22])();
static SV *mbuf2sv();
/***
@@ -1809,7 +1809,7 @@
*/
if (!count) {
- static int store_blessed();
+ int store_blessed();
/*
* They must not change their mind in the middle of a serialization.
--
Jens-Uwe Mager <pgp-mailto:62CFDB25>
------------------------------
Date: Tue, 26 Sep 2000 23:04:15 +0200
From: "Frank Sonnemans" <fs.mail@wanadoo.be>
Subject: Syslog module problems
Message-Id: <20000926.230415.656@scuba.sbs-online.com>
I tried to set the logmask priority using the following:
use Sys::Syslog require 'syslog.ph'
$maskpri = &LOG_UPTO(&LOG_WARNING);
$oldmask = setlogmask($maskpri);
However I continuously get "&main::LOG_WARNING not defined". What am I
doing wrong. I checked syslog.ph and it does define the LOG_WARNING
function.
Thanks in advance for your assistence.
FS
------------------------------
Date: Tue, 26 Sep 2000 14:41:45 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Thnaks to the Gurus!
Message-Id: <39D0FBF9.DD55CF33@rac.ray.com>
Craig Berry wrote:
>
> Uri Guttman (uri@sysarch.com) wrote:
> : from memory (too lazy to reach over and look):
> :
> : loop: see loop.
>
> CS 101 professor: "In order to discuss recursion, we must first discuss
> recursion." You could spot the students who were going to ace the class;
> they laughed. :)
>
That was actually in one release of an IBM terms and acronyms
dictionary.
recursion: see recursion.
It was changed to something that wasn't nearly as entertaining in the
next release. Seems like it was also in what's his name's Devil's DP
Dictionary.
--
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: 26 Sep 2000 14:37:49 -0500
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: Uncaught exception question
Message-Id: <m31yy7rlki.fsf@dhcp11-177.support.tivoli.com>
Dale Bohl <dbohl@sgi.com> writes:
> Can anyone tell me what the below
> Uncaught exception from user code: error means? I've
> done some looking at the diags but did not see anything
> there for it. Any help is greatly appretiated.
>
> Improper link???
>
>
> Line 125 is
> rename ($tmpfile2, $filename) or die "Can't rename $tmpfile2 to
> $filename: $!";
>
>
> $tmpfile2 is /tmp/tmpfile2
> $filename is /export/home/cheetah1/heilmann/public_html/SN1/fs/index.htm
Here is a (possibly) relevant excerpt from "perldoc -f rename":
Behavior of this function varies wildly depending
on your system implementation. For example, it
will usually not work across file system
boundaries, even though the system mv command
sometimes compensates for this. Other
restrictions include whether it works on
directories, open files, or pre-existing files.
Check the perlport manpage and either the
rename(2) manpage or equivalent system
documentation for details.
The send up of this is, don't count on rename being able to move files
between directories. The File::Copy module can help to get around the
problem.
> Uncaught exception from user code:
> Can't rename /tmp/tmpfile2 to
> /export/home/cheetah1/heilmann/public_html/SN1/fs/index.htm: Improper
> link at ./chgword_homes line 125.
> main::replace() called at ./chgword_homes line 90
> main::search() called at ./chgword_homes line 56
> main::getfiles() called at ./chgword_homes line 28
I do not know what this specific error ("Improper link") means.
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Tue, 26 Sep 2000 15:23:12 -0500
From: Dale Bohl <dbohl@sgi.com>
Subject: Re: Uncaught exception question
Message-Id: <39D105B0.1CE12721@sgi.com>
Ren Maddox wrote:
>
> Dale Bohl <dbohl@sgi.com> writes:
>
> > Can anyone tell me what the below
> > Uncaught exception from user code: error means? I've
> > done some looking at the diags but did not see anything
> > there for it. Any help is greatly appretiated.
> >
> > Improper link???
> >
> >
> > Line 125 is
> > rename ($tmpfile2, $filename) or die "Can't rename $tmpfile2 to
> > $filename: $!";
> >
> >
> > $tmpfile2 is /tmp/tmpfile2
> > $filename is /export/home/cheetah1/heilmann/public_html/SN1/fs/index.htm
>
> Here is a (possibly) relevant excerpt from "perldoc -f rename":
>
> Behavior of this function varies wildly depending
> on your system implementation. For example, it
> will usually not work across file system
> boundaries, even though the system mv command
> sometimes compensates for this. Other
> restrictions include whether it works on
> directories, open files, or pre-existing files.
> Check the perlport manpage and either the
> rename(2) manpage or equivalent system
> documentation for details.
>
> The send up of this is, don't count on rename being able to move files
> between directories. The File::Copy module can help to get around the
> problem.
>
> > Uncaught exception from user code:
> > Can't rename /tmp/tmpfile2 to
> > /export/home/cheetah1/heilmann/public_html/SN1/fs/index.htm: Improper
> > link at ./chgword_homes line 125.
> > main::replace() called at ./chgword_homes line 90
> > main::search() called at ./chgword_homes line 56
> > main::getfiles() called at ./chgword_homes line 28
>
> I do not know what this specific error ("Improper link") means.
>
> --
> Ren Maddox
> ren@tivoli.com
Ren,
Thanks for the info...I suspect the file system
boundaries problem is in fact what was happening...I'm
using a system call to the UNIX "mv" command now
with no problems...this says to me it might or might not
work. I've been pulling my hair out for 2 days with
this one.
--
Thanks,
Dale
Dale Bohl
SGI Information Services
dbohl@sgi.com
(715)-726-8406
http://wwwcf.americas.sgi.com/~dbohl/
JAPH
------------------------------
Date: Tue, 26 Sep 2000 15:38:44 -0400
From: "Eric" <eric.kort@vai.org>
Subject: Undefined subroutine? (My first XSUB isn't working!)
Message-Id: <8qqtrd$1dg1$1@msunews.cl.msu.edu>
I have created an XSUB called Test using swig, which defines Test::foo (a
simple first experiment that just adds two numbers together). When I try to
call it like this:
#!/usr/bin/perl
use Test;
$a=1;
$b=2;
$x=Test::foo($a, $b);
print "$x\n";
exit;
I get this:
Undefined subroutine &Test::foo called at try.pl line 5.
Here is my mylib.c:
#include <stdlib.h>
#include "./mylib.h"
double
foo (a, b)
int a;
long b;
{
return (a + b);
}
Here is mylib.h:
#define TESTVAL 4
extern double foo(int, long);
And here is mytest.i
%module Test
%{
#include "/home/erikor/Mytest/mylib/mylib.h"
%}
%include /home/erikor/Mytest/mylib/mylib.h
I then used swig -perl5 Mytest.i, then perl Makefile.PL, then make, then
make install. All seemed to go fine, and Test.so, mytest.c, Test.pm, etc.
were installed as expected. The script can find Test.pm, but won't execute
foo.
Can anyone help me out? What am I doing wrong?
------------------------------
Date: 26 Sep 2000 20:39:26 GMT
From: Randy Kobes <randy@theoryx5.uwinnipeg.ca>
Subject: Re: Undefined subroutine? (My first XSUB isn't working!)
Message-Id: <8qr1hu$msv$1@canopus.cc.umanitoba.ca>
In comp.lang.perl.misc, Eric <eric.kort@vai.org> wrote:
> I have created an XSUB called Test using swig, which defines Test::foo (a
> simple first experiment that just adds two numbers together). When I try to
> call it like this:
> #!/usr/bin/perl
> use Test;
> $a=1;
> $b=2;
> $x=Test::foo($a, $b);
> print "$x\n";
> exit;
> I get this:
> Undefined subroutine &Test::foo called at try.pl line 5.
[ ... ]
> And here is mytest.i
> %module Test
> %{
> #include "/home/erikor/Mytest/mylib/mylib.h"
> %}
> %include /home/erikor/Mytest/mylib/mylib.h
Hi,
Perhaps it's my version of swig, but I need quotes
around "/home/erikor/Mytest/mylib/mylib.h" in that last line.
> I then used swig -perl5 Mytest.i, then perl Makefile.PL, then make, then
> make install. All seemed to go fine, and Test.so, mytest.c, Test.pm, etc.
> were installed as expected. The script can find Test.pm, but won't execute
> foo.
> Can anyone help me out? What am I doing wrong?
I tried this out, and it worked as expected. A couple of things
perhaps to try ...
- in the directory where you built things, if you say
perl -Mblib test.pl
(ie, run your test.pl script using the 'blib' directory created during
the build), does it work?
- there is a standard perl module 'Test' that you may be
picking up before your own 'Test' module. Try either adjusting
@INC to pick up your module first, or else change your module's
name to something other than 'Test'.
best regards,
randy kobes
------------------------------
Date: 26 Sep 2000 14:20:01 -0400
From: Lewis Perin <perin@panix.com>
Subject: Re: Win32::API needs help
Message-Id: <pc7og1bj9ri.fsf@panix2.panix.com>
"Lucas" <wstsoi@hongkong.com> writes:
> Hi all,
>
> Actually I have posted a help 10 days ago here about the same problem,
> but I couldn't get any replys, so I guess I did not state my problem
> clear enough and post here again today.
> I am going to call fuctions from a DLL, but it went something
> wrong in the output, so I need Perl guys here to help me.
>
> The functions are:
> int initTTS(char *dataPath, short gender);
> int spkTTS(char *string, double sentenceRate, short gender);
> void termTTS(void);
>
> So I wrote a Perl script to call them:
> >>>>>>>>>>>>>>>>>>>>>
> use Win32::API;
> $the_string = "a sentence here";
> $initTTS = new Win32::API("cutalk", "initTTS", [P, I], I);
> $spkTTS = new Win32::API("cutalk", "spkTTS", [P, N, I], I);
> $termTTS = new Win32::API("cutalk", "termTTS", [], V);
>
> if ($initTTS->Call('d:\\ctts_dll\\datafile',1) == 1 ){
> print "initTTS ok, ready to go\n";
> }
> if ( ($spkTTS->Call($the_string, 2, 1)) == 1) {
> print "SpkTTS returned 1";}
> else {
> print "returned 0";
> }
>
> $termTTS->Call();
> >>>>>>>>>>>>>>>>>>>>>
> As for the outputs, no any warning messages are returnrd.
> However, the output is not correct (the DLL is a TTS Text to
> Speech agent that could speak the sentence), just something
> liked twisted speaking.
>
> Could anyone figure out what I am going wrong here?
> Thanks very very much.
When you call the DLL functions you're passing them Perl strings,
which are *not* the same as C strings. Read the Win32::API
documentation again with special attention to the use of pack.
/Lew
--
Lew Perin / perin@mail.med.cornell.edu / perin@acm.org
www.panix.com/~perin/
------------------------------
Date: 26 Sep 2000 14:01:36 -0500
From: PerlTelecommuter@PerlJavaGlobal.com
Subject: WorkFromWhereYouARE-PERL-JAVA-JS-CSS-DreamWeaver
Message-Id: <39d0f290@post.newsfeeds.com>
*** post for free via your newsreader at post.newsfeeds.com ***
*** TELE COMMUTE ONLY ****
WEB PAGE PROGRAMMER
HIGH EXPERIENCE WITH DREAMWEAVER PREFERRED
KNOWLEDGE OF DHTML AND CSS CAPABILITIES OF DREAMWEAVER A+
KNOWLEDGE OF WINDOWS NT 4.0 IIS (server) A+
KNOWLEDGE OF WEB PROGRAMMING: PERL / CGI / JavaScript A +
Knowledge of programming: C / Java A+
15 TO 40 HOURS PER WEEK
$15.00 to $25.00 per hour commensurate with experience.
Using a Remote Control software utility called TIMBUKTU,
2 people can work on the same computer simultaneously.
Specific "Log-On' Schedule required. Flexible.
Prefer Mornings (PST), but afternoons, ok.
2 to 3 hours per remomte 'log-on' session.
2 to 3 times per week.
Timbuktu has an audio channel and chat features.
High-Bandwidth Not necessary, but PREFERRED.
Some work done off-line, but this is PRIMARILY a
real-time, log-on position. Instead of having a
specific schedule at an office, a specific computer
log-on schedule is required.
Please respond directly to:
TeleComMuter@Law.com
**** Post for FREE via your newsreader at post.newsfeeds.com ****
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Newsfeeds.com - The #1 Usenet Newsgroup Service on The Planet! ***
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
http://www.newsfeeds.com | http://www.newsfeeds.com
|
* Anonymous posting server! | * Totally Uncensored!
* SUPER Servers! | * Over 80,000 Newsgroups!
* BINARIES ONLY Servers! | * 16 seperate Newsgroup Servers!
* SPAM FILTERED Server! | * Instant access!
* ADULT ONLY Server! | * Multiple OC 3's and OC 12's!
* MP3 ONLY Server! | * 99% Article Completion!
* MULTIMEDIA ONLY Server! | * Months of Retention!
* 7 UNCENSORED Newsgroup Servers | * Lightning FAST downloads!
|
http://www.newsfeeds.com | http://www.newsfeeds.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
**** Point your newsreader to post.newsfeeds.com ****
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
------------------------------
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 4437
**************************************