[8635] in Perl-Users-Digest
Perl-Users Digest, Issue: 2252 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 5 04:07:11 1998
Date: Sun, 5 Apr 98 00:00:35 -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 Sun, 5 Apr 1998 Volume: 8 Number: 2252
Today's topics:
Re: Blocking Reads <rra@stanford.edu>
Re: Can perl open text files? (Abigail)
Re: Can perl open text files? <skyward@frognet.net>
Re: Can perl open text files? <eugene@vertical.net>
Re: Can perl open text files? <jdf@pobox.com>
Re: Can perl open text files? <sneaker@mediaone.net>
chdir in UNIX: problem with the ~ <serge1@eden.rutgers.edu>
Re: chdir in UNIX: problem with the ~ <rra@stanford.edu>
Re: Cross platform 'distributed' perl? andrew@ugh.net.au
Re: Cross platform 'distributed' perl? <dformosa@st.nepean.uws.edu.au>
Re: file locking in perl <rra@stanford.edu>
Re: help for a newbie?? (James Watson)
Re: How do I strip newlines from a var (Abigail)
Re: How do you put a string into a array? <gwynne@utkux.utk.edu>
Re: Ltrim at ASCII Zero. (Craig Berry)
Memory management issue with ptk <jxg161@psu.edu>
Re: perl linux database program? <rra@stanford.edu>
Re: perl/shopping cart <ion@aroma.com>
Please Help me with print data in HTML mode..CGI <ai3x@jps.net>
Re: Random numbers (Perl fails this test) (Excession)
Re: Someone put my munged e-mail address on a spam list <dformosa@st.nepean.uws.edu.au>
Re: Urgent: Perl Win32 vs Unix Perl (Excession)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 05 Apr 1998 00:15:18 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Blocking Reads
Message-Id: <m3afa0viwp.fsf@windlord.Stanford.EDU>
andrew <andrew@ugh.net.au> writes:
> I am trying to write function to perform a blocking read. I couldn't
> seem to find one about but if anyone knows where one is I'll just use
> that :-)
Umm...Perl's built-in read() function is blocking if you don't set it to
be non-blocking. Perhaps you mean something different by blocking? Given
that you're using IO::Select, it seems like you're actually trying to do a
*non-blocking* read...?
You're also doing a select() call on a file handle that's going through
the stdio libraries (since you opened it with IO::File). Generally, this
is bad news, because the buffering messes you up badly. If you really
want to do low-level operations like select() on files, then you need to
open them with sysopen() or the three-parameter form of IO::File.
I'm guessing that probably explains both of your errors, but I could be
wrong on that.
In general, though, I'm very confused on what you're trying to do and what
your code is actually doing for you that the standard read() operator
doesn't.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 5 Apr 1998 03:09:15 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Can perl open text files?
Message-Id: <6g6skr$qur$5@client3.news.psi.net>
Skyward Communications (skyward@frognet.net) wrote on MDCLXXVIII
September MCMXCIII in <URL: news:6g6qmp$g0q@netaxs.com>:
++ First: thank you for your response.
++
++ Second: Here's what I'm attempting to accomplish, step by step.
++ A) User selects document they want to view by clicking on a radio
++ button and clicking on the submit button. (This would be, say, meeting
++ minutes or a project status, etc.)
++ B) An Web page containing graphics (company or dept logo, etc) would be
++ displayed and this page would also contain the text of the minutes or status
++ report, or the text of any other document and it would contain links to
++ other pages. In essence, it would be a regular web page with a background,
++ etc.
++ C) The text would be inserted into the above page by the perl program
++ as preformatted text.
So, what's the perl aspect of this question? How to open a file?
RFTM. How to write to a file? RTFM. How to write to standard
output? RTFM.
Abigail
--
perl -MTime::JulianDay -lwe'$r=-2449231+gm_julian_day+time;@r=reverse(M=>(0)x99
=>CM=>(0)x399=>D=>(0)x99=>CD=>(0)x299=>C=>(0)x9=>XL=>(0)x39=>L=>(0)x9=>XL=>(0)x
29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0=>I=>1);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for
(;!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: Sat, 4 Apr 1998 22:24:46 -0500
From: "Skyward Communications" <skyward@frognet.net>
Subject: Re: Can perl open text files?
Message-Id: <6g6th2$jm4@netaxs.com>
The perl aspect is this.
<form action="/cgi-bin/program.pl" method="POST">
<input type="Radio" name="document" value="textfile1.txt">
<input type="Radio" name="document" value="textfile2.txt">
What is returned to the user is this:
<html>
<head>
<title>
Some Company On Line Documents Retrival
</title>
</head>
<body background="background.jpg">
<p>
<center>
<img src=companylogo.gif height = 81 width=370 border=0 align=center
alt="Some Company On Line Documents">
</center>
</p>
<!--- The text file selected by the user and opened by the perl program goes
here--->
</body>
</html>
I hope this make clear what I need. I know the HTML code to be returned to
the user would be written by the perl program. I can do that. What I need
to know is how to get perl to open the text file requested and read it into
the HTML that I will print via the perl program (in this case "program.pl")
Thanks,
Skyward
skwyard@frognet.net
>So, what's the perl aspect of this question? How to open a file?
>RFTM. How to write to a file? RTFM. How to write to standard
>output? RTFM.
>Abigail
------------------------------
Date: Sat, 04 Apr 1998 22:55:20 -0500
From: Eugene Sotirescu <eugene@vertical.net>
Subject: Re: Can perl open text files?
Message-Id: <352700A6.F93ECEE8@vertical.net>
Skyward, you are confusing (not to say confused).
Do not presume: there is very little Perl to your question, and whatever there
is should be asked/replied to in comp.infosystems.www.authoring.cgi, the group
for CGI scripts.
Do not despair, though: I'll try to help you out over email, without cluttering
this troubled group.
Eugene
Skyward Communications wrote:
> The perl aspect is this.
>
> <form action="/cgi-bin/program.pl" method="POST">
> <input type="Radio" name="document" value="textfile1.txt">
> <input type="Radio" name="document" value="textfile2.txt">
>
> What is returned to the user is this:
>
> <html>
> <head>
> <title>
> Some Company On Line Documents Retrival
> </title>
> </head>
> <body background="background.jpg">
> <p>
> <center>
> <img src=companylogo.gif height = 81 width=370 border=0 align=center
> alt="Some Company On Line Documents">
> </center>
> </p>
>
> <!--- The text file selected by the user and opened by the perl program goes
> here--->
>
> </body>
> </html>
>
> I hope this make clear what I need. I know the HTML code to be returned to
> the user would be written by the perl program. I can do that. What I need
> to know is how to get perl to open the text file requested and read it into
> the HTML that I will print via the perl program (in this case "program.pl")
>
> Thanks,
> Skyward
> skwyard@frognet.net
>
> >So, what's the perl aspect of this question? How to open a file?
> >RFTM. How to write to a file? RTFM. How to write to standard
> >output? RTFM.
>
> >Abigail
------------------------------
Date: 05 Apr 1998 00:06:36 -0400
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: Can perl open text files?
Message-Id: <90pk3oab.fsf@mailhost.panix.com>
"Skyward Communications" <skyward@frognet.net> writes:
> I hope this make clear what I need. I know the HTML code to be returned to
> the user would be written by the perl program. I can do that. What I need
> to know is how to get perl to open the text file requested and read it into
> the HTML that I will print via the perl program (in this case "program.pl")
As Abigail suggests in characteristically terse style, you'll need to
"RTFM."* However, before you even get to the manual, you'd do well to
buy a copy of the book _Learning Perl_. If you buy and read that book
(known to aficionados as "The Llama Book") you'll learn how to deal
with files, and many other Perlish things. But do consult the FM,
particularly the section in perlfunc that deals with the builtins
"open" and "close." There are also quite a few answers in the various
FAQs that accompany perl that touch on the use of files.
http://www.perl.com/
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
* http://www.wins.uva.nl/~mes/jargon/r/RTFM.html
------------------------------
Date: Sun, 05 Apr 1998 04:09:32 GMT
From: Sneaker's Nest <sneaker@mediaone.net>
Subject: Re: Can perl open text files?
Message-Id: <35270284.1809@mediaone.net>
Skyward Communications wrote:
>
> First: thank you for your response.
>
> Second: Here's what I'm attempting to accomplish, step by step.
> A) User selects document they want to view by clicking on a radio
> button and clicking on the submit button. (This would be, say, meeting
> minutes or a project status, etc.)
> B) An Web page containing graphics (company or dept logo, etc) would be
> displayed and this page would also contain the text of the minutes or status
> report, or the text of any other document and it would contain links to
> other pages. In essence, it would be a regular web page with a background,
> etc.
> C) The text would be inserted into the above page by the perl program
> as preformatted text.
>
> I hope this gives you enough info. Again, thank you very much for your
> help.
>
> Skyward,
> skyward@frognet.net
Something like what you can see at
http://www.fccj.org/HumanResources
(There isn't any html, per se, on the back-end...
It's powered by Perl :-)
Sneex :-)
------------------------------
Date: Sat, 04 Apr 1998 11:12:57 -0400
From: Sergey Alexandrov <serge1@eden.rutgers.edu>
Subject: chdir in UNIX: problem with the ~
Message-Id: <35265C09.1ACC@eden.rutgers.edu>
I can't get the chdir funciton to work when the expression starts with
the ~ used in UNIX for home directories (ex. chdir("~bob/home))
Does anyone know why?
serge
------------------------------
Date: 05 Apr 1998 00:28:06 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: chdir in UNIX: problem with the ~
Message-Id: <m33efsvibd.fsf@windlord.Stanford.EDU>
Sergey Alexandrov <serge1@eden.rutgers.edu> writes:
> I can't get the chdir funciton to work when the expression starts with
> the ~ used in UNIX for home directories (ex. chdir("~bob/home))
> Does anyone know why?
Yes. ~-expansion is done by your shell for you, and Perl doesn't send
chdir() calls through a shell. You'll need to do ~-expansion yourself.
Something along the lines of the following should be approximately correct
(but is mostly untested, so use at your own risk):
sub untwiddle {
my $path = shift;
return $path unless (index ($path, '~') == 0);
$path =~ s%^~([^/]*)%%;
my $user = $1;
my $home;
if ($user) {
$home = (getpwnam $user)[7];
} else {
$home = $ENV{HOME} || (getpwuid $<)[7];
}
defined $home ? $home . $path : undef;
}
I'm sure that there are also modules on CPAN that will do that sort of
thing for you.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Sun, 5 Apr 1998 13:36:48 +1000
From: andrew@ugh.net.au
Subject: Re: Cross platform 'distributed' perl?
Message-Id: <Pine.BSF.3.96.980405133326.5164H-100000@house.key.net.au>
At some stage someone wrote:
>Has anyone done a generic remote interface where a program on one
>host can hand a more or less arbitrary chunk of perl code to
>a server on another host and get back results from an 'eval'?
Have you seen Penguin?
Andrew
------------------------------
Date: 5 Apr 1998 04:22:46 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Cross platform 'distributed' perl?
Message-Id: <891750165.617272@cabal>
In <3525d517.23826025@news.btinternet.com> Gellyfish@btinternet.com (Jonathan Stowe) writes:
[...]
>Alternatively it would not be too difficult to create a server in perl
>that listened on a socket and then eval'd anything that it received ,
[...]
>I would suggest that this also would contain a[n] (small|enormous)
>element of security risk on a public network.
If you do this under a safe enviroment this may allow a signifgent level
of securaty to reduce it to a satifactory leval.
--
I'm a perl programer if you need perl programing hire me. Buy easter bilbies.
Please excuse my spelling as I suffer from agraphia see the url. Support NoCeM
http://www.cit.nepean.uws.edu.au/~dformosa/Spelling.html http://www.cm.org/
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: 05 Apr 1998 00:16:42 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: file locking in perl
Message-Id: <m37m54viud.fsf@windlord.Stanford.EDU>
Larry Rosler <lr@hpl.hp.com> writes:
> Offhand, I don't know of any convenient 'mandatory' locking mechanisms.
> I guess one could kludge something by taking permissions away while the
> file is locked, then restoring them when the file is unlocked. Any
> other thoughts or pointers would be appreciated.
Unix does not, in general, implement mandatory file locking. That ability
exists on other platforms (VMS being one of them), but there isn't any
solution for that on Unix without nasty cludges to my knowledge. (Modulo
possible vendor extensions that are highly unlikely to be portable.)
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Sat, 04 Apr 1998 23:10:26 GMT
From: james_vs_watson@yahoo.com (James Watson)
Subject: Re: help for a newbie??
Message-Id: <3526bd9e.79849537@news.erols.com>
On 4 Apr 1998 16:30:45 GMT, "Manos Tsiavos" <mm93064@central.ntua.gr>
wrote:
>I use the Sambar server to "view" my perl scripts..
>but when i used the function SYSTEM("tr.exe","trlist.dat"); in a cgi, it
>failed to respond why?? (it opens command mode c:\Program files\sambar>)
>and nothing happens :-(
>(tr.exe is a DOS application that needs trlist's.dat elements to present an
>output on the screen)
>On the contrary when i launch the above perl script in "pure Perl
>mode"(from an ms-dos prompt), SYSTEM("tr.exe","trlist.dat"); works
>fine..!!
>Where is the problem???
I think I had a similar problem. I found out that my server actually
had an older version of Perl than I needed and not all of the modules
that I need to use. Make sure that your server is using the most
current version of Perl.
HTH
- James
------------------------------
Date: 5 Apr 1998 03:06:02 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How do I strip newlines from a var
Message-Id: <6g6seq$qur$4@client3.news.psi.net>
Lasse Hillerxe Petersen (lassehp@imv.aau.dk) wrote on MDCLXXVII September
MCMXCIII in <URL: news:lassehp-0404981657080001@ygdrasil.imv.aau.dk>:
++ In article <3525D2F4.ACE574CC@coos.dartmouth.edu>, rjk@coos.dartmouth.edu wrote:
++
++ > I found Abigail's suggestion informative, creative, and quite
++ >amusing.
++
++ Your definition of "informative" must be strange,
My posting mentioned the word "manual" three times. Why you find
that less informative as ignoring and not answering the posting
is beyond me.
Abigail
--
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
for (s;s;s;s;s;s;s;s;s;s;s;s)
{s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
------------------------------
Date: Sat, 4 Apr 1998 22:23:18 -0500
From: "Bob Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: How do you put a string into a array?
Message-Id: <6g6tgj$chh$1@gaia.ns.utk.edu>
J. Probert wrote in message <3525f1c0.4875404@news.saix.net>...
>On Thu, 26 Feb 1998 21:41:14 -0500, "Seong Y. Kim"
><seong@cse.bridgeport.edu> wrote:
>
>>Let's say that I have a string "I you he she they me her him
>>his them their", and I want the array like this.
>>
>>$string = "I you he she they me her him his them their";
>>
>>@array;
>>$array [1]= "I";
>>$array[2]= "you";
>>$array[3]="he";
>>.....
>>$array[11]="their";
>>
>>how do you do this?
>This is very simple.
>
>What you need is to split the string at every space, like this:
>
>@array = split(/ /, $string);
This works; however, punctuation is bound to word to which it is contiguous.
In order to get rid of the punctuation and other stuff you may not want, you
need to clean-up the string with a regular expression. The following is a
newbie answer and could undoubtedly be made more efficient, but it works. It
assumes that your string(s) is in an external file.
open (FILE, $ARGV[0]) or die "Can't open $ARGV[0]: $! ";
@array = <FILE>;
$string = join(' ', @array);
$string =~ s/\n//g; #zap the newlines
$string =~ s/[.',?]//g; #stuff you don't want
@array = split(/ /, $string);
foreach $array (@array) { #just to check it out
print $array, "\n";
}
Bob Gwynne
In the country of the blind, the one eye'd man is king.
Having only one eye, I think that's kinda cool. ---me
------------------------------
Date: 5 Apr 1998 07:02:06 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Ltrim at ASCII Zero.
Message-Id: <6g7a9f$8c3$1@marina.cinenet.net>
Jean-Claude (jc@tdf.net) wrote:
: I have a variable that contains text with an embedded Ascii 0 within it.
: Like:
:
: _Accept_The_Task&_for_all_time
The conventional way to mark the 0 byte would be \0, not &...just for
your future reference.
: I want to cut the contents from the point of the & (actually an ascii 0)
: leaving only what is to the left. I tried a $x=~ tr\blah blah\ but don't
: know how to tell it to only cut at the ASCII zero.
$x =~ s/\0.*//;
That is, replace a zero byte and everything to its right with nothing.
Your attempt to use tr for this shows you need to read Learning Perl a
bit more; tr is useless in anything involving positional logic.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Sun, 05 Apr 1998 00:51:13 -0600
From: Jason Girard <jxg161@psu.edu>
Subject: Memory management issue with ptk
Message-Id: <352729E1.412603B0@psu.edu>
Hi,
I am relatively new to Perl, and very new to Tk.
I recently finished writing an application which updates an image based
on a status taken every 5 minutes (if status changes, image changes;
otherwise it stays the same). Also, I'm using bind with a button to
place another image on the canvas when the mouse is over the button, and
clears the image when it isn't.
The problem is, I don't think these images are actually being discarded
when no longer needed, and my memory usage goes up during each image
change.
Here is a snippet which I bind Enter and Leave to the Button $button1;
$canvas is a Canvas:
--------------------------------------------------------------------
$img2 = $canvas->Photo('-format' => 'gif',
'-file'
=>
Tk->findINC('demos/images/mouseon.gif'));
$button1->bind('<Enter>' => sub{$canvas->create('image',180,0,
'-anchor' => 'nw',
'-image' => $img2)});
$button1->bind('<Leave>' => sub{$img2->blank;
$img2 = $canvas->Photo('-format' => 'gif',
'-file'
=>
Tk->findINC('demos/images/mouseon.gif'))});
----------------------------------------------------------------------
Is there some way of deleting this image object from memory and then
re-creating it when needed?
I have tried $canvas->delete($img2) but the picture doesn't disappear
from sight.
It looks like $img2->blank is clearing the area where the image was,
but not freeing up memory; I need the line after it to re-fill the
image. Since I plan on having this application running most of the
time, keeping memory usage steady is really important. Seeing the
percent memory usage increase by 1-2 percent after a couple image
updates is alarming. Any other suggestions for keeping things under
control?
Thanks,
Jason
--
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Jason Girard
jxg161@psu.edu
http://www.personal.psu.edu/jxg161/
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
------------------------------
Date: 05 Apr 1998 00:08:35 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: perl linux database program?
Message-Id: <m3d8ewvj7w.fsf@windlord.Stanford.EDU>
Greg Waters <gwaters@dorsai.org> writes:
> Does anybody know resource information and help files on how to create
> perl databases for linux? Did someone write a program?
Lots of them. What exactly are you looking for? "Perl databases" doesn't
make a lot of sense, nor does "Perl Linux database program" because there
really isn't anything Linux-specific about it.
Perl comes with modules capable of reading and writing to SDBM, NDBM, and
Berkeley DB (version 1) databases, and those libraries should have come
with your system. (If not, they're easy to obtain.) Examples of usage
are in the perlfunc database under tie.
If you have a more specific question, could you try to rephrase?
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Sat, 4 Apr 1998 16:21:12 -0800
From: "Ion Chalmers Freeman" <ion@aroma.com>
Subject: Re: perl/shopping cart
Message-Id: <3526cd04.0@news.prostar.com>
Bill,
I did a search on your behalf on Amazon.com. _Cgi _For _Commerce sells
for $30.
ion
http://www.amazon.com/exec/obidos/ISBN%3D1558515593/
tiles@pyramidtile.com wrote in message <6g59m3$mlr$1@nnrp1.dejanews.com>...
Does any body know of a person or persons that give training for Perl/web
and
shopping cart instructions over the phone or email?
I would like to learn how to set up my own shopping cart on my web site.
I know how to make web pages and just learned to telnet to my shell server.
But would like to learn how to customize my web pages so that browsers could
order my selection of tools.
I just don't wan't to travel to places and spend ton's of money to lean how
to
set up a shopping cart.
Is there an economical way of doing this?
Thanks
Bill
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 04 Apr 1998 22:46:21 -0800
From: Tom Vilaikam <ai3x@jps.net>
Subject: Please Help me with print data in HTML mode..CGI
Message-Id: <352728BD.583D1C29@jps.net>
I need source to print data on HTML mode ..
The error I have is:
"CGIwrap Error: System Error: execv() failed"
"Error: No such file or directory (2)"
Please help me..!
Please see my souce code below and help me out..
and the html submission at: http://www.jps.net/ai3x/wcc.htm
Here my example:open(FILE, "wcc.dat");
@lines = <FILE>;close(FILE);
foreach (@lines)
{ chop;
($album, $artist, $price) = (split(/:/));
#if($album==$form{'wccnumber'})
#above is my previous
if($album=="0011")
{ print("$album $artist $price\n");
}}
#I need to print on screen in HTML mode in World Wide Web..
#Please help me..!
My Data:
*** wcc.dat **
0001:K7YVH:CECIL
0002:W6VVU:ED BARRY
0003:WA6HGH:FLOYD LUNEY
0005:WB6DFN:BERT
0006:WA6NDL:GLENN
0009:W6DRV:BOB
0010:WB6IUD:IRA
0011:K7YGL:NEAL
--
http://www.jps.net/ai3x/Tom.html
ICQ: 9696782
Yahoo Chat: Prog23
------------------------------
Date: Sat, 04 Apr 1998 22:10:38 GMT
From: daclay@NOSPAMzip.com.au (Excession)
Subject: Re: Random numbers (Perl fails this test)
Message-Id: <3526ae4f.3545651@news.zip.com.au>
On Sat, 04 Apr 1998 08:06:02 -0600, Mark Stackhouse <stackhou@execpc.com>
wrote:
>This looks interesting. Could you please explain why these numbers where chosen
>as variables? I'd like to understand why these particular numbers where
>chosen:)
I pinched the code from a Fortran implentation of a RNG, and converted it
to Perl.
The numbers were from the Fortran implementation, and are supposed to give
you a cycle of random numbers that is some 2^30 long.
Why did I do this implemntation of r()? Because the Perl built-in rand()
function gave me different results for the same initial seed, for different
implementations of Perl on different hardware.
My r() function gives the same random values across a wide variety of Perl
5 implementations, which meant I could then write my JAPH which was really
just 'how many calls to r() does it take to generate this ascii character',
resetting the seed to a known value, and go off searching for the next
letter. Put the counts together, build a string made up of counts, and
then call the r() function to build the string you want to eval().
Obfuscation.
Well, I thought it was cool at the time.
Dac
---
David Andrew Clayton # Please remove NO_SPAM when
dac@NOSPAM.pcug.org.au # sending email replies.
I post therefore I am. #
------------------------------
Date: 5 Apr 1998 02:57:29 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Someone put my munged e-mail address on a spam list
Message-Id: <891745049.416216@cabal>
In <6g5o9q$8gr$1@news.orst.edu> stanley@skyking.OCE.ORST.EDU (John Stanley) writes:
>In article <891686800.706026@cabal>,
>? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au> wrote:
[...]
>>Usenet the propergation dose, Usenet the culture doese not.
>The "culture" works just fine without mail.
Even the bit that says "If your post is not of general intrest you should
mail your reply to the author?"
[...]
>>It is needed for the culture to work.
>Nonsense. If it were such a mandatory part of the process, then news
>systems would have always enforced authentication of From: headers.
The forced authentication was not done because it was considered two hard,
anyway everybody on the network was honest so why should we bother?
--
I'm a perl programer if you need perl programing hire me. Buy easter bilbies.
Please excuse my spelling as I suffer from agraphia see the url. Support NoCeM
http://www.cit.nepean.uws.edu.au/~dformosa/Spelling.html http://www.cm.org/
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: Sat, 04 Apr 1998 22:17:20 GMT
From: daclay@NOSPAMzip.com.au (Excession)
Subject: Re: Urgent: Perl Win32 vs Unix Perl
Message-Id: <3527b098.4130210@news.zip.com.au>
On 4 Apr 1998 20:56:19 GMT, ehp@gte.net (Ethan H. Poole) wrote:
>In article <3525e058.418441@news.saix.net>, probe@hotmail.com says...
>>Perl scripts will be placed on their Unix machine, the rest of the
>>Frontpage stuff will be on an NT machine.
>>Their reason is that Perl Win32 is "buggy, and more than capable of
>>causing NT to crash, and Perl is more stable on Unix", and they are
>Wish I knew what is/was prompting your provider to say that. My initial
>reaction is that they are full of s**t, just don't want to do it, and that's
>the best excuse they could come up with.
>I run ActiveState's Perl for Win32 on my testing server (IIS 3.0) and
>absolutely put it through hell on occassions to test my scripts under
>worst-case scenerios. My own provider also runs this same version of perl on
>their systems, and so do thousands of other providers. And yet, I have never
>seen nor heard of a single instance of Perl "crashing NT".
IIS on NT will CRASH due to perl scripts not working correctly (bad script
code, whatever), and that crash WILL kill the server (not just the
application).
This has been the case at work for a long time. They have to be very
careful with new perl scripts on their IIS server, which also runs
Microsoft Exchange, because the crashes that ensue create a 30-45minute
reboot time, as Windows NT goes through it's chkdsk routine :-(.
If they were using big RAID arrays, like 30GB, it could take up to 18 hours
to do a chkdsk under Windows NT. No lie!
Dac
---
David Andrew Clayton # Please remove NO_SPAM when
dac@NOSPAM.pcug.org.au # sending email replies.
I post therefore I am. #
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 2252
**************************************