[15688] in Perl-Users-Digest
Perl-Users Digest, Issue: 3101 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 19 18:10:50 2000
Date: Fri, 19 May 2000 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: <958774222-v9-i3101@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 19 May 2000 Volume: 9 Number: 3101
Today's topics:
Need Help with Child Processes <ctcato@aic-links.com>
Re: Need some help with an easy subroutine (Kragen Sitaker)
Net::Telnet & Sendmail <danout@oxnardsd.org>
Newbie. Finding/installing the real OLE.pm module <mflaherty2@earthlink.net>
Re: Newbie. Finding/installing the real OLE.pm module <jeff@vpservices.com>
Re: Opening a file from another server <ppi@searchy.net>
Re: Parse::RecDescent problem, $::RD_TRACE showing some <iltzu@sci.invalid>
Re: Perl & Frames <richard@avocation.demon.co.uk>
Re: Perl & Frames <jhelman@wsb.com>
Re: Perl & Frames <flavell@mail.cern.ch>
Re: Protecting Source Code? <russ_jones@rac.ray.com>
Re: RE Question <nospam@devnull.com>
Re: re-evaluation (newbie) (M.J.T. Guy)
Regular Expression Matching <mike@sinfonia.net>
Re: Remove leading zero (Abigail)
Re: Return Codes <Jonathan.L.Ericson@jpl.nasa.gov>
Re: Split with a space (Abigail)
Re: Split with a space <The__Patrician@Hotmail.com>
SQL Server <amybro@ashastd.org>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 19 May 2000 15:40:56 -0400
From: "Casey Cato" <ctcato@aic-links.com>
Subject: Need Help with Child Processes
Message-Id: <vKgV4.21170$nm6.337951@news-east.usenetserver.com>
I am trying to do the following and I am unsure what is the best way. I
have a rather long Perl script utilizing a variety of subroutines. This
Perl script incorporates the PerlMenu script for a visual menu system to
guide the user through their choices. Presently, the user selects a choice
from the menu which calls a subroutine, but the user must wait for this
routine to finish before control is restored back to the menu.
I want to be able to allow the user to make a selection from the menu and
call the associated subroutine and that subroutine will start, but control
would be immediately returned to the user so they can go on to another facet
of the menu and start something else.
As I understand it what I want to do is accomplished by starting the
subroutines as a child process, but I am unsure of how to do this. One
thing I have to keep in mind is that one part of the menu allows the user to
stop (kill) any process going on, so I am assuming that these child
processes must all be started with their own PIDs so that I can get these
and "kill" them when the user instructs the program to do so.
Any help on this would be greatly appreciated or any suggestions of
books/web sites to look at. Thanks!
Casey...
------------------------------
Date: Fri, 19 May 2000 19:10:17 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Need some help with an easy subroutine
Message-Id: <tkgV4.20878$nm6.333315@news-east.usenetserver.com>
In article <8dvi8i$u8g$1@orpheus.gellyfish.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>On Sun, 23 Apr 2000 15:22:37 GMT Kragen Sitaker wrote:
>> think like an American
>
>I'd rather not if you dont mind.
Perhaps you could submit a perlfaq patch that would enable those who do
not think like Americans to find this FAQ entry with perldoc -q? :)
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
The power didn't go out on 2000-01-01 either. :)
------------------------------
Date: Fri, 19 May 2000 13:38:59 -0700
From: "DK" <danout@oxnardsd.org>
Subject: Net::Telnet & Sendmail
Message-Id: <3925acaa.0@news.vcss.k12.ca.us>
I am trying to get a printout of expnaded aliases
I am having difficulty using net::telnet to do this
My script is
#!/usr/bin/perl
## to expand aliases to all recipients Dan Kubilos
## 05192000
$hostname = "mail.oxnardsd.org";
use Net::Telnet ();
$Snd = new Net::Telnet;
$Snd->dump_log(DUMP);
$Snd->open(Host => $hostname,
Port => 25);
sleep 2;
(@Data) = $Snd->print ("EXPN principals");
print @Data;
exit;
My DUMP log reads
> 0x00000: 45 58 50 4e 20 70 72 69 6e 63 69 70 61 6c 73 0d EXPN
principals.
> 0x00010: 0a
If I telnet manually I get
Escape character is '^]'.
220 mail.oxnardsd.org ESMTP Sendmail 8.9.1/8.9.1; Fri, 19 May 2000
12:35:26 -070
0
after typing in "EXPN principals" <cr>
I get something like
250-Dennis Johnson <degsj@blah.org>
250-Dennis Johnson <Mggr555@blah.com>
250-Peter Chapa <pcgapa@blay.org>
This is what I am trying to capture into my array. How do I issue the EXPN
command correctly in net::telnet Then how do I issue the ^] escape
sequence?
Much obliged
Dan K
------------------------------
Date: Fri, 19 May 2000 19:16:47 GMT
From: "Mike Flaherty" <mflaherty2@earthlink.net>
Subject: Newbie. Finding/installing the real OLE.pm module
Message-Id: <zqgV4.5410$T41.130389@newsread1.prod.itd.earthlink.net>
I have a script that the author says will convert Excel files to CSV format.
when I run it I get...
sparky# ./x2csv.pl c1.xls
Can't locate OLE.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.00503/sun4-solaris /usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005 .) at ./x2csv.pl line-13.
BEGIN failed--compilation aborted at ./x2csv.pl line 13.
sparky#
I went to cpan.org and installed "OLE-Storage-0.386". It was all I could
find that mentioned OLE. However, when I ran the script again, I got the
same error.
Where can I find the real OLE.pm?
Thanks,
Mike
------------------------------
Date: Fri, 19 May 2000 12:47:44 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Newbie. Finding/installing the real OLE.pm module
Message-Id: <39259A60.F32A6C67@vpservices.com>
Mike Flaherty wrote:
>
> I have a script that the author says will convert Excel files to CSV format.
> when I run it I get...
>
> sparky# ./x2csv.pl c1.xls
> Can't locate OLE.pm in @INC (@INC contains:
> /usr/local/lib/perl5/5.00503/sun4-solaris /usr/local/lib/perl5/5.00503
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
> /usr/local/lib/perl5/site_perl/5.005 .) at ./x2csv.pl line-13.
> BEGIN failed--compilation aborted at ./x2csv.pl line 13.
> sparky#
>
> I went to cpan.org and installed "OLE-Storage-0.386". It was all I could
> find that mentioned OLE. However, when I ran the script again, I got the
> same error.
>
> Where can I find the real OLE.pm?
It looks from your error messages like you are on a solaris box. OLE.pm
will not work on a solaris box. It only works on win32 boxes.
OLE::Storage, however does work on unix boxes so you should probably try
to re-install it. Did you follow the instructions in its readme file
about running perl Makefile.PL, make, etc.?
--
Jeff
------------------------------
Date: Fri, 19 May 2000 20:59:20 +0200
From: Penpal International <ppi@searchy.net>
Subject: Re: Opening a file from another server
Message-Id: <39258F08.FE8864A@searchy.net>
I have a very simple example:
#!/usr/bin/perl
use LWP::Simple;
$contents = get($url);
Simpler than this it can't be. In all manuals of the module it is very
difficult to understand how it works on their way.
Franck Lalane wrote:
>
> Hello,
>
> I have a search engine in perl running for an Intranet.
> When I create the result list, I must open the files to get the title I will
> display.
> Everything works fine with all the files from the server running the script.
> (I use the physical path related to the server)
>
> The problem is that we have 3 servers, and I can't find the way to call them
> in Perl.
> I've tried the URL ("http://mysite.com/my_page") or with the server shares
> ("\\server\shared_directory\my_file").
> I thought to work with a shared directory, but nobody is logged on the
> server, and the shares are depending on who is logged.
>
> Help me! I'm sure it's possible!
>
> Thanks
>
> Franck
--
Penpal International
http://ppi.searchy.net/
ppi@searchy.net
------------------------------
Date: 19 May 2000 18:19:51 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Parse::RecDescent problem, $::RD_TRACE showing something very odd.
Message-Id: <958759961.10987@itz.pp.sci.fi>
In article <3924B44D.38AD153@NOSPAM.mit.edu>, Omri wrote:
>I'm still working on my long RecDescent grammar,
>and right now my script dies with
> ERROR (line 1264): Untranslatable item encountered: "}"
> (Hint: Did you misspell "}" or forget to comment it
>out?)
>Bad grammar!
>
[snip]
> 'sizeof' | 'static' | 'typedef' | "union"
>}};
>
>The second closing curly brace is an experiment. If I delete it I get
>this error message:
>Can't find string terminator "}" anywhere before EOF at www/decss.pl
>line 33.
I bet you have an extra _opening_ curly brace in there. In
particular, I bet it's quoted or commented out so that RecDescent
doesn't consider it a paired delimiter, but _perl does_.
You might want to use some other string delimiter.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: Fri, 19 May 2000 19:54:12 +0100
From: "Richard" <richard@avocation.demon.co.uk>
Subject: Re: Perl & Frames
Message-Id: <958762647.19705.0.nnrp-08.d4e489f6@news.demon.co.uk>
I would agree but there's a Perl slant on my specific requirement.
I need to reset the Frameset prior to calling the 'Location:' so that the
site being re-directed to will overwrite the frameset I've created!! But to
include the statement:
print "Content-type:text/html\n\n";
would stop the 'Location:' redirection working altogether!!
I can't use the <A> tag because that would require the user to 'click' on
the link to re-direct, whereas the script should re-direct automatically!!!
And the TARGET='_TOP' doesn't work on the 'Location:' redirect statement!!
Thanks anyway,
Rich.
Jeff Helman <jhelman@wsb.com> wrote in message
news:3924406A.3748808E@wsb.com...
> This is actually an HTML/CGI question that has nothing to do with perl.
> You need to update the link that calls the script and add a
> TARGET="_top" to the <A> tag.
>
> JH
>
> Richard wrote:
> >
> > I have a web page that calls a Perl script within a frame which is part
of a
> > Frameset. When this Perl script is called it writes some HTML which I
want
> > to become the Parent page and overwrite the Frameset.....problem is that
> > currently it's just re-writing in the frame!!
> >
> > Can anyone suggest how I can make the HTML written by this script
overwrite
> > the Frames and become the parent page!!
> >
> > Hope that makes sense!
> >
> > Thanks,
> >
> > Richard
> >
> > P.S. Sorry it's not a truly Perl question as such for this newsgroup.
>
> --
> ----------------------------------------------------------------
> Jeff Helman Product Manager -- Internet Services
> jhelman@wsb.com CCH Washington Service Bureau
> ----------------------------------------------------------------
>
> 99 little bugs in the code, 99 bugs in the code.
> Fix one bug, compile again, 100 little bugs in the code.
> 100 little bugs in the code, 100 bugs in the code.
> Fix one bug, compile again, 101 little bugs in the code...
>
> ----------------------------------------------------------------
------------------------------
Date: Fri, 19 May 2000 19:19:18 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: Perl & Frames
Message-Id: <392593D7.A5F9635F@wsb.com>
Okay. Let me rephrase. There is no way to do this WITHOUT changing the
link tag. Frames and other HTML goodies exist independent of the
underlying communications protocol (HTTP). There is nothing in HTTP
(including HTTP redirection) which controls, affects or otherwise has
anything to do with frames. This is an HTML problem requiring an HTML
solution.
JH
Richard wrote:
>
> I would agree but there's a Perl slant on my specific requirement.
>
> I need to reset the Frameset prior to calling the 'Location:' so that the
> site being re-directed to will overwrite the frameset I've created!! But to
> include the statement:
>
> print "Content-type:text/html\n\n";
>
> would stop the 'Location:' redirection working altogether!!
>
> I can't use the <A> tag because that would require the user to 'click' on
> the link to re-direct, whereas the script should re-direct automatically!!!
> And the TARGET='_TOP' doesn't work on the 'Location:' redirect statement!!
>
> Thanks anyway,
>
> Rich.
>
> Jeff Helman <jhelman@wsb.com> wrote in message
> news:3924406A.3748808E@wsb.com...
> > This is actually an HTML/CGI question that has nothing to do with perl.
> > You need to update the link that calls the script and add a
> > TARGET="_top" to the <A> tag.
> >
> > JH
> >
> > Richard wrote:
> > >
> > > I have a web page that calls a Perl script within a frame which is part
> of a
> > > Frameset. When this Perl script is called it writes some HTML which I
> want
> > > to become the Parent page and overwrite the Frameset.....problem is that
> > > currently it's just re-writing in the frame!!
> > >
> > > Can anyone suggest how I can make the HTML written by this script
> overwrite
> > > the Frames and become the parent page!!
> > >
> > > Hope that makes sense!
> > >
> > > Thanks,
> > >
> > > Richard
> > >
> > > P.S. Sorry it's not a truly Perl question as such for this newsgroup.
> >
> > --
> > ----------------------------------------------------------------
> > Jeff Helman Product Manager -- Internet Services
> > jhelman@wsb.com CCH Washington Service Bureau
> > ----------------------------------------------------------------
> >
> > 99 little bugs in the code, 99 bugs in the code.
> > Fix one bug, compile again, 100 little bugs in the code.
> > 100 little bugs in the code, 100 bugs in the code.
> > Fix one bug, compile again, 101 little bugs in the code...
> >
> > ----------------------------------------------------------------
------------------------------
Date: Fri, 19 May 2000 21:27:24 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Perl & Frames
Message-Id: <Pine.GHP.4.21.0005192109580.4238-100000@hpplus01.cern.ch>
On Fri, 19 May 2000, Richard wrote:
> I would agree but there's a Perl slant on my specific requirement.
None whatever. The fact that you're persisting in asserting this is
part of your problem, I suspect, and until you're willing to take the
advice offered, and reconsider your position, little progress is
possible. Your upside-down quoting style isn't helping in the least
(in fact it's making things worse).
> I need to reset the Frameset prior to calling the 'Location:' so that the
> site being re-directed to will overwrite the frameset I've created!! But to
> include the statement:
>
> print "Content-type:text/html\n\n";
>
> would stop the 'Location:' redirection working altogether!!
Which at best is an issue about CGI scripting, but really it's about
web design. You're quite right: you can't at one and the same provide
a content-body that's meant to be rendered, _and_ achieve redirection
with a Location: response. So if that was meant to be the answer,
there must have been something wrong with the question, whatever it
was.
> > > Frameset. When this Perl script is called it writes some HTML which I
> want
> > > to become the Parent page and overwrite the Frameset
I think you're looking for the TARGET attribute.
http://www.w3.org/TR/REC-html40/present/frames.html#adef-target
http://www.w3.org/TR/REC-html40/types.html#type-frame-target
My guess is that you want target="_top" on the HTML element that
invokes the script.
You really must learn to cope with the fact that it wasn't a Perl
issue, honestly. There's nothing so utterly frustrating than all the
hopeless cases who just keep coming back to the Perl group to
stubbornly contradict the helpful and entirely practical advice they
have been given. Heaven knows what they hope to gain by it.
[f'ups prophylactically set]
------------------------------
Date: Fri, 19 May 2000 14:37:14 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Protecting Source Code?
Message-Id: <392597EA.819CE3A@rac.ray.com>
Craig Berry wrote:
>
> James (spectralmedia@home.com) wrote:
> : Anyone know any good techniques for protecting your perl code?
>
> I take mine deep into the forest and hide it inside a hollow log.
>
You bone head! My dog ate that code and I had to have him put down!
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
When cryptography is outlawed, only outlaws will
A2bgg c4dc8 aji0i knS4E 7eFj8 22Rl1
ZdGg3 gu8i6 lu12N s6NoG gn3g3 q835n
------------------------------
Date: 19 May 2000 18:17:33 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: RE Question
Message-Id: <8g40ft$5bg$0@216.155.33.26>
In article <x7snvhgmls.fsf@home.sysarch.com>, Uri Guttman <uri@sysarch.com>
wrote:
| >>>>> "G" == Godzilla! <godzilla@stomp.stomp.tokyo> writes:
|
| G> I am here to help, not to masturbate my ego.
|
| then you and xah should meet and masturbate each other's ego. but in any
| case both of you don't belong here. you hate perl, perl hackers and most
| other things. but you love each other. how sweet. c.l.p.misc has now
| made a match. elope already and go on a permanent honeymoon.
|
| uri
Not for nothing, but these sort of comments do very little to raise the
bandwidth of the group in general. :/
Post corrections of erroneous perl, yes.
Post commentary regarding the personal lives of those you disagree with, no.
Do I need to remind you of all people as to why this is a 'bad thing'? ;)
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: 19 May 2000 20:29:05 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: re-evaluation (newbie)
Message-Id: <8g486h$c7l$1@pegasus.csx.cam.ac.uk>
Uri Guttman <uri@sysarch.com> wrote:
>
>named closures don't seem too useful to me. closures are usually meant
>for dynamically creating multiple instances of the same code with
>private data in each one.
Named closures are very useful. They are what have been provided
in lexically scoped languages ever since Algol60. It's a pity that
Perl's implementation of lexically scoped named subroutines is as
yet incomplete.
Mike Guy
------------------------------
Date: Fri, 19 May 2000 15:08:51 -0400
From: Mike Masinick <mike@sinfonia.net>
Subject: Regular Expression Matching
Message-Id: <39259143.C523273B@sinfonia.net>
For some reason I can't write a new message to the list, only reply...
so I hope somebody reads this :)
Hey all, please let me know if you can solve this problem for me:
I have the following text:
{{558796 {2 OF AMERIKAZ MOST WANTED} {} {2PAC/SNOOP DOGGY DOGG} 246 0}
{558982 {NUTHIN' BUT A 'G' THANG} {} {DR. DRE/SNOOP DOGGY DOGG} 238 0}
{559243
{THE SHIZNIT} {} {SNOOP DOGGY DOGG} 255 0} {558919 {UP JUMP THA BOOGIE}
{}
{SNOOP DOGGY DOGG/WILSON/MARIE} 283 0} {558967 BLUEBERRY {} {SNOOP DOGGY
DOGG} 255 0} {559207 {DOGGY DOGG WORLD} {} {SNOOP DOGGY DOGG/DRAMATICS}
280 0} {559102 {I WISH} {} {DOGG POUND} 296 0} {559024 {WHAT WOULD U
DO?} {} {DOGG
POUND} 308 0}}
I need to remove all of the first numbers in each of the smaller
expressions which all take the
form {NUMBER1 {TITLE} {} {ARTIST} NUMBER2 NUMBER3}.
I have tried all sorts of expression matching problems, but have not yet
been able to
successfully retreive those numbers. For the text above, I would like
to list the numbers:
558796
558982
558919
558967
559207
559102
559024
Please let me know if there is an easy way to do this... I have tried
the following:
$SessionFile =~ s/[a-zA-Z!\/.'?@_#$%^&*()]//g;
$SessionFile =~ s/{{/{/g;
$SessionFile =~ s/}}/}/g;
$SessionFile =~ s/}}/}/g;
$SessionFile =~ s/\s//g;
$SessionFile =~ s/{[0-9]}/ /g;
$SessionFile =~ s/{}/ m/g;
------------------------------
Date: 19 May 2000 19:32:15 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Remove leading zero
Message-Id: <slrn8ib5lv.vii.abigail@ucan.foad.org>
On Thu, 18 May 2000 21:33:34 GMT, Bart Lateur <bart.lateur@skynet.be> wrote:
++ nobull@mail.com wrote:
++
++ >See FAQ: "How do I strip blank space from the beginning/end of a string?"
++ >
++ >Make the obvious adjustments.
++
++ It's not so obvious. You need to keep at least one digit. "00" must
++ become "0", not "".
That wasn't part of the specification. It might makes sense if all strings
are digits only, but that wasn't given.
++ s/^0+(?=\d)//;
++
++ Other suggested methods include
++
++ $_ += 0;
++
++ but only if the precision for numerics in Per lis heigh enough to keep
++ all significant digits for your numbers.
It would utterly fail on $_ eq "foo", turning $_ into 0, instead of
keeping it "foo".
Abigail
------------------------------
Date: Fri, 19 May 2000 12:56:56 -0700
From: Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov>
Subject: Re: Return Codes
Message-Id: <39259C88.CA420BB2@jpl.nasa.gov>
Jeff Zucker wrote:
> Al Smith wrote:
> > I am tring to figure out how to evaulate the return code
>
> my $return_code = `/usr/bin/mt -t /dev/rmt/0m rew`;
Backticks return the 'collected standard output of the command'
(perlop), _not_ the return code of the command. The exit status is
stored in $?. Perhaps you meant:
my $return_code = system '/usr/bin/mt -t /dev/rmt/0m rew';
since system _does_ return the return code of the command.
Jon
--
Knowledge is that which remains when what is
learned is forgotten. - Mr. King
------------------------------
Date: 19 May 2000 18:48:51 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Split with a space
Message-Id: <slrn8ib34i.prq.abigail@ucan.foad.org>
On Thu, 18 May 2000 16:07:51 +0100, Damian (-*-) <damian@amorphous.co.uk> wrote:
++
++ GET
++ /cgi-bin/jeghitable.pl?../htdocs/testing/asteroids/asteroids.hi,15234,desc,f
++ red bloggs
Perhaps you should read the URL RFC first. Spaces are not allowed in URLs.
But this has nothing to do with Perl. Absolutely nothing.
Abigail
------------------------------
Date: Fri, 19 May 2000 21:43:06 +0200
From: Alexander Melchers <The__Patrician@Hotmail.com>
Subject: Re: Split with a space
Message-Id: <3925994A.7B8171F1@Hotmail.com>
The best way is to URL encode your string before passing it as a value... There
is a class that will do this in VisualAge for Java, however, I'm not sure if it
is a standard class. I think it's called URLEncoder (sorry, don't know the
package)... If you are unable to find this class or you don't have it, I would
be happy to supply you with a class that will do the job...
"Damian (-*-)" wrote:
> Yes you're right. I've just tested that myself here, and it does as you say.
>
> Is the problem the call from Java applet, in that it contains spaces ? I'm
> using a socket
> to send the command :
>
> GET
> /cgi-bin/jeghitable.pl?../htdocs/testing/asteroids/asteroids.hi,15234,desc,f
> red bloggs
>
> I know this reaches the webserver (Apache / Active Perl) as I've checked the
> Access
> Log, and it lists the request, including the full name (space and all) e.g.
>
> 192.168.0.81 - - [18/May/2000:16:11:06 +0100] "GET
> /cgi-bin/jeghitable.pl?../htdocs/testing/asteroids/asteroids.hi,15234,desc,f
> red bloggs"
>
> I tried sticking the part after the '?' in quotes but no luck (I thought the
> problem may
> be related to HTML pages when there is a space in the address line - I even
> put a
> '%20' in place of the space).
>
> Does $ENV{QUERY_STRING} not return the full value ? i.e. does it drop the "
> bloggs"
> part ?
>
> Damian (-*-)
>
> Ala Qumsieh <aqumsieh@hyperchip.com> wrote in message
> news:7a4s7vncvd.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me...
> |
> | "Damian (-*-)" <damian@amorphous.co.uk> writes:
> |
> | > Hi There,
> | >
> | > I'm trying to split the environment variable but am having trouble when
> the
> | > data contains
> | > spaces (This is a generic game score table script I am writing that is
> | > called from a Java
> | > applet)
> | >
> | > I'm using :
> | >
> | > ($hiScoresFile, $score, $sortMethod, $data) = split(',',
> | > $ENV{QUERY_STRING});
> | >
> | > to crack the initially passed string of the form :
> | >
> | > "myscores.txt,1000,desc,fred"
> | >
> | > The problem is when $data contains a space. It is passed through to the
> Perl
> | > script
> | > OK (I've check the access log file) but the split command seems to
> reject
> | > after the
> | > first space. Not having had much experience (and not finding anything in
> the
> | > FAQ)
> | > I was wondering if anyone new of a quick fix ? I just want to be able to
> | > fire a string
> | > like :
> | >
> | > "myscores.txt,1000,desc,fred bloggs"
> | >
> | > to the script and it save our "fred bloggs" as the name.
> |
> | What makes you say that it doesn't work?
> |
> | % perl -wl
> | my $string = 'myscores.txt,1000,desc,fred bloggs';
> | my ($w, $x, $y, $z) = split /,/, $string;
> | print $z;
> | __END__
> | fred bloggs
> |
> | It works as you want it to. Perhaps your problem is elsewhere?
> |
> | --Ala
------------------------------
Date: 19 May 2000 16:51:24 -0500
From: "Amy Brownlee" <amybro@ashastd.org>
Subject: SQL Server
Message-Id: <01bfc1d3$6673f980$8e341bd8@amybro.ashastd.org>
Is it possible to use Perl to hit a MS SQL 7.0 Server? Where can I find
more info about this? Any responses will be appreciated.
Thanks,
Amy
------------------------------
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 3101
**************************************