[10561] in Perl-Users-Digest
Perl-Users Digest, Issue: 4153 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 4 22:07:42 1998
Date: Wed, 4 Nov 98 19:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 4 Nov 1998 Volume: 8 Number: 4153
Today's topics:
Re: Cookie help <rootbeer@teleport.com>
Re: Easy Way? Or More Efficient Way? (Martien Verbruggen)
Error: "use_alarm" in LWP::Protocol::http.pm mcrogerm@stjohn.stjohn.ac.th
Having problems with a long script (Menace Publishing & Manufacture)
help with REMOTE_USER <kaarkas@bigpond.com>
Heterogeneous Data Structures: possible? If so, how? <croten@bigger.aa.net>
Re: Heterogeneous Data Structures: possible? If so, ho (David Formosa)
Re: How to run Perl/CGI under NT? <dlsilvia_remove_to_reply_@mediaone.net>
mime utilities in perl <daftary@cisco.com>
Re: Need Perl help on which 'box'. (Martien Verbruggen)
Re: Need Perl help on which 'box'. (Alastair)
Need perl socket programming help <rob@happy.com>
Re: Not to start a language war but.. (Alastair)
Re: Not to start a language war but.. <zenin@bawdycaste.org>
Re: Ok. Please Explain This (simple?) Regex. <rootbeer@teleport.com>
Re: Pattern matching <jalovel@email.msn.com>
Perl string manipulation <Jim_Barlow@bc.sympatico.ca>
Re: Perl string manipulation <jbharvey@corp.home.net>
Re: perl&cgi question jbharvey@auspex.net
Re: perl&cgi question (Sam Holden)
Re: Problems setting up script on Vservers <rootbeer@teleport.com>
Re: replacing inbetween 2 keywords (Joergen W. Lang)
Re: scoping troubles <rootbeer@teleport.com>
Re: Tk on NT (Mark Tagawa)
Re: Using system( ) command to copy files <rootbeer@teleport.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 30 Oct 1998 22:50:13 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Cookie help
Message-Id: <Pine.GSO.4.02A.9810301448310.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998 snackeru@my-dejanews.com wrote:
> I can set a cookie with multiple values but I don't know how to split
> those values when printing to a web page.
Maybe you want Perl's split function? But if your question is really about
cookies (as opposed to being about processing a string of data) the docs,
FAQs, and newsgroups about browsers and related issues may be useful here.
Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 05 Nov 1998 01:01:36 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Easy Way? Or More Efficient Way?
Message-Id: <QN602.50$s86.183149@nsw.nnrp.telstra.net>
In article <71qnnf$7v5$1@nnrp1.dejanews.com>,
ywang@maingate.net writes:
> Is there any easy/efficient way to get the number of certain chars presented
> in a given string?
# perldoc perlfaq4
/How can I count the number of occurrences of a substring within a string?
> Thanks. Please CC your answer to yxw1@yahoo.com
Why do you want me to send a CC to that address, while yours is
ywang@maingate.net? Anyway, I have disabled CCs in my newsreader :)
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Thu, 05 Nov 1998 02:30:09 GMT
From: mcrogerm@stjohn.stjohn.ac.th
Subject: Error: "use_alarm" in LWP::Protocol::http.pm
Message-Id: <71r2jh$mu3$1@nnrp1.dejanews.com>
I've been trying to create a CGI script which will take data from a
form, massage it, send the data by a secure connection to a remote
server, massage the returned data, store the data in a database and
send out an e-mail. Most of it is straightforward, but I have been
having incredible difficulty creating the secure connection to the
remote server.
As part of the development process I have gotten up to trying to send
data by a *non*-secure connection to a remote server. I thought my
troubles were over when I discovered LWP::UserAgent.
I set up a request by:
<-- start code -->
# Create a user agent object
$ua = new LWP::UserAgent;
$ua->agent('$0.1' . $ua->agent);
# Create a request
my $req = new HTTP::Request 'POST' =>
'http://wwws.echo-inc.com:443/scripts/INR200.EXE';
$req->content_type('application/x-www-form-urlencoded');
$req->content(%data);
# Pass request to the user agent and get a response back
my $result = $ua->request($req);
<-- end code -->
However, when I try to run the script from my website, I get the
error message:
"500 (Internal Server Error) Can't locate object method "use_alarm"
via package "LWP::Protocol::http" Client-Date: Thu, 29
Oct 1998 10:27:56 GMT ".
When I grep for "use_alarm", the only place I can find it is as a
subroutine in LWP::UserAgent, where it tells Carp::carp that
"use_alarm" is a noop.
I'm stumped. I've tried using the Excite search engine on the module
documentation data base at uwinnipeg and haven't found anything. I tried
adding "use Config;" to the libraries to use and that didn't help. I believe
it has to be something to do with the configuration of my web server, but the
tech support people there say they do not provide help with troubleshooting
CGI scripts. They are running Irix 6.5, by the way.
I suspect this has something to do with LWP::Protocol::http.pm setting a
time-out value, but that surely should be routine -- why am I getting an
error message? The examples in LWP and lwpcook seem so straightforward and
easy to understand that this is even more frustrating. If this was a bug in
the LWP library why hasn't it been observed and fixed long ago? Should I go
back and try to implement this using Socket? The point of using LWP is to
avoid the low-level coding that would require -- and also to defer learning
about sockets until later.
Help!
--
Roger
Some days you're the dog,
some days you're the hydrant.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 4 Nov 1998 19:48:11 -0600
From: "Kris (Menace Publishing & Manufacture)" <menace@ziplink.net>
Subject: Having problems with a long script
Message-Id: <at702.1960$Qc3.480249@newscene.newscene.com>
Having problems with a very long script -- getting the error message it
generates tells me it's due to "Premature end of script headers". Those
headers follow (I think -- I'm not
even sure where the header ends and the body begins). Any and all help would
be gratefully appreciated. I'm a total perl moron, surprise surprise.
#!/usr/bin/perl -- -*- C -*-
$logging = 1;
$logfile = '/usr/httpd/www/fakedomain/ORDER';
$script_loc = '/usr/httpd/www/fakedomain/cgi-bin/mailto.pl';
$cgi_lib = 'cgi-lib.pl';
$script_http = 'http://vwww2.clark.net/fakedomain/cgi-bin/mailto.pl';
$toname = 'fake@clark.net';
require "cgi-lib.pl";
--
--
Kris Kane, Big Shot
Menace Publishing & Manufacture
Box 23151 Alexandria, VA 22304-9315
menace@ziplink.net http://www.menace.com
------------------------------
Date: Thu, 5 Nov 1998 12:20:22 +1100
From: "Brad McCready" <kaarkas@bigpond.com>
Subject: help with REMOTE_USER
Message-Id: <3640fb7d.0@139.134.5.33>
hi all,
i have one directory protected by basic http authentication, i want members
after passing authentication to be able to edit a profile to be viewable by
the general public. i wish to do this as a text file which has the username
that they entered for authentication as a filename. i am having difficulties
getting a perl/cgi script to read their usernames - i have tried using both
REMOTE_USER and REMOTE_IDENT in a cgi script but cant get it working. this
is the <i>very</i> basic cgi script that i am trying to use to test it
out...
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print REMOTE_USER();
print REMOTE_IDENT();
#end - very very basic.....
this script is called by a page inside the protected directory so a user has
to pass authentication to get to it. i read at
http://hoohoo.ncsa.uiuc.edu/cgi/env.html that this will only work if the
script is also protected. i do not wish to protect my cgi-bin as i have
other scripts that anyone can use. please tell me what i am doing wrong
here.
thanks in advance for any help given
Brad McCready
http://701squad.hypermart.net
ps. i'm not too worried about security - after all its just a homepage for
my quake clan. but im using it for my experimentations in perl.
------------------------------
Date: 04 Nov 1998 17:10:04 -0800
From: Charles Roten <croten@bigger.aa.net>
Subject: Heterogeneous Data Structures: possible? If so, how?
Message-Id: <xfkpvb3j66r.fsf@bigger.aa.net>
I want to do something more than a little odd ... I want to build a
structure $DataStructure such that sometimes
$DataStructure->[$index]->{$key}
refers to a scalar/string, and sometimes to a named hash or array.
As in (string case)
$FireWall_Rule->[7]->{"install"}->"firewall_box"
but (array case)
$FireWall_Rule->[7]->{"services"}->[0]->"telnet"
$FireWall_Rule->[7]->{"services"}->[1]->"login"
$FireWall_Rule->[7]->{"services"}->[2]->"echo-request"
and (hash case)
$FireWall_Rule->[7]->{"action"}->{"accept"}->{"type"}->"accept"
$FireWall_Rule->[7]->{"action"}->{"accept"}->{"color"}->"Dark green"
$FireWall_Rule->[7]->{"action"}->{"accept"}->{"icon-name"}->"icon-accept"
etc. All in the _same_ $FireWall_Rule structure.
Srinivasan's "Advanced Perl Programming" lies open on my desk as I
write this. I have seen no mention of such a complex structure in
this work, nor in the "Perl Cookbook".
Is such a thing practical ? Can some kind soul point me to any
examples of this sort of thing, or any other documentation besides
Srinivasan ? Are there any "gotchas" I should be aware of ?
Thanks in advance, Charles.
--
croten@aa.0SPAM.net |Pursuant to US Code, Title 47, Chapter 5, Subchapter II,
(Charles D. Roten) |227, any and all nonsolicited commercial E-mail sent to
|this address is subject to a download and archival fee of
|$500 US. E-mailing denotes acceptance of these terms.
------------------------------
Date: 5 Nov 1998 02:34:39 GMT
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: Heterogeneous Data Structures: possible? If so, how?
Message-Id: <slrn7423lv.ltg.dformosa@godzilla.zeta.org.au>
In article <xfkpvb3j66r.fsf@bigger.aa.net>, Charles Roten wrote:
>I want to do something more than a little odd ... I want to build a
>structure $DataStructure such that sometimes
>
> $DataStructure->[$index]->{$key}
>
>refers to a scalar/string, and sometimes to a named hash or array.
[...]
>Is such a thing practical ?
It is possable, as long as you know which keys map to wich types its
also practical. meany of my object are structured like this. You
can also use ref to find out what each thing points to, but thats
just messy.
--
Please excuse my spelling as I suffer from agraphia. See
http://www.zeta.org.au/~dformosa/Spelling.html to find out more.
------------------------------
Date: Wed, 4 Nov 1998 21:55:20 -0500
From: "Don Silvia" <dlsilvia_remove_to_reply_@mediaone.net>
Subject: Re: How to run Perl/CGI under NT?
Message-Id: <As802.45$7o.543756@brnws01.ne.mediaone.net>
[Posted and mailed]
Shane,
For Netscape on NT, wrap the perl script in a batch file. Check out
http://www.netaxs.com/~joc/perl.html#BatWrap
Don Silvia
Shane Baker wrote in message <363F4795.45E8E05C@merck.com>...
>I realize that many of you take offense at questions on this subject here,
>but there doesn't seem to be anything in any of the related FAQs about
>this. I have the same problem and I think I have narrowed it down to the
>way Windows handles file associations.
>
>This isn't really a perl problem, just hoping someone here will be able to
>help. Working from a command prompt, I got the following results (the
>contents of the script are not relavant, let's say that it just prints
>Hello World):
>
><prompt>perl test.pl --- this is fine.
><prompt>test.pl --- fine
><prompt>perl test.pl > out.txt --- fine
><prompt>test.pl > out.txt --- NOT FINE - out.txt is 0 bytes.
>
>I setup a test file association with the same results, so it is not perl
>specific (again, I know I might be inviting flames here). I am guessing
>that this is the reason Java WebServer and Netscape SuiteSpot both fail to
>produce any output when I try to use perl for my cgi programs (I rewrote
>in C and it worked fine).
>
>Reading through this newsgroup, it appears that everyone who is running
>perl/cgi on NT is using IIS and it looks as though IIS has its own file
>association stuff built in. I would like to stay as far away from MS
>products as possible (I'm writing on NT because it is mandated at work).
>I haven't installed IIS because it requires that I install IE.
>
>If there is anyone who has anything to offer on this subject, it would be
>greatly appreciated.
>
>Shane Baker
>
------------------------------
Date: Wed, 4 Nov 1998 17:42:59 -0800
From: "Kuntal M. Daftary" <daftary@cisco.com>
Subject: mime utilities in perl
Message-Id: <Pine.GSO.3.96.981104173638.19000J-100000@daftary-ultra.cisco.com>
Hi
does anyone know about any mime utility in perl that would do the following:
- read the mailcap files and mime.types files
- and then when provided with a filename, from the file extension figure out
the correct program to spawn using the info it got from mailcap/mimetypes
my main motivation behind this is to be able to say:
% mimerun a.fm
# spawns frame-reader
% mimerun a.gif
# spawns xv or image-magick
% mimerun a.gz
# gunzips the file
i am currently using a small library i patched together myself and it works ok.
but my concerns are:
- it is not RFC compliant
- it will not work correctly when mime-types are specified in the form:
image/*
- if there is a existing, complete, robust and RFC compliant perl
library/module available, why re-invent the wheel
i already looked at Mime::Lite and Mime::Tools in CPAN archive but they dont
serve the purpose
Kuntal Daftary
------------------------------
Date: Thu, 05 Nov 1998 01:04:46 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Need Perl help on which 'box'.
Message-Id: <OQ602.52$s86.183149@nsw.nnrp.telstra.net>
In article <MA602.82$DA6.19007@news.connectnet.com>,
"Rusty Williamson" <rwilliamson@uno.gers.com> writes:
> My Perl scripts need to know what they are running on. Does anyone know of
> a Perl function which will return the platform and/or OS version it is
> running on (i.e. Windows 98 [Version 4.10.1998], Windows NT Version 4.0,
> Linux 2.0.30, DG/UX Release R4.11MU04 AViiON, etc)?
Not exactly, but the special variable $^O (or $OSNAME) might be enough
for your needs:
# perldoc perlvar
Possibly, once you figure out the platform, you could do something
platform specific, like a syscall, or something external with uname or
so.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Thu, 05 Nov 1998 01:11:34 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Need Perl help on which 'box'.
Message-Id: <slrn741uo9.55.alastair@calliope.demon.co.uk>
Rusty Williamson <rwilliamson@uno.gers.com> wrote:
>My Perl scripts need to know what they are running on. Does anyone know of
>a Perl function which will return the platform and/or OS version it is
>running on (i.e. Windows 98 [Version 4.10.1998], Windows NT Version 4.0,
>Linux 2.0.30, DG/UX Release R4.11MU04 AViiON, etc)?
You could try the $^O variable to glean something - see perlvar.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Wed, 04 Nov 1998 20:27:45 -0500
From: Rob Conrad <rob@happy.com>
Subject: Need perl socket programming help
Message-Id: <3640FF11.727E53E9@happy.com>
I have a, what I think would be fairly simple, programming request that
we would be willing to negotiate some money for.
I have a piece of software that outputs some data (only around 350 bytes
or so) to a particular port (tcp) on a particular machine. What I need
to do is to have a perl program
run to listen to a port and receive data from it. When it does it needs
to transfer that
data to another host/port and then receive a response. When it receieves
the response back from the second host it needs to remove the first 15
characters and then send that response back to the first host. (the
program acts as an intermediary between 2 computers basically, but
strips first 15 bytes of a transmission from B to A.)
This program would need to be constantly listening to a specified port
and can perform
this function continuosly.
I could probably figure it out myself but am a little weak in network
programming. I need
this done asap. If anyone thinks they can do it I would be glad to call
and speak with them. If it works the way I would like we can negotiate
some fee for doing this. Please email me with responses.
BTW, this will run on AIX 4.2.
---------------------------------------------------------
Rob Conrad rob@happy.com
Happy Harry's, Inc. 302-366-0335 ext 282
315 Ruthar Dr. Fax: 302-283-5200
Newark De 19711
------------------------------
Date: Thu, 05 Nov 1998 01:05:57 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Not to start a language war but..
Message-Id: <slrn741udo.55.alastair@calliope.demon.co.uk>
Hoon Yoon <hyoon@bigfoot.com> wrote:
>How do I get rid of this thread only from Netscape Discussion? I do not
>want to see old articles anymore clogging up my window. Just every other
>discussion is about this and it's comming down to a slugging match.
>Sigh...
I had this problem in Netscape too, a long time ago. I switched news readers.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: 5 Nov 98 02:47:51 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Not to start a language war but..
Message-Id: <910234358.50138@thrush.omix.com>
Michael P. Reilly <arcege@shore.net> wrote:
>snip<
: Then I think the question should have been stated better,
perldoc -f warn
That's about as clearly as should be needed.
>snip<
: There is no warn() function in Python because it probably wasn't worth
: putting on in, just like it wasn't worth putting "die" in. Python can
: handle the exceptions itself.
Die() is the same as throw, it throws an exception.
: But (and this is promoted in the Perl world as well), it is bad style
: to go into __builtin__ and CORE (which means that use of __WARN__ might
: not be something that should be condoned).
__WARN__ is in no way depreciated or considered "bad style", neither
is CORE::.
>snip<
: How is warn() ANYTHING like an exception handler?
Think of it as an async catch{}
## Throw exception only on file not found warning
$SIG{__WARN__} = sub {
my $mess = shift;
die $mess if ($mess =~ /file not found/i);
warn ($mess);
};
## Add full stack traces to warnings:
use Carp 'cluck';
$SIG{__WARN__} = sub { cluck @_ };
: The manpage
: (perlfunc) for Perl 5.004_4 states (since Perl 5.005 is a development
: release, it is unavailable for comment in these debates, just as Python
: 1.5.2):
Your information about Perl is a couple moons outdated:
> ls -l /pub/plan/perl/CPAN/src
total 36
dr-xr-xr-x 5 0 0 8192 Nov 2 13:13 5.0/
lrwxrwxrwx 1 0 0 10 Jun 27 12:08 ENDINGS@ -> ../ENDINGS
-r--r--r-- 1 0 0 5357 Sep 10 15:56 README
lrwxrwxrwx 1 0 0 38 Nov 2 13:13 devel.tar.gz@ -> ../authors/id/GSAR/perl5.005_53.tar.gz
lrwxrwxrwx 1 0 0 13 Oct 31 13:17 devel.zip@ -> 5.0/devel.zip
-r--r--r-- 1 0 0 0 Oct 31 14:57 devel_is_5.005_53
-r--r--r-- 1 0 0 6138 Oct 4 12:13 index.html
lrwxrwxrwx 1 0 0 13 Sep 25 12:15 latest.tar.gz@ -> stable.tar.gz
lrwxrwxrwx 1 0 0 10 Sep 25 12:15 latest.zip@ -> stable.zip
-r--r--r-- 1 0 0 0 Sep 25 14:33 latest_is_5.005_02
dr-xr-xr-x 2 0 0 8192 Jun 30 23:58 misc/
lrwxrwxrwx 1 0 0 38 Jul 24 12:22 perl5.004_04.tar.gz@ -> ../authors/id/TIMB/perl5.004_04.tar.gz
lrwxrwxrwx 1 0 0 35 Jul 24 12:22 perl5.005.tar.gz@ -> ../authors/id/GSAR/perl5.005.tar.gz
lrwxrwxrwx 1 0 0 38 Aug 10 00:08 perl5.005_02.tar.gz@ -> ../authors/id/GSAR/perl5.005_02.tar.gz
lrwxrwxrwx 1 0 0 38 Sep 15 12:14 stable.tar.gz@ -> ../authors/id/GSAR/perl5.005_02.tar.gz
lrwxrwxrwx 1 0 0 15 Sep 15 12:14 stable.zip@ -> 5.0/p500502.zip
-r--r--r-- 1 0 0 0 Aug 11 09:05 stable_is_5.005_02
^^^^^^^^^^^^^^^^^^
latest -> stable -> 5.00502
5.00502 IS the current release.
: perlfunc(1)
: warn LIST
: Produces a message on STDERR just like die(), but
: doesn't exit or throw an exception.
:
: No message is printed if there is a $SIG{__WARN__}
: handler installed. It is the handler's
: responsibility to deal with the message as it sees
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: fit (like, for instance, converting it into a
^^^ ^^^^^^^^^^^^^^^^^^^^
: die()). Most handlers must therefore make
^^^
Basically, a catch{} that defaults to spitting the
message to STDOUT, but can handle it any way it likes
to (just as a normal catch{} can), with the ADDED power
to *return* to where the "exception" was called to continue.
>snip<
: local $SIG{__WARN__} = sub { die $_[0] };
: eval $proggie;
: It does not throw an exception, so how can it be equated to raising
: one? (unless the warn handler then uses die). Warn is called
: explicitly in the user code, so it is again unlike Java or Python
: built-in exceptions.
A bare eval{} is equated to:
try {
code
} catch (Exception e) {}
Perl is not about syntactic salt as Java and Python are.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Fri, 30 Oct 1998 22:40:29 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Ok. Please Explain This (simple?) Regex.
Message-Id: <Pine.GSO.4.02A.9810301431560.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, Danny Groppo wrote:
> $string = "56";
> @zips = $string =~ m/(?:\d)\d/g;
> for (@zips) { print "$_\n"; }
This matches one time, with the first \d matching the 5, and the second
matching the 6. As perlop says:
If there are no [memory] parentheses, it returns a list of all
the matched strings, as if there were parentheses around the
whole pattern.
So this prints 56.
> $string = "56";
> @zips = $string =~ m/(?:\d)(\d)/g;
> for (@zips) { print "$_\n"; }
This matches the same way, but now there are memory parens. So, as perlop
says:
it returns a list of all the substrings matched by all the
parentheses in the regular expression.
So this prints 6.
> $string = "56";
> @zips = $string =~ m/(?:\d)*?\d/g;
> for (@zips) { print "$_\n"; }
This does something different. First, the non-greedy part can succeed in
matching nothing, so it does. So the first match gets the 5. Now the match
tries again, and the non-greedy part can still succeed when it matches
nothing, so the second iteration gets the 6. So this prints 5, then 6.
> My understanding of the lookahead is that it matches position in a
> string similar to the way a word boundary does.
Yes, but you have no lookaheads here. Maybe you're thinking of (?=...)
instead of (?:...), perhaps?
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 4 Nov 1998 20:54:59 -0600
From: "Jeff Lovell" <jalovel@email.msn.com>
Subject: Re: Pattern matching
Message-Id: <uMcCseGC#GA.255@upnetnews02.moswest.msn.net>
I hate to sound stupid here, but is this how you answer all questions on
this newsgroup Tom? I probably shouldn't have asked, you will tell me to
read the FAQ or RTFM.
Thanks.
Jeff
Tom Phoenix wrote in message ...
>See the FAQ, section four. Also, check out the Text::CSV module on CPAN.
------------------------------
Date: Wed, 4 Nov 1998 17:44:18 -0800
From: "J Barlow" <Jim_Barlow@bc.sympatico.ca>
Subject: Perl string manipulation
Message-Id: <71r003$r39$1@news.bctel.net>
Is there any site that explains this very well? i.e. all of the various
syntax and what it does. I can understand the simple expressions eg. $x =~
s/blah//i; but not the more complex things...
Thanks
------------------------------
Date: Thu, 05 Nov 1998 02:04:45 GMT
From: Justin Harvey <jbharvey@corp.home.net>
Subject: Re: Perl string manipulation
Message-Id: <364107C9.96CA6E90@corp.home.net>
The docs?
http://www.perl.com/CPAN-local/doc/manual/html/pod/perl.html
J Barlow wrote:
>
> Is there any site that explains this very well? i.e. all of the various
> syntax and what it does. I can understand the simple expressions eg. $x =~
> s/blah//i; but not the more complex things...
>
> Thanks
--
Justin B. Harvey @Home Network
@Work Software Engineer 425 Broadway
jbharvey@corp.home.net Redwood City, CA 94063
Voice: (650) 569-5692 http://www.home.net
------------------------------
Date: Thu, 05 Nov 1998 02:14:32 GMT
From: jbharvey@auspex.net
Subject: Re: perl&cgi question
Message-Id: <71r1m8$lch$1@nnrp1.dejanews.com>
No, it is NOT a server thing, his browser has to understand how to interpret
what type of document he has and what to do with it. You have to change the
pl associate or MIME: application/x-perl to run it within the browser and not
to save it as a file. One of his browsers, I can't remember which is doing
this fine, he needs to do it on the other one.
j
In article <comdog-ya02408000R0211981800300001@news.panix.com>,
comdog@computerdog.com (brian d foy) wrote:
> In article <363DDAE2.A18140AE@corp.home.net>, Justin Harvey
<jbharvey@corp.home.net> posted:
>
> > You need to change the mime association for .pl extension inside your
> > browsers so that it will use it as a CGI, and not try to download it.
>
> sorry, but it's the server that does what you are thinking about.
>
> --
> brian d foy <comdog@computerdog.com>
> CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 5 Nov 1998 02:24:20 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: perl&cgi question
Message-Id: <slrn74232m.rqo.sholden@pgrad.cs.usyd.edu.au>
On Thu, 05 Nov 1998 02:14:32 GMT, jbharvey@auspex.net <jbharvey@auspex.net>
wrote:
>No, it is NOT a server thing, his browser has to understand how to interpret
>what type of document he has and what to do with it. You have to change the
>pl associate or MIME: application/x-perl to run it within the browser and not
>to save it as a file. One of his browsers, I can't remember which is doing
>this fine, he needs to do it on the other one.
You are completely wrong here. By definition a CGI program does not
run in the browser, but on the server. Since the server couldn't care less
about the browser's MIME setup changing it won't help...
The server needs to know the .pl is a valid extension for CGI scripts and thus
execute the script and pass on the ouput, instead of just outputting the
contents of the file (as it would normally do).
--
Sam
compiling kernels is what I do most, so they do tend to stick to the
cache ;) --Linus Torvalds
------------------------------
Date: Fri, 30 Oct 1998 22:54:51 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Problems setting up script on Vservers
Message-Id: <Pine.GSO.4.02A.9810301452360.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998 lux_interior@my-dejanews.com wrote:
> I'm having alot of problems trying to set up a perl script on my
> virtual server
If your problem is with your server, the docs, FAQs, and newsgroups about
servers may be of help to you.
> They are unable/unwilling to offer any support as it is not one of
> their own scripts so I'm at a loss as to where to go for help.
You can get as much support as you want to pay for. :-)
http://www.perlsupport.com/
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 5 Nov 1998 03:17:14 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: replacing inbetween 2 keywords
Message-Id: <1dhzocj.11wl5gm1ijh1a0N@host007-210.seicom.net>
Tom Phoenix <rootbeer@teleport.com> wrote:
> Maybe when Perl 17 introduces the DWIM operator, but not
> yet.
Carefull with that stuff - look:
% perl -v
This is perl, version 17.006
I think therefore I am.
^^^^^^^^^^^^^^^^^^^^^^^
Copyright 1987-2006, Larry Wall
;-)
Joergen
--
To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
"Everything is possible - even sometimes the impossible"
HOELDERLIN EXPRESS - "Touch the void"
------------------------------
Date: Fri, 30 Oct 1998 22:27:59 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: scoping troubles
Message-Id: <Pine.GSO.4.02A.9810301425321.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, Ian Lowe wrote:
> Global symbol "crit" requires explicit package name at ./dfrev.pl line
> 36.
> Global symbol "warn" requires explicit package name at ./dfrev.pl line
> 38.
> 9 my (%size,%capacity,%owner,%warn,%crit);
Here you've declared those hashes.
> 18 while (<CONFIG>) {
> 19 my ($fs,$owner,$warn,$crit) = (split(/\s+/));
Here you've declared two scalars with those names...
> 20 $owner{$fs} = $owner;
> 21 $warn{$fs} = $warn;
> 22 $crit{$fs} = $crit;
> 23 }
...which are now out of scope.
> 36 system("$efm CRITICAL $class $host $owner{$fs}
> \"Filesystem $fs is over $crit% ($capacity{$fs}%)\"");
So when you use $crit here, it's a new variable. Did you mean
$crit{something}?
> 38 system("$efm WARNING $class $host $host \"Filesystem
> $fs is over $warn% ($capacity{$fs}%)\"");
And the same goes for $warn here. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 4 Nov 1998 16:07:17 -0800
From: swingkid@usa.net (Mark Tagawa)
Subject: Re: Tk on NT
Message-Id: <MPG.10aa8c0d11cec09d989687@news.newsguy.com>
In article <71kj5j$6ui@panix.com>, clay@panix.com says...
> In <71keqe$kq4$1@nnrp1.dejanews.com> keydet89@yahoo.com writes:
>
> >Does anyone have any information regarding where to get
> >and how to install/use Tk on NT?
>
> Try: http://www.scriptics.com/software/download.html
>
> --
> Clay Irving
> clay@panix.com
>
The above is good for Tcl/Tk, but for perl, it's probably easier to
download the latest ActiveState Perl distribution. After you install
that run ppm.pl to install Tk.
i.e.
cd to \perl\bin
perl ppm.pl
PPM>install Tk
Good luck
------------------------------
Date: Fri, 30 Oct 1998 22:52:08 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Using system( ) command to copy files
Message-Id: <Pine.GSO.4.02A.9810301451330.3421-100000@user2.teleport.com>
On 31 Oct 1998, Liew Fook Sin wrote:
> Subject: Using system( ) command to copy files
Why not use File::Copy, instead? Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 4153
**************************************