[10562] in Perl-Users-Digest
Perl-Users Digest, Issue: 4154 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 5 01:07:23 1998
Date: Wed, 4 Nov 98 22:00:19 -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: 4154
Today's topics:
Re: Can perl grab a file from another server? <rootbeer@teleport.com>
currancy variable, newbie question <jajej@ici.net>
Re: currancy variable, newbie question (Jye Tucker)
File Locking and Flushing (Bill Moseley)
Re: filehandle ? - why does this work <rootbeer@teleport.com>
Re: help with REMOTE_USER (brian d foy)
Help! Need input string editing module <mrosen@cs.technion.ac.il>
Re: Help! Need input string editing module (Sam Holden)
Internal Server Error <WILLEN@prodigy.net>
Re: Newbie: read a string from keyboard (Kevin Reid)
Re: Pattern matching (Ronald J Kimball)
PC parallel to Solaris serial eric.wai@bcs.org.uk
PC parallel to Solaris serial eric.wai@bcs.org.uk
Re: Perl string manipulation (Ronald J Kimball)
Re: perl&cgi question (brian d foy)
Re: perlcc and shared libraries (Charles J. Leslie)
Re: programing fun: tree: Transpose (Ronald J Kimball)
Red Hat, perl & shadow rbaguer@freenet.columbus.oh.us
redirecting interpreter output <rebelvideo@hotmail.com>
Re: Reference Safety (Brad Appleton)
Sorting/Newbie Help <desquite@hotmail.com>
Re: Sorting/Newbie Help (Jye Tucker)
Re: Sorting/Newbie Help <desquite@hotmail.com>
Re: Testing Perlscript at home <rootbeer@teleport.com>
Re: Testing Perlscript at home <nobody@nowhere.com>
Re: Using Meta tags with CGI.pm (Andre L.)
Re: What is the "correct" location of perl under Solari (Ronald J Kimball)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 30 Oct 1998 23:37:14 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Can perl grab a file from another server?
Message-Id: <Pine.GSO.4.02A.9810301536500.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, Alistair Calder wrote:
> Subject: Can perl grab a file from another server?
Get LWP from CPAN. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 5 Nov 1998 05:24:03 GMT
From: "James Jones" <jajej@ici.net>
Subject: currancy variable, newbie question
Message-Id: <01be087c$b01fe600$b32ab4cf@jajej.ici.net>
i have a variable called $price.
when calculating this variable to different percentages I come up with a
number with more that two decimal places.
I want to limit this variable to two decimal places eqivalent to a currancy
field.
12.2534586 -> 12.26
How would I accomplish this??
Any help would be appreciated.
Jim Jones
------------------------------
Date: Thu, 05 Nov 1998 15:39:09 +1000
From: jye@buckconsultants.com.au (Jye Tucker)
Subject: Re: currancy variable, newbie question
Message-Id: <jye-ya02408000R0511981539090001@qld.nnrp.telstra.net>
In article <01be087c$b01fe600$b32ab4cf@jajej.ici.net>, "James Jones"
<jajej@ici.net> wrote:
> i have a variable called $price.
>
> when calculating this variable to different percentages I come up with a
> number with more that two decimal places.
>
> I want to limit this variable to two decimal places eqivalent to a currancy
> field.
>
> 12.2534586 -> 12.26
>
> How would I accomplish this??
Hi Jim,
printf("%.2f", $price) should do the trick for you.
Check out section 4 of the FAQ (type 'perldoc perlfaq4' (minus the
quotation marks) at your command prompt). I think it's the first entry in
the FAQ or close enough to it.
Hope that helps,
Jye
------------------------------
Date: 05 Nov 1998 04:50:33 GMT
From: moseley@best.com (Bill Moseley)
Subject: File Locking and Flushing
Message-Id: <36412e99$0$29760@nntp1.ba.best.com>
Hi,
I've got a CGI script that appends a file with a single line of text. I open
the output file, and flock() it.
When I close the file I:
flock($fh,LOCK_UN);
close $fh;
It would seem to me that I should worry about the time between the flock
(the unlock) and the close (which is probably when the file really gets
written.
Like so many others, I'm new to all this: Is setting $| = 1 before my print
enough to force flushing the buffer to the file, or do I need to be more
specific like:
use IO::Handle;
open(FH, ">myfile");
FH->autoflush(1);
And if so, what's the difference, and why so many ways to set nonbuffered
output?
What if I just don't call flock($fl,LOCK_UN) at all. Would the close then
flush, and then close and unlock?
Thanks ever so much,
--------------
Bill Moseley
moseley@best.com
------------------------------
Date: Fri, 30 Oct 1998 23:04:13 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: filehandle ? - why does this work
Message-Id: <Pine.GSO.4.02A.9810301503250.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, Alexander Bibighaus wrote:
> If I understand things correctly, LOG is a localized variable
> within the package logger? Am I right here?
No, it's a global variable. All package variables are global. Hope this
helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 05 Nov 1998 00:19:37 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: help with REMOTE_USER
Message-Id: <comdog-ya02408000R0511980019370001@news.panix.com>
In article <3640fb7d.0@139.134.5.33>, "Brad McCready" <kaarkas@bigpond.com> posted:
> 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();
you can't just guess at things and expect them to work. this isn't
sociology.
the references in the CGI Meta FAQ should help.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 05 Nov 1998 04:48:46 +0200
From: Mark Rosenschein <mrosen@cs.technion.ac.il>
Subject: Help! Need input string editing module
Message-Id: <3641120E.29747A55@cs.technion.ac.il>
Hi, all!
I need a module / script which provides input string editing
capabilities.
Something like csh/tcsh does : you can fix mistakes in your command
(backspace, del, arrows), jump to the beginning of the input line
(Ctrl-a) or to the end (ctrl-e) and so on.
I'd be very thankful for exact location or piece of code and short
example how to use it. Please, do not send me to dig through CPAN lists
of modules.
Regards,
Mark
Please, reply by e-mail.
------------------------------
Date: 5 Nov 1998 03:13:40 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Help! Need input string editing module
Message-Id: <slrn7425v5.11a.sholden@pgrad.cs.usyd.edu.au>
[posted and CCd]
On Thu, 05 Nov 1998 04:48:46 +0200, Mark Rosenschein
<mrosen@cs.technion.ac.il> wrote:
>Hi, all!
>
>I need a module / script which provides input string editing
>capabilities.
>Something like csh/tcsh does : you can fix mistakes in your command
>(backspace, del, arrows), jump to the beginning of the input line
>(Ctrl-a) or to the end (ctrl-e) and so on.
>
>I'd be very thankful for exact location or piece of code and short
>example how to use it. Please, do not send me to dig through CPAN lists
>of modules.
So every time you something your going to ask here then...
Took me ten seconds with :
;perl -MCPAN -eshell
<snip>
cpan> m /Readline/
<snip>
Module Term::ReadLine <snip>
Module Term::ReadLine::Gnu <snip>
Module Term::ReadLine::Perl <snip>
Module readline <snip>
I'd guess one of those would do the job...
(I snipped off the location information since you might as well learn how to
'dig through CPAN lists of modules' since it takes no effort at all...)
--
Sam
People get annoyed when you try to debug them.
--Larry Wall
------------------------------
Date: 5 Nov 1998 03:30:29 GMT
From: "AL WILLEN" <WILLEN@prodigy.net>
Subject: Internal Server Error
Message-Id: <01be086d$0c8bd260$025b9cd1@pip-squeek>
As of last Friday, all the PERL programs I've written have generated an
"Internal Server Error" message being thrown back at me when the script is
evoked. (I've checked the program again and again visually, and it checks
out. It also checks out when I run the program under Windows 95.)
However, it crashes when I run it on-line on a UNIX server. (I remembered
to set the Permissions properly, so that's not the problem.)
I received a cryptic message from a friend of a friend of a friend who says
(and I quote): "Al has run into the age old dos carriage return problem
.. he needs to fix_cr the perl files before they will run properly."
Does anyone know what this means? (Does he mean use CHOMP?) More
importantly, what other things could cause an Internal Server Error?
Please e-mail me suggestions to: willen@prodigy.net
Thanks in advance for your help!
-- Al Willen
------------------------------
Date: Thu, 5 Nov 1998 00:31:13 -0500
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Newbie: read a string from keyboard
Message-Id: <1dhxdnk.ihciao1jvsvp0N@slip-32-100-246-79.ny.us.ibm.net>
Joyot Pierre <joyot@univ-tln.fr> wrote:
> My problem:
> How can i read a string from keyboard (the Pascal readln)?
>
> A very simple problem I suppose !
# two lines:
$line = <STDIN>; # read line
chomp $line; # remove "\n" from end
# same thing, one line:
chomp ($line = <STDIN>);
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: Wed, 4 Nov 1998 23:58:36 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Pattern matching
Message-Id: <1dhztk8.2y0xei1799b34N@bay2-206.quincy.ziplink.net>
Jeff Lovell <jalovel@email.msn.com> wrote:
> 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.
Not all questions. Only those questions that can be answered by reading
the FAQ or the manual.
> Tom Phoenix wrote in message ...
> >See the FAQ, section four. Also, check out the Text::CSV module on CPAN.
If not for Tom Phoenix, someone else would have to do it.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Thu, 05 Nov 1998 03:36:55 GMT
From: eric.wai@bcs.org.uk
Subject: PC parallel to Solaris serial
Message-Id: <71r6go$re9$1@nnrp1.dejanews.com>
Hi,
I am trying to hook up the Parallel Port on a PC with the Serial Port on a SUN
running Solaris 2.5.1. When the PC sends a file to the printer/parallel port,
it will be captured by the SUN.
Signal from the Parallel Port will go thru a Parallel-to-Serial converter and
convert to serial signal before it is fed into the ttya of the SUN box. For
example, if I do "echo hello world > lpt1". The text will get convert to
serial signal and pump into the Serial port of the Solaris machine.
Since it is the first step of my project, I have written a simple Perl program
on the SUN and try to capture the signal.
#!/usr/local/bin/perl5 -w
open(COM_PORT, "< /dev/ttya") || die "cannot read from /dev/ttya\n";
while (! (eof COM_PORT)) {
$char = getc COM_PORT;
print "(",ord $char,")(",$char,")\n";
}
close COM_PORT;
exit;
As expected, "hello world" is captured by my program. However, the PC keeps
sending the newline character (ascii 10) to the SUN. If I keep the set
up/program running, my SUN will end up crashed with error message
"output_echo_char: out of blocks" appears on the console.
Can anyone tell me why the PC keeps sending out the newline character after
"hello world", and how could I stop it.
Thanks in advance.
Eric.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 05 Nov 1998 03:37:27 GMT
From: eric.wai@bcs.org.uk
Subject: PC parallel to Solaris serial
Message-Id: <71r6ho$reb$1@nnrp1.dejanews.com>
Hi,
I am trying to hook up the Parallel Port on a PC with the Serial Port on a SUN
running Solaris 2.5.1. When the PC sends a file to the printer/parallel port,
it will be captured by the SUN.
Signal from the Parallel Port will go thru a Parallel-to-Serial converter and
convert to serial signal before it is fed into the ttya of the SUN box. For
example, if I do "echo hello world > lpt1". The text will get convert to
serial signal and pump into the Serial port of the Solaris machine.
Since it is the first step of my project, I have written a simple Perl program
on the SUN and try to capture the signal.
#!/usr/local/bin/perl5 -w
open(COM_PORT, "< /dev/ttya") || die "cannot read from /dev/ttya\n";
while (! (eof COM_PORT)) {
$char = getc COM_PORT;
print "(",ord $char,")(",$char,")\n";
}
close COM_PORT;
exit;
As expected, "hello world" is captured by my program. However, the PC keeps
sending the newline character (ascii 10) to the SUN. If I keep the set
up/program running, my SUN will end up crashed with error message
"output_echo_char: out of blocks" appears on the console.
Can anyone tell me why the PC keeps sending out the newline character after
"hello world", and how could I stop it.
Thanks in advance.
Eric.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 4 Nov 1998 23:58:39 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Perl string manipulation
Message-Id: <1dhztql.hmypm167dr40N@bay2-206.quincy.ziplink.net>
J Barlow <Jim_Barlow@bc.sympatico.ca> 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...
How about a book? I recommend Mastering Regular Expressions, by Jeffrey
Freidl. It does a terrific job of explaining regular expressions from
all angles, including a chapter focusing specifically on regexes in
Perl.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Thu, 05 Nov 1998 00:17:26 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: perl&cgi question
Message-Id: <comdog-ya02408000R0511980017260001@news.panix.com>
In article <slrn74232m.rqo.sholden@pgrad.cs.usyd.edu.au>, sholden@cs.usyd.edu.au posted:
> 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...
actually, the problem here seems to be that on a certain brain dead
system the browser attempts to guess at what it is supposed to do
based on file extension rather than using the MIME type supplied by
the HTTP response.
configuring the MIME type is wholly a server thing. if your browser
doesn't pay attention to it, then that's what you get for using that
browser. no tears here.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
if you didn't use Microsoft products there wouldn't be a problem
------------------------------
Date: Thu, 05 Nov 1998 05:26:48 GMT
From: cjl@gateway.loopie.net (Charles J. Leslie)
Subject: Re: perlcc and shared libraries
Message-Id: <sGa02.1967$ps1.8042196@news.rdc1.sfba.home.com>
So do I. Please post your answers.
-charles
Stuart Hughes (sehughes@mistral.co.uk) wrote:
: Hi all,
: In the perldoc for perlcc, I see:
: %prompt perlcc A.pm # compile into 'A.so'
: and sure enough, I can generate .so's from .pm's. My question is, how
: can I later make use of these shared libraries ???
: TIA
: Stuart Hughes
: using 5.005_51 built for i586-linux
------------------------------
Date: Wed, 4 Nov 1998 23:58:46 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: programing fun: tree: Transpose
Message-Id: <1dhzu09.odzqz0v4j4jgN@bay2-206.quincy.ziplink.net>
Xah <xah@best.com> wrote:
> Another fantastically fun programing problem for all you Perl mongers out
out there. Looks like I'll be posting one per week to keep you guys
entertained. (autotainment too!)
>
> This week's problem is "Transpose". Problem spec is attached below my sig.
I'll be posting my solution on Saturday. Gurus, Masters, Experts, please
wipe out all the world's eggheads with your Perl code. Out with
rigidity. In with lubrication.
Next week's problem:
Getting Xah to post messages with lines wrapped at 72 characters.
;-)
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Thu, 05 Nov 1998 05:35:20 GMT
From: rbaguer@freenet.columbus.oh.us
Subject: Red Hat, perl & shadow
Message-Id: <71rdep$3kh$1@nnrp1.dejanews.com>
Hello ...
I'm wondering if anyone has used the shadow module for perl with RH5.1, any
comments, suggestions, experience? ... or pointers for more information?
Thanks...
--
Please cc: my email, i'm using dejanews at the moment.
open source everything
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 05 Nov 1998 14:38:27 +1030
From: rebel <rebelvideo@hotmail.com>
Subject: redirecting interpreter output
Message-Id: <364124BB.1CFB0719@hotmail.com>
Hi Everyone
Can any one tell how I can redirect the perl interpreters output to
stdout.(not the script output)
I am running perl 5 on a win 95 platform, during debugging I have a
program that captures stdout and sends it to an editor window for
examination.
Unfortunately it won't capture stderr, so when I use the "-w -c"
switches, output is simply lost.
can I tell the interpreter to send all output to stdout?
I tried redirecting STDERR to STDOUT in a BEGIN statement and that
allowed the script to be redirected but the interpreter wasn't.
I dont think I can tell win95 to do the redirection, Or can I?
Regards Chris
rebel@rebel.com.au
------------------------------
Date: 4 Nov 1998 20:35:44 GMT
From: bradapp@enteract.com (Brad Appleton)
Subject: Re: Reference Safety
Message-Id: <71qdr0$ham7@nntp.cig.mot.com>
In article <910059311.649468@thrush.omix.com>,
Zenin <zenin@bawdycaste.org> writes:
> Yep. This only bites you with circular references such as a linked
> list would use because the ref count will likely never go to zero
> by itself (you have to destruct it manually). Luckily perl's
> builtin dynamic types make such container structures rarely if
> ever needed as well as an easy object destruction system for when
> it is.
True. But sometimes you still need to put together a more complex
structure using these builtin dynamic types. I've been using an
N-ary tree in Perl as part of one of my programs. Each "node"
in the tree is essentially a hash containing info about item,
and then an array of its "child" nodes in left-to-right order.
This was working fine, and I had a traversal routine that gave
you access to a "stack" of the iteration-state, so you could examine
who your parent was. But recently, I needed to get rid of that stack
and add parent pointers from the children to their parent.
If each child points to its parent, and each parent points to each of
its children, I run into the reference count problem mentioned above
(it never goes to zero). I could look at alternative representation of
the tree (like a flight list, or a multi-hash or who knows what) but
the most straightforward and simplest change is to just add the parent
pointers. But now the tree won't be garbage-collected when all external
references to it go away, because it still has internal references from
its children.
Fortunately for me, in my particular situation, I do NOT need to have
the children of the root-node point to their parent, only nodes that
are _not_ the root-node need to be referenced by their children.
So in my case, the root node WILL have its reference count go to zero;
but none of the other nodes will. However, I can write a DESTROY method
for the node-object that goes through all its children and undefs their
parent pointers (throughout the entire tree). Then after the DESTROY
method returns, all the nodes can be garbage-collected because their
reference counts can finally reach zero (the circular references
were just removed by DESTROY).
The same strategy could be applied to other recursive data-structures
that have a discernible "start" or "top" by using a special "header"
object (or "descriptor") that references the initial instance of all
the recursive (self-referencing) elements.
I tried it out and it works just swell! Still, I can't escape the
feeling that there must be a better/easier way.
--
Brad Appleton <bradapp@enteract.com> | http://www.enteract.com/~bradapp/
"And miles to go before I sleep." | 3700+ WWW links on CS & Sw-Eng
------------------------------
Date: Wed, 4 Nov 1998 22:00:11 -0500
From: "DesQuite" <desquite@hotmail.com>
Subject: Sorting/Newbie Help
Message-Id: <ky802.887$J42.7211@newsfeed.slurp.net>
Say I have this:
@names = qw(bob ted joe fred ted bob joe frank);
I can sort and get @names to equal
bob bob frank fred joe joe ted ted
Now how do I get @names to equal
bob frank fred joe ted
Is there and easy perl command to do this for me? I know it must be easy
but being a Perl newbie I can't get this stupid little thing to work.
Thanks for your help!
------------------------------
Date: Thu, 05 Nov 1998 13:19:54 +1000
From: jye@buckconsultants.com.au (Jye Tucker)
Subject: Re: Sorting/Newbie Help
Message-Id: <jye-ya02408000R0511981319540001@qld.nnrp.telstra.net>
In article <ky802.887$J42.7211@newsfeed.slurp.net>, "DesQuite"
<desquite@hotmail.com> wrote:
> Say I have this:
> @names = qw(bob ted joe fred ted bob joe frank);
>
> I can sort and get @names to equal
> bob bob frank fred joe joe ted ted
>
> Now how do I get @names to equal
> bob frank fred joe ted
>
> Is there and easy perl command to do this for me? I know it must be easy
> but being a Perl newbie I can't get this stupid little thing to work.
Hi there,
Check out section 4 of the FAQ (% perldoc perlfaq4) and have a look for the
question..
"How can I extract just the unique elements of an array?"
Hope that helps,
Jye
------------------------------
Date: Wed, 4 Nov 1998 22:54:58 -0500
From: "DesQuite" <desquite@hotmail.com>
Subject: Re: Sorting/Newbie Help
Message-Id: <Il902.905$J42.9938@newsfeed.slurp.net>
Perfect! That is exactly what I was looking for.
Thanks Jye!
------------------------------
Date: Fri, 30 Oct 1998 23:29:49 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Testing Perlscript at home
Message-Id: <Pine.GSO.4.02A.9810301525310.3421-100000@user2.teleport.com>
On Sat, 31 Oct 1998, Hakan Kilic wrote:
> Can I test my self written Perl at home, without sending it to the
> server.
Yes, perl doesn't need a server to run. It needs a computer, but you
probably have one of those. :-)
> I tried "perl -c .." but it didn't tell the truth.
If it lied, file a bug report. If it didn't find runtime bugs, though,
that's because it's not supposed to. Didn't it do as documented?
> And I had trouble with the debugger, because I wanted to evaluate a
> form of mine.
That doesn't sound like a problem with the debugger. But since you didn't
say what problems you're having, I don't know what to suggest.
> Is there a way to test html-forms in connection with my perl cgi at
> home, without sending it to the server?
You can test Perl CGI programs without a server; see the docs for the CGI
module. If you're not sure that your browser, HTML, and forms are working
correctly, see the docs, FAQs, and newsgroups about those topics. Good
luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 05 Nov 1998 16:17:13 +1100
From: Nobody <nobody@nowhere.com>
Subject: Re: Testing Perlscript at home
Message-Id: <364134D9.44848DE@nowhere.com>
Rob Watson wrote:
> Xitami(which I'm using quite painlessly and seems the easiest to
> set up), sorry but you will have to search for it as I don't have the
> URL at hand, maybe tucows??;
www.imatix.com or something like that. All I remember is that
it was the product name spelt backwards.
> I chose Xitami and it seems to work quite well, painless to set up
> too..
Xitami was a breeze to set up. I swear I just bought the CD
into the office and it was installed. Easy as that. Honest! :)
AC.
------------------------------
Date: Wed, 04 Nov 1998 23:58:30 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: Using Meta tags with CGI.pm
Message-Id: <alecler-0411982358300001@dialup-388.hip.cam.org>
E-mailed and posted to clpmisc.
In article <IpOldHAf7AQ2EwDn@connected.demon.co.uk>, Jerry Pank
<jerryp.usenet@connected.demon.co.uk> wrote:
> I can't seem to get CGI.pm to produce <META NAME="foo" CONTENT="bar">
> tags within the <HEAD> tags.
>
> My poor attempt below creates an incorrect tag within the <BODY> tag,
> yet the <BASE HREF..> is correct and in the <HEAD>.
>
> use CGI qw(:standard);
> print start_html('-meta name'=>'foo',
> 'content'=>'bar',
> '-xbase'=>'baseurl',
> );
>
This is documented in the CGI module. The correct syntax for your example
would be:
print start_html (
-meta => { foo => 'bar'},
-xbase => '/my/base/url',
);
You see that the value for the -meta key is a hash reference.
The output is:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
<BASE HREF="/my/base/url">
<META NAME="foo" CONTENT="bar">
</HEAD><BODY>
Hope this helps,
Andre
------------------------------
Date: Wed, 4 Nov 1998 23:58:48 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: What is the "correct" location of perl under Solaris?
Message-Id: <1dhzub3.8niz2dsyorvvN@bay2-206.quincy.ziplink.net>
Martin Gregory <mgregory@asc.sps.mot.com> wrote:
[executing perl when #! doesn't work]
> (By The Way, how do I get this question, answer & explanation into the FAQ?)
Note that this question is covered in perlrun, with various solutions
depending on the exact situation.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
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 4154
**************************************