[12814] in Perl-Users-Digest
Perl-Users Digest, Issue: 224 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 22 08:09:17 1999
Date: Thu, 22 Jul 1999 05:05:30 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 22 Jul 1999 Volume: 9 Number: 224
Today's topics:
*** Obfuscated Perl Contest *** (Jon Orwant)
Re: Access 97 report with different second page (Michel Dalle)
Re: Array problem (Jimtaylor5)
Re: basename regexp? (Bart Lateur)
Re: gethostbyname on NT <carvdawg@patriot.net>
Re: How do I do a date string (ala from strftime) conve <Stephan.Wilms@cwa.de>
Re: how to avoid truncation error? (Jon Orwant)
HTML on NT; how do I add docs? kiansp@my-deja.com
Re: HTML on NT; how do I add docs? <gellyfish@gellyfish.com>
Re: inn 2.2 Perl 5.00503 AIX 4.3.2 make errors (Mike Ellwood)
Re: Listing Files (Bart Lateur)
LWP and PUT <carvdawg@patriot.net>
Re: Mod_perl weird behaviour... <cw@dwc.ch>
Re: Perl and MS Access DBs module <stephen.aze@zetnet.co.uk>
problem with <input type="image"..... <bobby@alpstreet.net>
Re: problem with <input type="image"..... <swiftkid@bigfoot.com>
Re: problem with <input type=image .......> <chris@inta.net.uk>
Returning file handle from a subroutine <rajasankark@my-deja.com>
Running Perl via IIS <andrew_c_clark@hotmail.com>
Re: Scrollback perldoc in DOS-window? starthoughts@my-deja.com
Re: Scrollback perldoc in DOS-window? (Bart Lateur)
Re: Scrollback perldoc in DOS-window? <swiftkid@bigfoot.com>
Re: special case : split this string... <swiftkid@bigfoot.com>
Re: special case : split this string... (Bart Lateur)
Re: SSI in Perl CGI output <alcaron@espresso.wustl.edu>
Re: SSI in Perl CGI output <swiftkid@bigfoot.com>
Telnet via CGI? johnwingfield@my-deja.com
Re: Telnet via CGI? <jmulder@localhost.nl>
Re: Wanted Programing (Michel Dalle)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 22 Jul 1999 11:56:19 GMT
From: orwant@rising-sun.media.mit.edu (Jon Orwant)
Subject: *** Obfuscated Perl Contest ***
Message-Id: <ORWANT.99Jul22075619@rising-sun.media.mit.edu>
Entries for the Fourth Annual Obfuscated Perl Contest are due August 1.
The contest rules are at http://tpj.com, and below.
-Jon
You were born into this. From the first day they swaddled you
in scarlet silk blankets, put one of their own into the crib
and stole you crying away into the black stillness of the forest,
you have been in a school of previously unknown purpose.
Your eyes, once childish and full of wonder, have matured all too
quickly. They've roamed books not written to be read, murals not
drawn to be viewed; they've watched macabre puppet theatres that
portray the studied arts of deception.
Your fingers, thick and clumsy compared to theirs, have been
trained to work the skeins of falsehood and lies made fabric.
In the glow of the phosphorescent toadstool circle the needles
flicker and glitter like shooting stars.
Poison has become your tongue. As their emissary you walk the
daylight world, chatting and laughing in streetside cafes or
talking to colleagues in your office; but inside the guileweave
hides a venomous calculus. Every night you lay out the candles
and the breadcrumbs and wait.
Today the air is different. The sun still shines, but you
feel the chill of invisible clouds passing over its face. And
the smell is sharper, like the taste of the dark earth at the
foot of a graveyard. Today you know your decades of secret
schooling draw to a close, and as the power wells up inside
you, you hope that you are ready.
There are four circles of judgement in which you may prove
your worth as a master of deception.
The first circle is judged upon the ability to craft a lie which
commands an infernal computing engine to print the words
"The Perl Journal" in human-recognizable form. You may only
use one thousand glyphs, including the invisible ones, or fewer
in the completion of this screed.
The second circle is judged upon the ability to forge a
deviousness which commands an infernal computing engine to
perform some task of extreme might and puissance. Your limit
is six hundred glyphs, whether visible or no.
The third circle is judged upon the ability to create a
monstrosity which exhibits artistic cunning and creative guile
in its dread formulation. The limit is one thousand glyphs,
including those which cannot be discerned by the naked eye.
The fourth circle is judged upon the ability to cause your
fell creation to appear as a chameleon or doppelganger does:
as a deceptive imitation of another tongue. You must pick a
different language and endeavor to make your handiwork fool
the eye into believing that it was written in that language.
For this purpose you may select up to two thousand visible
or invisible sigils.
The laws of the circles are few but severe.
1. All dweomers must be penned in the language of the
fifth camel.
2. While you may use the hide, the hair, the nails, and
the teeth of the pure camel, your spell may not be able to rely
upon the existence of any other animal, neither ibex, vampire bat,
rhinocerous nor warthog; nor the vile children of the palaces
of Berkeley, Redmond, Finland or New Jersey.
3. Your incantations will be pronounced within the confines
of a memory cage capable of holding four million things;
attempts to use more may succeed, or may shatter the cage
and release your bound spirits into the air with the crashing
of glass and the tinkling of tiny bells.
4. Your writings belong to you; but you provide the judges
and the Perl Journal with the right to duplicate, quote,
edit for style and disseminate them freely upon an unsuspecting
world.
5. Your works must be sent to the Stronghold by the first day of the
eighth month. You must use the anonymous Foetid Transference Petals
to connect to ftp.tpj.com and place your entry in /pub/orwant/obfuscated.
The tar or zip archive must include:
The incantation.
A README file providing attribution (including e-mail addresses)
and information about which circle of judgement the spell is for.
A SOLUTION file explaining the magics and powers you have woven
into your script.
The archive must be named YOURNAME.CATEGORYNUMBER.SUBMISSIONNUMBER.tar
or YOURNAME.CATEGORYNUMBER.SUBMISSIONNUMBER.zip.
Entries not conforming to this rule may be given as a ritual plaything
to the void faerie. Entries may not be submitted by any other method
than that described above.
6. The champions and their monstrosities will be announced in
comp.lang.perl.moderated, in the magazine, and on tpj.com.
By this iteration of the nightbird's cycle you may be familiar
with the methods of judgement. But as there are newborns amongst
us fresh from the amniotic dew, I relate them here.
First, the committee examines the work. If we can determine its
nature visually, then we disqualify it as being too human.
Second, the committee hands the work to an infernal computing
engine and examines the results.
If after this act we still can't unravel the tortuous webs of
your thinking, we examine the SOLUTION text you have helpfully
provided.
Most victors attain that rarefied third strata.
In addition to the quality of being merely impossible to understand,
much of the judgement relies on aesthetics, cleverness, newness,
humor and interest, especially manifold and in combination. As
an example, many entries in the last circle relied on using a
plethora of invisible glyphs -- which was mirthful, but too obvious.
Obvious means failure. The void faerie hungers for new toys.
Remember, you were born into this. In the underworld the
leaves rustle as an unseen crowd gathers closer to the
camel stone. Make your masters proud.
Felix Gallo, Lead Inquisitor, The Obfuscated Perl Contest
__END__
Felix Gallo is an emergency philosophy technician in residence
at the Santa Monica beach, a base of operations from which he
schemes to conquer the continent. Conspiratorially participate
by reading http://www.cumulonimbus.com.
--
------------------------------
Date: Thu, 22 Jul 1999 09:12:25 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Access 97 report with different second page
Message-Id: <7n6nds$jg9$2@news.mch.sbs.de>
In article <7n5iog$alg$1@nnrp1.deja.com>, marc.vervloet@glo.be wrote:
>I trying to create a report in access 97 with a different second
>page.
Very well, try the MS Access help file...
Once you can do it in Access, use WIN32::OLE to do it from Perl.
Michel.
------------------------------
Date: 22 Jul 1999 12:03:42 GMT
From: jimtaylor5@aol.com (Jimtaylor5)
Subject: Re: Array problem
Message-Id: <19990722080342.03340.00000724@ng-fx1.aol.com>
>
>@items = split '\|' , $line;
>
>foreach ( @items ) ... blah
>
>$total = @items; # count
>
>etc
But what is ... blah, and I still don't understand how I would get those items
from the list into my program without knowing how many there are. maybe I'm
missing something..
------------------------------
Date: Thu, 22 Jul 1999 09:59:59 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: basename regexp?
Message-Id: <3797eb3d.11680240@news.skynet.be>
Andreas Fehr wrote:
>>Change it to:
>>
>>m/([^\\\/]+)$/;
>>
>>This covers / and \
>>
>
>No MacPerl here :(
>I don't know its delimiter.
The colon. Hey, that's special in DOS too.
/([^\\\/:]+)$/;
But I like
($dir,$basename) = /(.*[\\\/:])(.*)/;
Bart.
------------------------------
Date: Thu, 22 Jul 1999 06:25:25 -0400
From: HC <carvdawg@patriot.net>
Subject: Re: gethostbyname on NT
Message-Id: <3796F195.B29B0570@patriot.net>
try this:
#! c:\perl\bin\perl.exe
############################################################
# name.pl
#
# Use Socket functions to lookup IP addresses and hostnames
# Also use Sys::Hostname to get the localhost name, and the
# IP address
#
# Ex: perl name.pl -or- perl name.pl <host or IP>
#
# H. Carvey 1999
############################################################
use Socket;
use Sys::Hostname;
$host = hostname;
$target = shift || $host;
print "Using inet_aton() to determine IP address of target host...\n";
$test = inet_aton($target);
$test_ip = inet_ntoa($test);
print "IP: $test_ip\n\n";
print "Using Sys::hostname to determine IP address of localhost...\n";
$test2_ip = inet_ntoa(inet_aton($host));
print "IP: $test2_ip\n";
print "\nUsing gethostbyaddr() to determine hostname...\n";
($name,$alias,$addrtype,$length,$new_addr) =
gethostbyaddr(inet_aton($test_ip),AF_INET)||
die "Could not find host: $!\n";
print "Hostname:\t$name\n";
------------------------------
Date: Thu, 22 Jul 1999 13:34:14 +0200
From: Stephan Wilms <Stephan.Wilms@cwa.de>
Subject: Re: How do I do a date string (ala from strftime) conversion to time_t?
Message-Id: <379701B6.E9B1B35A@cwa.de>
Larry Rosler schrieb:
>
> [Posted and a courtesy copy mailed.]
>
> In article <3793247c.508741461@news.supernews.com> on Mon, 19 Jul 1999
> 16:28:11 GMT, Gabriel Russell <grussell@hushmail.com> says...
> > How do I do a date string (ala strftime) to time (ala gmtime)
> > conversion? I would guess that this is a faq but was unable to find
> > it.
>
> Your guess is correct, and you didn't look all that hard. In the
> section Dates in perlfaq4: "How can I take a string and turn it into
> epoch seconds?"
This reply had me severely puzzled, until I had a close look at the FAQ
name and the newsgroups line :-) (I'm reading this in comp.lang.c). Since
the correct C solution is mentioned in the posting ("strftime()") I do
wonder why it was posted to comp.lang.c at all.
So I'd like to ask the OP: do you actually have a question concerning the
C language that we might help you with ?
Stephan
(initiator of the campaign against grumpiness in c.l.c)
------------------------------
Date: 22 Jul 1999 12:03:04 GMT
From: orwant@rising-sun.media.mit.edu (Jon Orwant)
To: dennis@info4.csie.nctu.edu.tw (GEMINI)
Subject: Re: how to avoid truncation error?
Message-Id: <ORWANT.99Jul22080304@rising-sun.media.mit.edu>
In article <7n6k7i$dal$1@netnews.csie.NCTU.edu.tw> dennis@info4.csie.nctu.edu.tw (GEMINI) writes:
From: dennis@info4.csie.nctu.edu.tw (GEMINI)
Newsgroups: comp.lang.perl.misc
Date: 22 Jul 1999 08:20:02 GMT
Organization: Computer Science & Information Engineering NCTU
the following codes have weird result:
@v=(-5.6,-4.0);
$i=1;
$delta=1.6;
print $v[$i]-$v[$i-1],"\n";
print (($v[$i]-$v[$i-1]==$delta)? "yes\n":"no\n");
the first ouput is 1.6, but the second is no
,
so 1.6 is not equal to 1.6($delta)??
I think it is the problem of truncation error.
But how should I make them equal? (get the answer yes!)
thanks.
Floating point arithmetic often requires a little tolerance.
use constant epsilon => 1e-14;
@v=(-5.6,-4.0);
$i=1;
$delta=1.6;
print $v[$i]-$v[$i-1],"\n";
print ( (abs($v[$i] - $v[$i-1] - $delta) < epsilon) ? "yes\n":"no\n");
-Jon
--
------------------------------
Date: Thu, 22 Jul 1999 11:25:36 GMT
From: kiansp@my-deja.com
Subject: HTML on NT; how do I add docs?
Message-Id: <7n6v39$orp$1@nnrp1.deja.com>
I have installed AvticePerl "version 5.005_03 built for
MSWin32-x86-object", build 518.
With this comes documentation in HTML format.
Now I want to have a couple of HTML files added to the "perltoc.html"
file. This is additional info for a couple of modules.
I created a new folder under "C:\Perl\html\lib" and dropped the
HTML files into the folder.
How do I incorporate new html files into the TOC?
The PPM does this during an install, how is the documentation
maintained?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 22 Jul 1999 12:56:23 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HTML on NT; how do I add docs?
Message-Id: <379706e7@newsread3.dircon.co.uk>
kiansp@my-deja.com wrote:
>
> How do I incorporate new html files into the TOC?
>
I'd use a text editor.
/J\
--
"Killing myself is the last thing I'd ever do" - Homer Simpson
------------------------------
Date: 22 Jul 1999 09:59:30 GMT
From: mwe@unixfe.cc.rl.ac.uk (Mike Ellwood)
Subject: Re: inn 2.2 Perl 5.00503 AIX 4.3.2 make errors
Message-Id: <7n6q22$1n3e@newton.cc.rl.ac.uk>
Mike Ellwood (mwe@unixfe.cc.rl.ac.uk) wrote:
: cc -o innd art.o cc.o chan.o his.o icd.o innd.o lc.o nc.o newsfeeds.o ng.o perl.o proc.o rc.o si
: te.o status.o tcl.o timer.o wip.o ../storage/libstorage.a ../lib/libinn.a ../lib/perl.o -L/usr/local/lib/p
: erl5/5.00503/aix/CORE -bE:perl.exp -L/usr/local/lib /usr/local/lib/perl5/5.00503/aix/auto/DynaLoader/DynaLo
: ader.a -L/usr/local/lib/perl5/5.00503/aix/CORE -lperl -ldbm -ldl -lld -lm -lc -lPW -lbsd -lnsl -lcrypt -ln
: sl
: ld: 0706-004 Cannot find or read export file: perl.exp
: ld:accessx(): No such file or directory
: make: The error code from the last command is 255.
I have now had some advice on this from other sources, which
suggest it is a problem or feature of the Perl distribution,
which assumes that "perl.exp" is in the current directory.
Possible workarounds in this particular case are to edit
the Makefile.global to specify the full path name on that
-bE: i.e.
-bE:/usr/local/lib/perl5/5.00503/aix/CORE/perl.exp
or to copy it to the appropriate directory in the inn
distribution.
However, I have just tried to install Perl 5.00503
on a different AIX 4.1.5 system, and the perl build
itself complained after a cc invocation which had the same
-bE:perl.exp . However , the build continued, and the tests
ran ok.
I am just repeating it, having specified a full path
for perl.exp in the Configure dialogue.
--
Mike.Ellwood@rl.ac.uk
------------------------------
Date: Thu, 22 Jul 1999 09:57:31 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Listing Files
Message-Id: <3796ea43.11429947@news.skynet.be>
Tad McClellan wrote:
>: Your example may work well on UNIX but the object here was to write
>: something for WIN32. The File::Find routine will walk the WIN32 file
>: structure, but it returns "/"s instead of "\"s.
>
> How is that a problem?
As if that was the only problem with it.
- If you walk through the whole disk, and you start at "g:/", your
filenames end up looking like "g://somedir/somefile.ext".
- If you use a relative path, like ".", you get file names like
"./somedir/somefile.ext".
Yes, I call that problems, if the purpose is to get a list of (absolute)
filepath names.
This is junk.
Bart.
------------------------------
Date: Thu, 22 Jul 1999 06:28:18 -0400
From: HC <carvdawg@patriot.net>
Subject: LWP and PUT
Message-Id: <3796F242.EBB4B22@patriot.net>
Does anyone have any code showing the correct usage of the HTTP PUT
method?
I'm having trouble getting it working correctly. I am on NTServer 4.0,
using AS 518.
I have read the docs that come with the install, and looked in the Perl
Cookbook (which
is the ONLY site with an example), Perl in a Nutshell, etc.
Thanks
Carv
------------------------------
Date: Thu, 22 Jul 1999 11:12:52 +0200
From: Christoph Wernli <cw@dwc.ch>
Subject: Re: Mod_perl weird behaviour...
Message-Id: <3796E094.8A7DB0CD@dwc.ch>
christian.sylvestre@cetelem.fr wrote:
>
> Hi! we got a server running mod perl and by looking at our access log we
> saw some request listed at night (eventhought this server is not used at
> night).
>
> The request line looks like that:
>
> 1XX.XXX.XXX.XXX - - [05/Jul/1999:20:17:22 +0200] "HEAD / HTTP/1.0" 200 0
>
> (Where the 1XX.XXX.XXX.XXX correspond to the ip address of this server).
>
> And this occurs every 45 seconds. So, is it mod perl actually requesting
> the Header of the doc root every 45 second a normal behaviour?
>
> If not is there any reasons why the server is actually reqyesting itself
> the header every 45 seconds ?
mod_perl is definitely not the cause of this request (unless you've told it to do it, of
course).
Try logging the user agent (and possibly the referer) part of the request too, e.g.
CustomLog /path/to/your/log/file "%h %l %u %t \"%r\" %s %b \"%{Referer}i\"
\"%{User-Agent}i\""
-w
------------------------------
Date: Thu, 22 Jul 1999 11:24:32 +0100
From: Stephen Aze <stephen.aze@zetnet.co.uk>
Subject: Re: Perl and MS Access DBs module
Message-Id: <1999072211243266754@zetnet.co.uk>
The message <37960D0F.213173AF@ratp.fr>
from Alain BORGO <alain.borgo@ratp.fr> contains these words:
> Hello,
> Win32::OLE
> Win32::ADO
> Win32::ODBC
> Win32::ASP
> I think you will be happy !
Unless your server is UNIX, which is the case for a lot of people who
ask this question as they set out down this route (shortly before
giving up or going over to NT server...)
------------------------------
Date: Thu, 22 Jul 1999 12:19:49 +0100
From: bobby <bobby@alpstreet.net>
Subject: problem with <input type="image".....
Message-Id: <3796FE54.842F0FDE@alpstreet.net>
Hi,
Would anyone be able to help me with this
From within a html page created from a script i have a submit button but
im using image instead of submit. ie:
<input type="image" src="/images/add.gif" name="add" value="add">
instead of:
<input type="submit" name="add" value="add"
When i use the <input type="image" instead of <input
type="submit" the
script just reprints the page im already on instead of taking me to the
"add" screen.
Does anyone know why?
thanks for any help
bob
------------------------------
Date: Thu, 22 Jul 1999 16:35:52 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: problem with <input type="image".....
Message-Id: <7n830n$elf11@news.cyber.net.pk>
: <input type="image" src="/images/add.gif" name="add" value="add">
You cannot pass 'value' directive!
This is available to cgi program.
=> name
=> x position (where you clicked)
=> y position (where you clicked)
------------------------------
Date: Thu, 22 Jul 1999 12:40:54 +0100
From: "Chris Denman" <chris@inta.net.uk>
Subject: Re: problem with <input type=image .......>
Message-Id: <7n705p$281d$1@news2.vas-net.net>
>
> When i use the <input type="image" instead of <input type="submit" the
>script just reprints the page im already on instead of taking me to the
>"add" screen.
>
Wrong newsgroup for this but.....
when you use an image as a submit button the letters x and y are added to
the submit name, and the coordinates of where the mouse was when clicked are
appended.
e.g.
<input type=image name=submit src=/pix/submit.gif>
would send back in the form data:
submit.x=100
submit.y=200
(or try the other way around x.submit (memory failing me) )
So, when you try to trap the word 'submit' in your script, it obviously will
not find it!
try experimenting by listing all of the environment variables, like so:
foreach $key (keys %ENV){
print "$key - $ENV{$key}\n"; #or use <BR>
}
and the same for form data (if using appropriate decoder)
foreach $key (keys %form){
print "$key - $form{$key}\n"; #or use <BR>
}
HTH
Chris Denman
------------------------------
Date: Thu, 22 Jul 1999 10:09:38 GMT
From: Rajasankar <rajasankark@my-deja.com>
Subject: Returning file handle from a subroutine
Message-Id: <7n6qkv$nm5$1@nnrp1.deja.com>
Hello,
I have a piece of code which returns filehandle to the
file passed to it.
sub myopen{
open(HANDLE,$_[0]) or die "cannot open $_[0]";
return(*HANDLE);
}
My doubt is won't there be any conflict if this function is used
more than once to open different files,since file handle has same
name? Won't read on all the file handles returned from the subroutine
read only from the last file opened?
Could anybody suggest any alternative?
Thanks
Rajasankar.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 22 Jul 1999 12:51:20 +0100
From: "Andrew Clark" <andrew_c_clark@hotmail.com>
Subject: Running Perl via IIS
Message-Id: <7n70al$h8j$1@nnrp0.seg0>
Hi. I have installed Perl5 on an NT server for a customer of ours, but so
far am unable to get the scripts to run via IIS. I can run the scripts from
a command line, for example:
perl .\test.pl
but if I try accessing the script via a web page, it just times out (well,
Netscape displays the message 'CGI Timeout', IE5 gives it's usual
informative error messasge 'An error has occured' - well, actually, it's the
'DNS server error' one, but it might as well be the former). The above
script simply displays the word 'Test' in html, and does so fine from cmd.
I'm not sure how I need to set up the server to run the script correctly. So
far, I have added perl.exe to the NT ENV variables, and created an entry for
the virtual web server to say that '.pl' scripts are run by
'c:\perl\bin\perl'. Unfortunatel,y there's no documentation with perl or IIS
on how to integrate the two, so I'm not even sure if I'm doing the right
thing. Also, there's no explanation of if I need to put #!{path} as the
first line. Is this just a unix shell thing?
If someone can point me in the right direction on the IIS setting I need,
that would be great. If you want to see the behaviour of the above script,
you can visit http://www.chopstix.net/test.pl.
Many thanks in advance,
Andrew Clark (Metronet Technical Support)
------------------------------
Date: Thu, 22 Jul 1999 09:26:58 GMT
From: starthoughts@my-deja.com
Subject: Re: Scrollback perldoc in DOS-window?
Message-Id: <7n6o4s$n14$1@nnrp1.deja.com>
In article <7n7dgn$elf8@news.cyber.net.pk>,
"Faisal Nasim" <swiftkid@bigfoot.com> wrote:
>> Or: How am I supposed to read pods when the pipe
>> "|more" does NOT work with perldoc.bat -f ?
>
> Or see HTML documents :)
Yes, I could spend a lot of time researching and
GREPPING through the docs, but WHY can't someone just
FIX the perldoc.bat file? It works just fine for all
the FULL page perldocs. I am new to Perl and don't
have the skills yet to understand WHY this can't be
done. Perhaps I'll write a better perldoc.bat file
myself SOME DAY... BUT def. not any time soon. (SEE
the lines below!)
> Why not write something in perl to handle it?
>
> $blah = `perldoc @ARGV`;
>
> open OUTPUT , ">myoutput"; #I don't use die() on Win :)
> print OUTPUT $blah;
> close OUTPUT;
Wow! I had been led to believe that the [``]
wouldn't work in a perl script on Windows 95 machines,
but I tried it anyway and it worked just fine!! Thank
you Faisal. You CAN run a BATCH or DOS executable from
within your perl script! I changed it to:
#!perl
$buffit = `perldoc @ARGV`; # Yes, the perldoc.bat file!
open OUTPUT , ">TEMP.txt";
print OUTPUT $buffit;
close OUTPUT;
NOW I realize that I can make a DOS BATCH file with this
perl script embedded within it (just like the original
perldoc.bat file does) to send the text of TEMP.txt to
the screen after running the perl script as a subroutine
using something like: " type TEMP.txt |more " as one of
the lines. Now I have to wonder if fixing perldoc.bat
is not that difficult?
The Starman.
< thestarman3 (at) netzero DON'TSPAM (dot) com >
< http://www.geocities.com/Athens/6939/perl.html >
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 22 Jul 1999 10:11:08 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Scrollback perldoc in DOS-window?
Message-Id: <3798ebf9.11868029@news.skynet.be>
starthoughts@my-deja.com wrote:
>Or: How am I supposed to read pods when the pipe
>"|more" does NOT work with perldoc.bat -f ?
>
>I used to use a very nice SCROLL BACK buffer
>program in plain old DOS and Windows 3.x, but it
>does NOT work at all with Windows 95! So, I have
>usually used " |more" or even " > filename.txt"
>to read whatever flys by on the screen so fast
>that I sometimes can't even see it let alone
>read it there.
>Does anyone have a method that
>actually works?
I use an editor that lets me run external "tools", and which captures
the output, so you get the result in a window in the editor. I currently
use GWD (see <http://www.gwdsoft.com>) because it allows you to input
ADDITIONAL parameters in an input box, which is nice for this kind of
job. It also has a built-in Perl syntax highlighter (a bit rough: it
works on a line-by-line basis; but it helps). I'm sure other similar
editors may offer the features you need, to; see
<http://www.teleport.com/~gerth/CGI/Perl_Editors.html>
Bart.
------------------------------
Date: Thu, 22 Jul 1999 16:43:16 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Scrollback perldoc in DOS-window?
Message-Id: <7n83ek$elf12@news.cyber.net.pk>
: Wow! I had been led to believe that the [``]
: wouldn't work in a perl script on Windows 95 machines,
: but I tried it anyway and it worked just fine!! Thank
: you Faisal. You CAN run a BATCH or DOS executable from
: within your perl script! I changed it to:
:
: #!perl
: $buffit = `perldoc @ARGV`; # Yes, the perldoc.bat file!
: open OUTPUT , ">TEMP.txt";
: print OUTPUT $buffit;
: close OUTPUT;
:
Make it:
#!perl
open OUTPUT , ">TEMP.txt";
print OUTPUT `perldoc @ARGV`;
close OUTPUT;
: NOW I realize that I can make a DOS BATCH file with this
: perl script embedded within it (just like the original
: perldoc.bat file does) to send the text of TEMP.txt to
: the screen after running the perl script as a subroutine
: using something like: " type TEMP.txt |more " as one of
: the lines. Now I have to wonder if fixing perldoc.bat
: is not that difficult?
------------------------------
Date: Thu, 22 Jul 1999 14:32:16 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: special case : split this string...
Message-Id: <7n7rp1$elf10@news.cyber.net.pk>
: > &ConvertToArray ( <<EOT )
<snip>
: > EOT
: >
: > sub ConvertToArray
: > {
: > split /\n/ , shift;
: > }
:
: Well, if you're going to post actual code (instead of simply pointing to
: the documentation for 'split'), why not post code that:
:
: 1. compiles -- there is no semicolon after the function call.
:
: 2. does something -- the list resulting from the function call is
: neither stored nor used.
Ooops I meant to:
@myarray = &ConvertToArray ( <<EOT );
blah
blah
EOT
:P
------------------------------
Date: Thu, 22 Jul 1999 10:18:45 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: special case : split this string...
Message-Id: <3799eeb3.12566345@news.skynet.be>
Thien Syh wrote:
>i want to split the string into an array of string and return the array
>value.
>Could somebody help?
>
>----- Personal Information -----
><br>Name (First/Last):a
><br>CompanyName: a
><br>Street: a
...
I'm not sure what is so special about it. It looks like a plain and
simple case for split().
$string = <<'EOT';
<br>Name (First/Last):a
<br>CompanyName: a
<br>Street: a
EOT
my @ary = split /<br>/, $string;
chomp(@ary); #get rid of newlines...
#stuff you want is in @ary
Er... do you want to make it a hash?
%hash = map { split /:/,$_,2 } @ary;
Bart.
------------------------------
Date: Thu, 22 Jul 1999 04:13:03 -0500
From: "Paul Fulbright" <alcaron@espresso.wustl.edu>
Subject: Re: SSI in Perl CGI output
Message-Id: <932635004.834.100@news.remarQ.com>
Crap! when will apache 2.0 be released? And is there any possible workaround
for this?
Faisal Nasim <swiftkid@bigfoot.com> wrote in message
news:7n7b26$eva5@news.cyber.net.pk...
> : Hi, I am curious as to wether or not you can use server side includes in
> the
> : output of a CGI-script in Perl, the particular script I am using is the
> : robboard (www.robplanet.com) and it uses three template pages, these are
> : where I want the SSI to work, unfortunately when I ad <!--#include
> : file="file.txt"--> it does nothing, often times it will give me an
> internal
>
> That is because Apache API doesn't allow to grab the output of mod_cgi
> and process it through mod_include!
>
> It will be possible in Apache 2.0.
>
> I don't know about other web servers....
>
> : server error, other times it just doesnt show that at all, like if I use
> SSI
> : and it has a problem normally it gives that [There was an error
> proccessing
> : this directive] error, but from the script it doesnt show up at ALL, the
>
> That is because mod_include (the ssi parser) opens the file (static) and
> parses the ssi tags. And mod_cgi forks CGI and sends it output directly
> to browser...
>
> : mime type in the CGI script seems to be set to text/html.
> : does anyone know how I get the SSI to work in the output of the CGI
> script?
>
> mod_perl
>
> : I would GREATLY appreciate any and all help!
> :
> : email me @ alcaron@email.com
> :
> : Thanks
>
>
>
------------------------------
Date: Thu, 22 Jul 1999 16:34:38 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: SSI in Perl CGI output
Message-Id: <7n82ue$eva8@news.cyber.net.pk>
: Crap! when will apache 2.0 be released? And is there any possible
workaround
: for this?
Dunno, you can use mod_perl. Or modify Apache source yourself!
------------------------------
Date: Thu, 22 Jul 1999 10:05:47 GMT
From: johnwingfield@my-deja.com
Subject: Telnet via CGI?
Message-Id: <7n6qdn$nl6$1@nnrp1.deja.com>
I am trying to find a CGI script that will
provide telnet access to a Unix machine. I need
to communicate with this machine across the
firewall of someone ele's network, but have full
access to the web via a proxy. It should, in
theory, be possible to write such a script, but I
know of no-one who has.
Can anyone make any suggestions?
Thanks,
John Wingfield
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 22 Jul 1999 10:33:15 GMT
From: Johan Mulder <jmulder@localhost.nl>
Subject: Re: Telnet via CGI?
Message-Id: <7n6s1b$2ri$3@news1.xs4all.nl>
johnwingfield@my-deja.com wrote:
: I am trying to find a CGI script that will
: provide telnet access to a Unix machine. I need
: to communicate with this machine across the
: firewall of someone ele's network, but have full
: access to the web via a proxy. It should, in
: theory, be possible to write such a script, but I
: know of no-one who has.
: Can anyone make any suggestions?
Maybe you can build your own with Net::Telnet?
------------------------------
Date: Thu, 22 Jul 1999 09:36:02 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Wanted Programing
Message-Id: <7n6oq5$jg9$3@news.mch.sbs.de>
In article <7n25dr$vff$1@nnrp1.deja.com>, js34508@my-deja.com wrote:
>Looking for someone to write scripts, mainly working with flat txt
>files and formating output of files to specfic html. Cross
>referenceing and comparing flat txt files.
[snip]
>Share what you know. Learn what you don't.
Look in the mirror :-)
(or try one of the 'job' newsgroups)
Michel.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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 V9 Issue 224
*************************************