[18889] in Perl-Users-Digest
Perl-Users Digest, Issue: 1057 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 4 18:11:32 2001
Date: Mon, 4 Jun 2001 15:10:22 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <991692622-v10-i1057@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 4 Jun 2001 Volume: 10 Number: 1057
Today's topics:
Perl and SHTML <nospam@newsranger.com>
Re: Perl Script <godzilla@stomp.stomp.tokyo>
Re: perl/cgi and dynamic hyperlink <buggs-clpm@splashground.de>
Re: perl/cgi and dynamic hyperlink (Randal L. Schwartz)
Re: perl/cgi and dynamic hyperlink <buggs-clpm@splashground.de>
Process form WITHOUT feedback page PART 2 (GearGirl)
Profiling memory use <paul@margalo.com>
ReadLine requiring ^D to terminate (Sweth Chandramouli)
Re: ReadLine requiring ^D to terminate (Sweth Chandramouli)
Re: Recursing a directory tree (Eric Bohlman)
Re: Recursing a directory tree <nwang@shell3.shore.net>
Re: Recursing a directory tree <mischief@velma.motion.net>
Re: regex question. $25 for answer. (Craig Berry)
Re: releasing array memory <dan@tuatha.sidhe.org>
Re: SHTML in CGI files <godzilla@stomp.stomp.tokyo>
Re: substing and locating <bart.lateur@skynet.be>
Re: using perl with msaccess <stuart@otenet.gr>
utf8: ord,length, m/xyz/ still use bytes instead of cha <pilsl_@goldfisch.at>
Re: XSUB Expert for a quicky =?iso-8859-1?Q?=28=A3=A3=A (David H. Adler)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 04 Jun 2001 21:21:17 GMT
From: Dan <nospam@newsranger.com>
Subject: Perl and SHTML
Message-Id: <hZSS6.4226$v4.216429@www.newsranger.com>
I have a page that contains a text box and when it is submitted it calls a Perl
file. That Perl file then takes the input and loads the selected stock quote.
This part works fine, but I want to integrate this .pl file into a .shtml file
so I can put it wherever I want to in my layout. The .shtml layout file
contains top and bottom includes which have exec commands inside of them. I
cannot think of a way to get input from a input box into a .shtml file. Would
it be possible to retrieve the MSFT portion using an exec command with a .pl
file on a page like quote.shtml?MSFT
Can I use an exec command or something similar to that in a .pl file? I have
not been able to come up with any good answers to this problem... Any ideas?
Thanks,
Dan
------------------------------
Date: Mon, 04 Jun 2001 11:29:02 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Perl Script
Message-Id: <3B1BD36E.77EE4C04@stomp.stomp.tokyo>
Jeff wrote:
> I am very new to scripting. So new that it is still a foreign
> language to me. I am kind of in a bind and need some help. I am
> replacing a number of relic NT servers with new high end equipment.
> They are strictly file and print servers for field users and offices.
> I am using the "Scopy" function to migrate the data from Server A
> (old) to Server B (new). This accomplishes part of the job. The area
> I am interested in finding a script for is how to copy all of the
> shares (including hidden) and their associated permissions from Server
> A to Server B. Any help, direction, or scripts would be greatly
> appreciated.
This may be of some help.
http://is-it-true.org/nt/atips/atips202.shtml
Godzilla!
------------------------------
Date: Mon, 4 Jun 2001 23:05:54 +0200
From: buggs <buggs-clpm@splashground.de>
Subject: Re: perl/cgi and dynamic hyperlink
Message-Id: <9fgt9i$ihp$01$1@news.t-online.com>
Godzilla! wrote:
> You are wasting your time although your motivation
> and intent are both good. This is commendable.
I don't relate to the concept of time.
I don't relate to the concepts of good and bad.
I only use them when talking to people who do.
( internal representation differs )
--snip--
> Socratic Irony is an art I well practice. There
> are times I do string along this troll until he
> is suckered into exposing himself for being just
> that, a troll.
Yes, I noticed you have mastership in this dicipline ;-)
But I don't think it's a good strategy, most of the time.
Buggs
--
"Never confuse ability with appearance, or actions with motivations."
Luke Skywalker
------------------------------
Date: 04 Jun 2001 14:16:25 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: perl/cgi and dynamic hyperlink
Message-Id: <m1lmn8j68m.fsf@halfdome.holdit.com>
>>>>> "buggs" == buggs <buggs-clpm@splashground.de> writes:
buggs> I don't relate to the concept of time.
[...]
buggs> But I don't think it's a good strategy, most of the time.
What do you mean, this "time" thing?
:-)
--
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: Mon, 4 Jun 2001 23:43:53 +0200
From: buggs <buggs-clpm@splashground.de>
Subject: Re: perl/cgi and dynamic hyperlink
Message-Id: <9fgvh0$i6j$07$1@news.t-online.com>
Randal L. Schwartz wrote:
>>>>>> "buggs" == buggs <buggs-clpm@splashground.de> writes:
>
> buggs> I don't relate to the concept of time.
> [...]
> buggs> But I don't think it's a good strategy, most of the time.
>
> What do you mean, this "time" thing?
>
> :-)
I'm not sure I understand your question.
You want to know what I understand as "concept of time"
or "most of the time" ?
Or just Gotcha ;-)
BTW I noticed that the code of the original lilproxy
migth be based on your code since it has refernce
to:
http://web.stonehenge.com/merlyn/WebTechniques/col11.html
http://web.stonehenge.com/merlyn/WebTechniques/col34.html
Are there any licence restrictions ?
Buggs
------------------------------
Date: 4 Jun 2001 13:49:47 -0700
From: m-m@lcc.net (GearGirl)
Subject: Process form WITHOUT feedback page PART 2
Message-Id: <6f51e848.0106041249.1e41b58d@posting.google.com>
As suggested, I used the "Status: 204 No Response" lines in my Perl
script to try to capture some hidden info on one of my pages WITHOUT
giving the user a feedback page, and now I'm getting a new browser
window ANYWAY that is titled "No page to display -- Microsoft Internet
Explorer" and has an "Action Canceled" message in it. At least I'm no
longer getting "500 Internal Server Error" but I'd rather not have ANY
pages popping up once the script has executed.
Why am I getting the window even after using 204? Is there another
way of running a script without giving a feedback "thank you for your
submission" page???
I have only one empty form on the page. It's ACTION gives the URL of
the
perl script. I use BODY onLoad to fire it off (see below)
<BODY onload='document.form1.submit()'><FONT FACE='arial'>
--- miscellaneous page stuff here ---
<FORM name='form1' ACTION='http://_URL_/cgi-bin/receipt.pl'
METHOD='post'>
<INPUT TYPE="hidden" NAME="test" VALUE="test2">
</FORM>
Any clues!?
Thanks,
Melissa
------------------------------
Date: Mon, 4 Jun 2001 14:14:10 -0700 (PDT)
From: paullaub <paul@margalo.com>
Subject: Profiling memory use
Message-Id: <4367.990795302194@iw0.mailusenet.com>
Dear all,
Are there tools for profiling memory use? I am interested
in exploring memory savings that come from representing
arrays as strings with vec.
So far I know of two ways: (1) monitoring system memory use
using the top utility and (2) having perl spit out
memory use stats by setting the PERL_DEBUG_MSTATS
environment variable.
Is this anything more I can do?
Thanks,
Paul
----
Posted via http://www.etin.com - the FREE public USENET portal on the Web
Complete SEARCHING, BROWSING, and POSTING of text and BINARY messages!
------------------------------
Date: Mon, 04 Jun 2001 18:25:04 GMT
From: sweth+perl@gwu.edu (Sweth Chandramouli)
Subject: ReadLine requiring ^D to terminate
Message-Id: <4oQS6.52236$G5.11422594@news1.rdc1.md.home.com>
I've got a subroutine I've written to prompt the user for
an arbitrary piece of info, as follows:
sub prompt_user {
my ($user_input, $default_display);
my ($variable, $default, $validation_sub_ref, $hide_input) = @_;
if (defined ($default)) {
$default_display = $default;
} else {
$default_display = 'null';
};
if (is_interactive) {
PROMPT_USER: while (1) {
print STDOUT ("$variable [$default_display]: ");
if ($hide_input) {
ReadMode ('noecho');
};
$user_input = ReadLine (0);
if ($hide_input) {
ReadMode ('normal');
};
unless (defined ($user_input)) {
$user_input = $default;
};
chomp ($user_input);
print STDOUT "\n";
if (defined ($validation_sub_ref)) {
if ("CODE" eq ref ($validation_sub_ref)) {
# this next ugliness is to avoid a pointless warning
if (&$validation_sub_ref (
defined ($user_input) ? $user_input : undef
)) {
last PROMPT_USER;
} else {
print STDOUT "Invalid input for '$variable': $user_input\n";
};
} else {
die ("Invalid validation sub given for '$variable'!");
};
} else {
last PROMPT_USER;
};
};
return ($user_input);
} else {
die ("Cannot prompt user in non-interactive session!");
};
};
__END__
. This sub is being called from a bunch of other routines
in series, each of which stuffs the output of the above sub into a scalar
as follows:
$o_utime = prompt_user (
"Original uTime"
, undef
, \&validate_utime
);
__END__
; the is_interactive sub is defined as
sub is_interactive {
return (-t STDIN && -t STDOUT);
};
__END__
. When I run this program interactively, I have to enter
a control-D char after the "\n" that would normally terminate the input
in order to get the prompt_user sub to return; oddly, when I use the -d
flag to see what exactly is going on, everything works fine. Any
thoughts on what is causing this?
TIA,
Sweth.
--
Sweth Chandramouli ; <sweth+perl@gwu.edu>
------------------------------
Date: Mon, 04 Jun 2001 18:57:53 GMT
From: sweth+perl@gwu.edu (Sweth Chandramouli)
Subject: Re: ReadLine requiring ^D to terminate
Message-Id: <RSQS6.52426$G5.11429459@news1.rdc1.md.home.com>
In article <4oQS6.52236$G5.11422594@news1.rdc1.md.home.com>,
Sweth Chandramouli <sweth+perl@gwu.edu> wrote:
> chomp ($user_input);
. Subsequent mucking around shows that this chomp is not
chomping anything from $user_input (based on its return value), despite
the fact that $/ at that point in the script is "\n" and $user_input ends
in "\n", as confirmed by GOFEPS (good old-fashioned embedded print
statements). I don't know if this is related to the problem I'm
experiencing or not, but I also can't explain this behaviour either, and
it, too, disappears when I run with -d.
-- Sweth.
--
Sweth Chandramouli ; <sweth+perl@gwu.edu>
------------------------------
Date: 4 Jun 2001 19:14:34 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Recursing a directory tree
Message-Id: <9fgmmq$29o$1@bob.news.rcn.net>
Nan Wang <nwang@shell3.shore.net> wrote:
> I don't know why you think I was being defensive, I have nothing to be
> ashamed off. Like I said I write scripts to get things done, not for
> people to frame it and stick it on the wall and boggle at how few lines it
> took. I was rather pissed off at his nitpicking, anal retentiveness and
> his holier-than-thou attitude. Can I improve my code? Definitely, but
> I'll improve it the way I want, not as Martien mandates.
He wasn't *mandating* anything, just *suggesting* things based on his own
experience and that of a lot of other very experienced programmers.
Your responses to him certainly *looked* defensive to me, and to a bunch
of other people. You have to remember that on Usenet, your words are the
*only* thing people can use to form impressions of you. Maybe English
isn't your first language. Maybe most of your talent lies in the
quantitative area rather than the verbal area. There's no way for us to
know that. But some of your reactions to Martien's suggestions were more
than a little over the top (like when he asked you why you were chomping
something that could never contain a newline, and you responded that you'd
chomp anything you felt like). That comes off as combative to most
people. (Actually, it comes off sounding like you didn't understand that
particular line of code, but were too embarassed to admit it. Once again,
we have nothing but your words to go on.)
And calling someone "anal retentive" for insisting on precision in code is
potentially a sign that someone isn't cut out to be a programmer.
Computers are hyper-literalistic machines that don't have the human
ability to respond to what you mean rather than what you actually say. If
you can't or won't understand the need to be precise when giving
instructions to a computer, programming is going to be nothing but
frustration for you. This is a real problem for a lot of people who
initially got into Web design for artistic reasons and found themselves
needing to learn programming. Programming isn't pure Art where any
judgments of rightness or wrongness are purely subjective. Some code
really *is* bad code. *No* programmer writes perfect code. *Every*
non-trivial program can be improved in some way. Really good programmers
do *not* feel insulted when someone points out shortcomings in the code
they wrote. They welcome suggestions on how their code could be improved.
Bad programmers view their code as an extension of themselves, and feel
personally attacked when someone suggests their code isn't perfect.
Because of that attitude, they have a hard time finding bugs in their
code.
------------------------------
Date: Mon, 04 Jun 2001 19:58:41 GMT
From: Nan Wang <nwang@shell3.shore.net>
Subject: Re: Recursing a directory tree
Message-Id: <RLRS6.70$iH6.1001@news.shore.net>
Eric Bohlman <ebohlman@omsdev.com> wrote:
> Nan Wang <nwang@shell3.shore.net> wrote:
>> I don't know why you think I was being defensive, I have nothing to be
>> ashamed off. Like I said I write scripts to get things done, not for
>> people to frame it and stick it on the wall and boggle at how few lines it
>> took. I was rather pissed off at his nitpicking, anal retentiveness and
>> his holier-than-thou attitude. Can I improve my code? Definitely, but
>> I'll improve it the way I want, not as Martien mandates.
> He wasn't *mandating* anything, just *suggesting* things based on his own
> experience and that of a lot of other very experienced programmers.
What makes you think I wanted his suggestions in the first place?
> Your responses to him certainly *looked* defensive to me, and to a bunch
> of other people. You have to remember that on Usenet, your words are the
You are entitled to your own opinions, no matter how wrong you are.
> *only* thing people can use to form impressions of you. Maybe English
> isn't your first language. Maybe most of your talent lies in the
> quantitative area rather than the verbal area. There's no way for us to
> know that. But some of your reactions to Martien's suggestions were more
> than a little over the top (like when he asked you why you were chomping
> something that could never contain a newline, and you responded that you'd
> chomp anything you felt like). That comes off as combative to most
Why the heck would he even ask in the first place? It had no bearing on the
rest of the script. That's what I call nitpicking and anal retentiveness.
> people. (Actually, it comes off sounding like you didn't understand that
> particular line of code, but were too embarassed to admit it. Once again,
> we have nothing but your words to go on.)
I know perfectly well what chomp does, I'm just getting so used to using it
I do it all the time, whether it's needed or not. Don't like it? Tough.
> And calling someone "anal retentive" for insisting on precision in code is
> potentially a sign that someone isn't cut out to be a programmer.
Unless he's paying me, WTF do you think he has the right to insist me
writing programs to confirm to his standard?
> Computers are hyper-literalistic machines that don't have the human
> ability to respond to what you mean rather than what you actually say. If
And my scripts did what I wanted them to, thanks for your needless concern.
> you can't or won't understand the need to be precise when giving
> instructions to a computer, programming is going to be nothing but
> frustration for you. This is a real problem for a lot of people who
> initially got into Web design for artistic reasons and found themselves
> needing to learn programming. Programming isn't pure Art where any
> judgments of rightness or wrongness are purely subjective. Some code
Style certainly is subjective.
> really *is* bad code. *No* programmer writes perfect code. *Every*
Bad code are full of bugs, good code has less, it's that simple.
> non-trivial program can be improved in some way. Really good programmers
> do *not* feel insulted when someone points out shortcomings in the code
> they wrote. They welcome suggestions on how their code could be improved.
Yeah, I guess they just don't welcome suggestion how themselves could be
improved. What crock of BS.
> Bad programmers view their code as an extension of themselves, and feel
> personally attacked when someone suggests their code isn't perfect.
> Because of that attitude, they have a hard time finding bugs in their
> code.
See, this is exactly the kind of holier-than-thou attitude I was tired of.
I don't know where the heck you came from but I have worked with plenty of
good and bad programmers, and those good programmers are often the most
stubborn people.
------------------------------
Date: Mon, 04 Jun 2001 20:25:28 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Recursing a directory tree
Message-Id: <thnrloqh8sh0d1@corp.supernews.com>
Nan Wang <nwang@shell3.shore.net> wrote:
> Eric Bohlman <ebohlman@omsdev.com> wrote:
>> Nan Wang <nwang@shell3.shore.net> wrote:
>>> I don't know why you think I was being defensive, I have nothing to be
>>> ashamed off. Like I said I write scripts to get things done, not for
>>> people to frame it and stick it on the wall and boggle at how few lines it
>>> took. I was rather pissed off at his nitpicking, anal retentiveness and
>>> his holier-than-thou attitude. Can I improve my code? Definitely, but
>>> I'll improve it the way I want, not as Martien mandates.
>> He wasn't *mandating* anything, just *suggesting* things based on his own
>> experience and that of a lot of other very experienced programmers.
> What makes you think I wanted his suggestions in the first place?
It _is_ a discussion group. Here's one of my favorite quotes
about that fact:
Get real! This is a discussion group, not a helpdesk. You post
something, we discuss its implications. If the discussion happens
to answer a question you've asked, that's incidental.
-- nobull, comp.lang.perl.misc
I think this applies equally to discussion when no question has been
asked. If you put code in a discussion group, it might stimulate a
discussion.
[snip]
> Bad code are full of bugs, good code has less, it's that simple.
I could have two programs in my directory, both of which do the
same job. Let's say program A has one bug, is 5_000 lines, takes
15 minutes to run, and produces the correct output 99.8% of the
time. Program B, because it uses a better algorithm, runs in 30
seconds and produces the correct output 99.79% of the time using
only 700 lines of code. Unfortunately, program B has two bugs.
Which is the better program? Let me not forget to mention that
program A is written with one-letter variable names, uses
global variables exclusively, uses no subroutines, and the bug
is difficult to reproduce while program B is written in a style
which most programmers find comfortable and easy to maintain,
and the two bugs are easy to reproduce. Now which is the better
program? Which will be the better program once all the bugs are
fixed? Which will be better when each program has exactly one
bug which causes the exact same amount of bad output for each
program?
[snip]
>> Bad programmers view their code as an extension of themselves, and feel
>> personally attacked when someone suggests their code isn't perfect.
>> Because of that attitude, they have a hard time finding bugs in their
>> code.
> See, this is exactly the kind of holier-than-thou attitude I was tired of.
> I don't know where the heck you came from but I have worked with plenty of
> good and bad programmers, and those good programmers are often the most
> stubborn people.
You are attacking a generality of values with a specific case of
lack of those values. While you do disprove that what Eric says
is always the case, you do not disprove that being open to
criticism is a positive trait and could make someone a better
programmer than not possessing said trait. This could very well
be a never-ending argument if the two of you don't agree that the
generalities and the specifics leave room for play, and that there
are exceptions to every rule of human nature. Broad generalizations
often prove to be false in the specifics. Sometimes, though, an
informed generalization can be a good rule of thumb.
Chris
--
Even in the worst of times, there is always someone who's
never had it better. Even in the best of times, there is
always someone who's never had it worse.
------------------------------
Date: Mon, 04 Jun 2001 18:06:02 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: regex question. $25 for answer.
Message-Id: <thnjgane75pn12@corp.supernews.com>
Marc Fest (wx34@yahoo.com) wrote:
: Hi, whoever can help me with this first, will get a $25 check in the
: mail.
/(?<!\d)\d(?!\d)/
I'll wave my fee. :)
--
| Craig Berry - http://www.cinenet.net/~cberry/
--*-- "God becomes as we are that we may be as he is."
| - William Blake
------------------------------
Date: Mon, 04 Jun 2001 20:21:40 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: releasing array memory
Message-Id: <o5SS6.53674$v5.4401904@news1.rdc1.ct.home.com>
Stefan Weiss <der.prinz@gmx.net> wrote:
> -------------------------------------------------------------------------
> Michael Carman wrote:
> Whoa there! That's news to me.
> So if I do this:
> SOME_BLOCK: {
> my @array = (0 .. 1000);
> # ...
> }
> and no references to @array exist outside the block, the memory
> allocated to it still won't be freed up for use elsewhere in the program
> after I leave the block?
> -------------------------------------------------------------------------
> returned to the OS, not to the process itself.
> I could understand that lexicals that are not declared/assigned inside a
> block will not return their memory to the process if they are reassigned
> or undef()ined.
Lexical variables (heck, all variables) will generally return their
memory when assigned to, if that assignment would cause the variable
to do some radical reassignment. Generally this only happens when
you undef the variable, but wholesale assignment in the case of
hashes and arrays will do it too.
> But I did not find any definitive answer to your question
> with the SOME_BLOCK example - these variables are localized,
No, strictly speaking they're not, assuming you're referring to the
example above. They're lexical variables, not localized package
variables.
> and the will
> go out of scope at some time. Are you really sure that the memory used
> by variables like @array will be lost beyond recovery?
If you re-enter the block, perl will reuse the memory.
This is the root of all the memory hoarding, and it's a result of
perl's assumption that trading off memory for speed is a win.
The assumption is that, on average, you'll reenter a block and
thus reuse the variables. With that assumption in mind it makes
sense to not release the memory allocated to the variables that
are allocated in the block--why bother, if you're just coming
back in later? It's a waste of time, since you need to spend
the time to both release and later allocate the memory again.
Of course, that assumption's not always true, and will sometimes
cause you more pain than the speed it saves. (This would be a good
spot for the semi-mythical "use less qw(memory);" pragma to be
used, freeing up all the memory for lexicals created within its
scope)
If you want perl to explicitly let go of memory allocated to
a variable (whether it goes back to the OS or just the free pool
for the process is OS and circumstance dependent), undef it. This
is probably not necessary for anything other than large arrays or
hashes that are used only once, or rarely, but that's a judgement
you need to make based on the needs of your program. (Most programs
won't need to bother, since the default assumptions are either
beneficial or not detrimental)
Dan
------------------------------
Date: Mon, 04 Jun 2001 13:34:59 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: SHTML in CGI files
Message-Id: <3B1BF0F3.70C4B4CD@stomp.stomp.tokyo>
"Philip M. Gollucci" wrote:
(various snippage)
> I would like to be able to do
> <!--#include virtual=\"/cgi-bin/Calendar/print.cgi\"-->
> This doesn't work, because apache doesn't realize that its
> a file which needs to be handled by server_parse (ie .shtml).
> I can change httpd.conf if necessary.
Be cautious about your cgi-bin directory tree.
There can be some security issues if a cgi-bin
directory tree is not formatted correctly.
In an appropriate area of your httpd.conf file
add this if not already present:
AddHandler cgi-script .cgi
AddType text/html .htm .html .shtml
AddHandler server-parsed .htm .html .shtml
Only add those file extensions you actually need.
Godzilla!
------------------------------
Date: Mon, 04 Jun 2001 19:13:11 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: substing and locating
Message-Id: <kdnnhtcjnpcpou54q3nslctpleh7diicp6@4ax.com>
John Joseph Trammell wrote:
>ord()?
Oops. In my haste, I reread his question wrongly. REread, because I had
read it before. And turning a character into a numerical value... That
could be ord().
--
Bart.
------------------------------
Date: Mon, 4 Jun 2001 15:25:02 +0300
From: "Stuart Gall" <stuart@otenet.gr>
Subject: Re: using perl with msaccess
Message-Id: <9fgr76$9l$1@usenet.otenet.gr>
>
> Er... hello? I have DONE appending and updating to tables, with Access,
> through DBI + DBD::ODBC. So I'm 100% sure it works.
>
Oh! Sorry. Is this Access97?
Now I think about it I was probably doing SQL through DDE, which does not
allow SQL update and Append.
--
Stuart Gall
------------------------------------------------
------------------------------
Date: Mon, 4 Jun 2001 23:49:02 +0200
From: peter pilsl <pilsl_@goldfisch.at>
Subject: utf8: ord,length, m/xyz/ still use bytes instead of characters ..
Message-Id: <3b1c024f$1@e-post.inode.at>
my scripts handle unicode that is delivered from a cgi-form.
I use perl5.6 (with no unicode in the source and therefore I shouldnt need
the utf8-pragma) and according to 'man perlunicode', the ord-function, the
length, substr ... and the m//,s/// and tr/// - functions should work
characterbased instead of bytebased.
However, this does not work for me.
The value submitted from the cgi-script is a unicode bytesquence and when I
process this bytesequence I get only bytes with ord<255 and , in example,
each russian character delivers two bytes with ord<255 instead of one
character with ord>255.
Additionally each russian word fails a test against /^\w+$/
What is my problem ?
I set up an general examplescript for unicode-tests and unicode-problems
under
http://www.customers.goldfisch.at/cgi-bin/unicodetest1.pl
(source at
http://www.goldfisch.at/knowledge/source_unicode.html#unicodetest1)
There you can see the problem: The submitted text is directly processed
"character" by "character" using length and substr and the ord-values are
printed.
I write '/' between two bytes that should actually be a character ...
any help appretiated.
thnx,
peter
--
pilsl_@goldfisch.at
http://www.goldfisch.at
------------------------------
Date: 4 Jun 2001 19:56:42 GMT
From: dha@panix2.panix.com (David H. Adler)
Subject: Re: XSUB Expert for a quicky =?iso-8859-1?Q?=28=A3=A3=A3=29...?=
Message-Id: <slrn9hnpvq.t4e.dha@panix2.panix.com>
In article <33406f61.0106010722.3d177b95@posting.google.com>, Daniel
Kelleher wrote:
> Can anyone help us by validating the code, or tell us about someone
> who can.
>
> As a commercial organization we are expecting to pay for the service
> requested.
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently to
"news.announce.newusers", you might have already known this. :) (If
n.a.n is quieter than it should be, the relevent FAQs are available at
http://www.faqs.org/faqs/by-newsgroup/news/news.announce.newusers.html)
Another good source of information on how Usenet functions is
news.newusers.questions (information from which is also available at
http://www.geocities.com/nnqweb/).
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
http://jobs.perl.org may be of more use to you
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
she's a lovetarian especially in the form of puppies
- Jellyfish, Sebrina, Paste and Plato
------------------------------
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 1057
***************************************