[9435] in Perl-Users-Digest
Perl-Users Digest, Issue: 3030 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 30 16:17:29 1998
Date: Tue, 30 Jun 98 13:00:51 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 30 Jun 1998 Volume: 8 Number: 3030
Today's topics:
Re: ! Free For All Links Page --HELP! rpearce@my-dejanews.com
$- and $= <prl2@lehigh.edu>
Re: Alternative solution ? (Josh Kortbein)
Arrays (Keith L. Miller)
Re: Camel book examples and -w (Marc Haber)
Re: Camel book examples and -w <tchrist@mox.perl.com>
Re: Camel book examples and -w (Marc Haber)
Re: Camel book examples and -w <tchrist@mox.perl.com>
Re: change directory in perl <jhi@alpha.hut.fi>
Comparing date stamps raanders@my-dejanews.com
Re: Comparing date stamps <tchrist@mox.perl.com>
Re: convert if statements to foreach (Larry Rosler)
Cookies with Perl and IIS 4.0 bigbeta69@my-dejanews.com
Couple of quick ?'s from perl newbie cia1@ix.netcom.com
Re: Couple of quick ?'s from perl newbie (Larry Rosler)
Re: Flames.... <upsetter@ziplink.net>
goto disallowed outside blocks?! (Ed Korthof)
Help me write a CGI Perl file kjernigan@geocities.com
Re: HOW TO: freestanding modules? <scribble@pobox.com>
Re: Java and Perl together? (Fred Fluharty)
Re: Java and Perl together? <bowlin@sirius.com>
Re: localtime(time); gets wrong date (Michael J Gebis)
multithreading in Perl? <ghersh@bbnplanet.com>
Re: multithreading in Perl? <tchrist@mox.perl.com>
Re: Music w/ Perl (brian d foy)
Re: Net::FTP ftp->put() - How to get the Error Code up (Jeffrey R. Drumm)
Re: panic: malloc at D:\nDS\wwwroot\cgi-bin\constructsy (Ilya Zakharevich)
Re: problems with script (Abigail)
Re: PUZZLE: dutree (new) <quentin@shaddam.amd.com>
Re: PUZZLE: dutree (new) <tchrist@mox.perl.com>
Re: Sorting values usings arrays <Pap22@erols.com>
Re: Two commands, one button. (brian d foy)
Re: Webresource.net (brian d foy)
Re: Webresource.net (David Adler)
Re: What a Crappy World (Craig Berry)
Re: yacc (and lex) in Perl (Peter Rowell)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 30 Jun 1998 18:15:25 GMT
From: rpearce@my-dejanews.com
To: colin@wolrich.com
Subject: Re: ! Free For All Links Page --HELP!
Message-Id: <6nb9vs$hld$1@nnrp1.dejanews.com>
In article <35981FDD.97123B2B@wolrich.com>,
Colin Wolrich <colin@wolrich.com> wrote:
> foreach $tag ( keys %sections) { # For every tag
> if ( ($FORM{'section'} eq $sections{$tag}) &&
> ($line =~ /<!--$tag-->/) ) {
>
> print FILE "<li><a
> href=\"$FORM{'url'}\">$FORM{'title'}\">$FORM{'desc'}</a>\n";
^
This tag does not belong.
If you actually want a > symbol, use '>'
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 30 Jun 1998 14:36:10 -0400
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: $- and $=
Message-Id: <6nbb6s$g3u@fidoii.cc.Lehigh.EDU>
Hello, I'm having some trouble setting page length and reading/setting the
amount of lines left.
I said:
...
$= = 66;
...
format REPORT =
...
push @text, @stuff;
print "\$#text = $#text.\n";
print "\$- = $-.\n";
if (($#text + 1) > $-) { print "page!\n"; $- = 0;}
foreach $text (@text) {write REPORT;}
...
The idea is to keep my text block (contained in @text) together, not split over
page breaks.
Well, page length is not 66, and I get test output like:
$#text = 7.
$- = 0.
page!
Thanks for any help,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Phil R Lawrence phone: 610-758-3051
Programmer / Analyst e-mail: prl2@lehigh.edu
194 Lehigh University Computing Center
E.W. Fairchild - Martindale, Bldg. 8B
Bethlehem, PA 18018
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 30 Jun 1998 18:51:28 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: Alternative solution ?
Message-Id: <6nbc3g$k9e$2@news.iastate.edu>
Andrew MacInnes (a.g.macinnes@rl.ac.uk) wrote:
: I am trying to get information from a file and have written the
: following script using perl FAQ's and tutorials. This works fine,
: however I would like a more efficient way to get the data into the
: array. Could someone please give me an idea for a better solution which
: does not mean me having to create a temp file each time.
: #!usr/local/bin/perl/
: # run command to get data from log and write to a new file
: exec "grep 130.246.12.22 log.dat | grep 130.246.180.31 > temp";
Are you sure you want to use exec here? It never returns, unless
it fails (in which case the rest of your program can't do much).
Try system() instead.
Or, for an alternate solution (maybe not so hot if your grep
returns a big list), use backticks:
@data_array = `grep 130.246.12.22 log.dat | grep 130.246.180.31`;
which should eliminate the code below.
: # open new file and read data into array
: $file = 'temp'; # Name the file
: open(INFO, $file); # Open the file
: @data_array = <INFO>; # Read it into an array
: close(INFO); # Close the file
Josh
------------------------------
Date: Tue, 30 Jun 1998 19:42:54 GMT
From: miller@bigsky.net (Keith L. Miller)
Subject: Arrays
Message-Id: <35993f23.22379593@news.bigsky.net>
I have an array, lets say:
@ports=(15,17);
now, I want to be able to compare every element of the array in an if
statement such asL
if ($test eq "temp" && $test2 == ??????){
Now, what do I put where the ?'s are so that it will make the
comparison to every element in tie @ports array?
Thanks,
Keith
------------------------------
Date: Tue, 30 Jun 1998 18:35:38 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Camel book examples and -w
Message-Id: <6nbb6q$jln$6@nz12.rz.uni-karlsruhe.de>
Tom Christiansen <tchrist@mox.perl.com> wrote:
>Try using defined(fileno(FH)) or something.
open( EXIMLOGOUT, ">&STDOUT" );
open( EXIMLOGERR, ">&STDERR" );
unless( defined(fileno(EXIMLOGOUT)) && defined(fileno(EXIMLOGERR)) )
{
# this was added solely to make -w shut up
die "error redirecting output";
}
does seem to work reasonably well. But why does the close() not
qualify as "using" the FH?
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: 30 Jun 1998 19:22:30 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Camel book examples and -w
Message-Id: <6nbdtm$kmt$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Marc.Haber-usenet@gmx.de (Marc Haber) writes:
:does seem to work reasonably well. But why does the close() not
:qualify as "using" the FH?
What close?
--tom
--
The only disadvantage I see is that it would force everyone to get Perl.
Horrors. :-)
--Larry Wall in <8854@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Tue, 30 Jun 1998 19:31:25 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Camel book examples and -w
Message-Id: <6nbefd$k2b$1@nz12.rz.uni-karlsruhe.de>
Tom Christiansen <tchrist@mox.perl.com> wrote:
>In comp.lang.perl.misc,
> Marc.Haber-usenet@gmx.de (Marc Haber) writes:
>:does seem to work reasonably well. But why does the close() not
>:qualify as "using" the FH?
>
>What close?
oops, must have missed that. I mean:
>>#!/usr/bin/perl -w
>>open(SAVEOUT, ">&STDOUT");
>>open(STDOUT, ">&SAVEOUT");
Complains that SAVEOUT is used only once. Well, obviously it isn't.
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: 30 Jun 1998 19:44:53 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Camel book examples and -w
Message-Id: <6nbf7l$kmt$5@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Marc.Haber-usenet@gmx.de (Marc Haber) writes:
:Complains that SAVEOUT is used only once. Well, obviously it isn't.
The compiler doesn't look inside strings for this. Patches welcome.
--tom
--
A penny saved is ridiculous.
------------------------------
Date: 30 Jun 1998 22:48:15 +0300
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: change directory in perl
Message-Id: <oeepvfqhds0.fsf@alpha.hut.fi>
waikei@my-dejanews.com writes:
>
> Hi,
>
> I want to write a script which is used to change the working
> directory. The problem is: After the script run, the working
> dir. is back to the original dir. but actually I want to stay
> in the new working directory. I change the dir. by the function
> chdir. Could anyone kindly give me some hints?
Consult the FAQ before sending your question to thousands of people?
>From perlfaq8:
I {changed directory, modified my environment} in a perl script. How come
the change disappeared when I exited the script? How do I get my changes
to be visible?
Unix
In the strictest sense, it can't be done -- the script executes as a
different process from the shell it was started from. Changes to a
process are not reflected in its parent, only in its own children
created after the change. There is shell magic that may allow you to
fake it by eval()ing the script's output in your shell; check out the
comp.unix.questions FAQ for details.
> Regards,
> Wilbur
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
--
$jhi++; # http://www.iki.fi/~jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
------------------------------
Date: Tue, 30 Jun 1998 18:54:41 GMT
From: raanders@my-dejanews.com
Subject: Comparing date stamps
Message-Id: <6nbc9h$l5q$1@nnrp1.dejanews.com>
In a program I am writing, I am trying to compare the date stamps of two
files to see which file is newer. Can anyone tell me how to do this? I'm
pretty new to Perl so please talk slow...! Thanks in advance!
raanders
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 30 Jun 1998 19:29:48 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Comparing date stamps
Message-Id: <6nbebc$kmt$4@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
raanders@my-dejanews.com writes:
:In a program I am writing, I am trying to compare the date stamps of two
:files to see which file is newer. Can anyone tell me how to do this? I'm
:pretty new to Perl so please talk slow...! Thanks in advance!
if (-M $file1 > -M $file2) { .... }
--tom
--
TCP/IP: handling tomorrow's loads today
OSI: handling yesterday's loads someday
------------------------------
Date: Tue, 30 Jun 1998 12:31:12 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: convert if statements to foreach
Message-Id: <MPG.1002dcda375e138d9896d7@nntp.hpl.hp.com>
In article <6nb7d3$d8b$1@nnrp1.dejanews.com> on Tue, 30 Jun 1998 17:31:12
GMT, Juli@my-dejanews.com <Juli@my-dejanews.com> says...
...<big snip>
> What I am trying to do is convert this into a foreach statement, instead of
> all these if statements. Here's something like what I would like to do. I'm
> not really sure how this works with an array.
>
> $rep_name = "mike gary doug CPA";
> @rep = split (/ /, $rep_name);
> foreach $_ (@rep){
$_ is the default -- leave it out.
> if (!open(LIST, "list.pl")){
> print "can't open file";
> }
> while (<LIST>) {
You really don't want to open and read the file for every single name.
Far better to read it once and save the words in a hash. See below.
> if (/$_/) {
> # if word matches word in list, keep value
> }
> else {
> #capitalize the first letter, and make the rest lower case
> $i_first_letter = substr($one,0,1);
> $i_first_letter =~ tr/a-z/A-Z/;
> $i_the_rest = substr($one,1);
> $i_the_rest =~ tr/A-Z/a-z/;
> $word = $i_first_letter.$i_the_rest;
> }
#/usr/local/bin/perl -w
use strict;
# CAUTION: UNCOMPILED AND UNTESTED CODE FOLLOWS!
open(LIST, "list.pl") or die "can't open file list.pl. $!.";
my %list;
chomp, $list{$_} = 1 while <LIST>;
close LIST;
my $rep_name = "mike gary doug CPA";
my @rep = split (/ /, $rep_name);
foreach (@rep) {
next if $list{$_}; # if word matches word in list, keep value
$_ = ucfirst lc; # capitalize first letter only and replace
}
# The result is now in the array @rep.
__END__
Lovers of one-liners (like me) might write that loop as:
foreach (@rep) { $_ = ucfirst lc unless $list{$_} }
There are several other ways to do it, of course.
I hope this helps.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 30 Jun 1998 18:17:25 GMT
From: bigbeta69@my-dejanews.com
Subject: Cookies with Perl and IIS 4.0
Message-Id: <6nba3k$huc$1@nnrp1.dejanews.com>
I'm probably missing a very basic step here... I'm trying to set a cookie in
perl, but when I type
the following code:
# Print out the HTML Content-Type header.
print "Content-type: text/html\n";
# Set a new cookie.
&SetCookies('user','1'); #This is from a library from Matt's Script Archive
# End the headers sent to browser.
print "\n";
The lines that are printed are actually printed onto the HTML page! (i.e., the
cookie is never
set, all that happens is this line is displayed in my browser:
Content-type: text/html Set-Cookie: user=1; expires=Fri, 26-06-2999 00:00:00
GMT;
I know i'm missing somehting very simple.. Any help is appreciated..
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 30 Jun 1998 17:47:10 GMT
From: cia1@ix.netcom.com
Subject: Couple of quick ?'s from perl newbie
Message-Id: <6nb8at$ev0$1@nnrp1.dejanews.com>
Thanks in advance to any who can help!
The following is a piece of code from my first ever script that appends to a
file some form info:
open (DB, ">>data.txt");
print DB "$FORM{'name'}|$FORM{'email'}|$FORM{'phone'}|$FORM{'room'}|
$FORM{'month'}|$FORM{'day'}|$FORM{'year'}|$FORM{'from'}|$FORM{'ampm'}|
$FORM{'to'}|$FORM{'ampm2'}\n";
close(DB);
It seems to work o.k.. When I open data.text it looks fine:
John Rodriguez|jrod@mail.com|333-3333|room1|Jul|5|1998|9|AM|10|AM
Jack Smith|dk@fdk.com|123-4565|room2|Aug|1|1998|10|AM|11|AM
When I try to read the file I'm having trouble splitting them into scalers and
printing the scalers.
I've tried:
open (DB, "data.txt");
while <DB> {
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)=split(/|/);
print "$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11";
}
close <DB>;
I get a "Document Contains No Data" when I run the script.
When I try to just print the contents of the file:
open (DB, "data.txt");
while <DB> {
print DB;
}
close <DB>;
It prints a little strange putting the first name of the following line at the
end of each line, like this:
John Rodriguez|jrod@mail.com|343-3333|room1|Jul|5|1998|9|AM|10|AM Jack
Smith|dk@fdk.com|123-4565|room2|Aug|1|1998|10|AM|11|AM
My ultimate goal is to search that file based on some form input and just
print back the lines that match the search criteria, but right now I'd just
like to be able to read the file and access specific variables.
Should I be using foreach instead of while?
Sorry for the lengthy post.
Cheers,
Dave
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 30 Jun 1998 12:46:53 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Couple of quick ?'s from perl newbie
Message-Id: <MPG.1002e08a26ac5299896d8@nntp.hpl.hp.com>
In article <6nb8at$ev0$1@nnrp1.dejanews.com> on Tue, 30 Jun 1998 17:47:10
GMT, cia1@ix.netcom.com <cia1@ix.netcom.com> says...
...
> When I try to read the file I'm having trouble splitting them into scalers and
> printing the scalers.
>
> I've tried:
>
> open (DB, "data.txt");
How do you know you opened the file successfully?
> while <DB> {
while (<DB>) {
> > ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)=split(/|/);
'|' is magic in regular expressions. Use /\|/ to suppress the magic.
> print "$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11";
What if there were more or fewer than 11? The following will print as
many as there are, separated by spaces:
my @fields = split /\|/;
print "@fields";
The last field printed will include its terminating newline character.
To separate by ', ', you could set
local $" = ', ';
or write it in one line as:
print join ', ', split /\|/;
> }
> close <DB>;
close DB;
>
> I get a "Document Contains No Data" when I run the script.
No surprise. As written, the script shouldn't compile! You should form
the habit of using the '-w' flag on the first line, and the 'use strict;'
pragma to force you to declare variables.
> When I try to just print the contents of the file:
>
> open (DB, "data.txt");
> while <DB> {
while (<DB>) {
> print DB;
You are trying to print back to the file that was opened for input.
Ouch! Just 'print;' will print the line just read on the standard
output.
> }
> close <DB>;
close DB;
...
> My ultimate goal is to search that file based on some form input and just
> print back the lines that match the search criteria, but right now I'd just
> like to be able to read the file and access specific variables.
>
> Should I be using foreach instead of while?
No. But what you *should* be using is '-w', 'use strict;', and
'Learning Perl' from O'Reilly and Associates. There is a lot to learn.
Good luck!
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 30 Jun 1998 17:41:11 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Flames....
Message-Id: <6nb7vn$4a0@fridge.shore.net>
Tom Christiansen <tchrist@mox.perl.com> wrote:
: [courtesy cc of this posting sent to cited author via email]
: In comp.lang.perl.misc,
: ws97-868@wsrz1.wiso.uni-erlangen.de writes:
: :Of course there are FAQ\xb4s a.s.o but the amount of text,as useful it may
: :be for every aspect of perl programming,is often too comprehensive.
: Oh my goodness -- I never realized! I'll be glad to remove, say,
: every second or third FAQ from the next release so that they can be less
: comprehensive and easier for the non-programming crowd not to find their
: answers in.
The point -- which most people would catch -- is that many of the docs are
so comprehensive that (a) they're hard for beginners to wade through
(whether they're programmers or not) and (b) oftentimes they assume a
large amount of knowledge (of other utilities or whatnot) that a beginner
won't always have.
--Art
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.ziplink.net/~upsetter/ska/calendar.html
--------------------------------------------------------------------------
------------------------------
Date: Tue, 30 Jun 1998 17:59:46 GMT
From: ed@crankshaft.linex.com (Ed Korthof)
Subject: goto disallowed outside blocks?!
Message-Id: <6nb92i$2qn$1@crankshaft.linex.com>
Hi --
I'm writing about a change which happened sometime between Perl 5.003_08 and
Perl 5.004_04, and which is (so far as I've been able to tell) undocumented.
When I try to goto a label from w/in a signal handler, it tells me it can't
goto outside a block! Here's simple code which demonstrates the error:
-----
[ed@crankshaft ed]$ ./test.pl
Can't "goto" outside a block at ./test.pl line 3.
[ed@crankshaft ed]$ more test.pl
#!/usr/bin/perl
$SIG{'ALRM'} = sub { goto BAR; };
alarm 5; sleep 10;
BAR:
print STDERR "I'm back!\n";
[ed@crankshaft ed]$ perl -v
This is perl, version 5.004_04 built for i386-linux
-----
I can verify that this problem also occurs under "sun4-solaris", and have been
told it happens under Free BSD as well. What's up with this, and why isn't it
documented (or is it documented somewhere -- I couldn't find it in the CHANGES
file or in the FAQ, or in perldoc perlfunc)? Is there a reasonable
work-around for signal handlers? If I need to, I'll make make the labels
into "functions" and pass information around with global variables, but
having to do that would make me very sad.
And yes, I have tried the extreme cruftiness of putting the "goto" statement
and the label within spurious while loops. It didn't change anything.
Any help would be greatly appreciated.
Ed
PS. Hopefully I'm not double posting this, but I tried sending it via a web
news service, and that appeared to be unsuccessful.
------------------------------
Date: Tue, 30 Jun 1998 19:39:12 GMT
From: kjernigan@geocities.com
Subject: Help me write a CGI Perl file
Message-Id: <6nbet0$p0a$1@nnrp1.dejanews.com>
Hello,
I am trying to write a perl program that will be an administration program
for my Guestbook, if someone here would like to help me, please e-mail me to
make it easier. My e-mail address is kjernigan@geocities.com THANKS! Oh, the
script is my modified version of Matt's Guestbook!
KENNY
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 30 Jun 1998 12:54:29 -0500
From: Tushar Samant <scribble@pobox.com>
Subject: Re: HOW TO: freestanding modules?
Message-Id: <6nb8ol$9tg@tekka.wwa.com>
k y n n , who posted from the suspicious address <NOSPAMkEynOn@panix.comNOSPAM>
and might want to look at <http://www.cauce.org/>, writes:
>
>Hi. I'm trying to learn how to use packages and modules in Perl, but
>after mucking around for a while, I haven't managed to figure out a
>way to write a module so that it can also be called by itself as a
>freestanding script.
For one answer to this, I suggest looking up the function "caller".
I don't know how far it will get you in your case and how hideous it
will look, but caller() outside of a subroutine will return empty in
a "freestanding" script.
>A related question is, is it possible to find out dynamically whether
>the current scope is the same as main:: ?
See perlfaq7.
>And a last question is, does Perl have a provision (like, e.g., Python
>has) for resolving circular module dependencies?
I don't know what you mean, so I cannot answer this. "use" may report
undefined functions because of its out-of-sequence loading.
------------------------------
Date: Tue, 30 Jun 1998 17:31:52 GMT
From: fmfluh00@pop.uky.edu (Fred Fluharty)
Subject: Re: Java and Perl together?
Message-Id: <MPG.1002eb103fe601689896a4@news.iglou.com>
[This followup was posted to comp.lang.perl and a copy was sent to the
cited author.]
I've done something similar to, if not exactly like, what you're asking
about. Take a look at http://www.harnessracing.com/hfw/top10.shtml.
Place your votes and watch what it does. If this is basically what
you're looking for, let me know.
If you want the perl script to actually return information to the java
applet, then you'll probably have to deal with sockets to get standard
input and standard output stuff.
Another option would be something like I have, but have the perl script
output a new applet tag including parameters determined by the script.
In article <3598F568.A14806B8@ki.com>, baxter@ki.com says...
> Hello!
>
> My boss has asked me to write a perl script to scan files while another
> guy writes a Java front end for it.
>
> Any suggestions for how best to have these programs talk to one
> another? Our solution must run on NT as well as UNIX.
> --
> Scott Baxter: Documentation, Webmaster (800) 945-4454 X253
> Ki NETWORKS, Inc. mailto:scott.baxter@ki.com
>
>
------------------------------
Date: Tue, 30 Jun 1998 11:15:39 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: Scott Baxter <baxter@ki.com>
Subject: Re: Java and Perl together?
Message-Id: <35992B4B.EB4D3FC9@sirius.com>
Scott Baxter wrote:
>
> Hello!
>
> My boss has asked me to write a perl script to scan files while another
> guy writes a Java front end for it.
>
> Any suggestions for how best to have these programs talk to one
> another? Our solution must run on NT as well as UNIX.
> --
> Scott Baxter: Documentation, Webmaster (800) 945-4454 X253
> Ki NETWORKS, Inc. mailto:scott.baxter@ki.com
Another solution is to have a Java applet call a Perl CGI program
on the same host that the applet came from. Selena Sol has some
boiler plate code available for doing this.
HTH -- Jim Bowlin
------------------------------
Date: 30 Jun 1998 18:16:21 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: localtime(time); gets wrong date
Message-Id: <6nba1l$3id@mozo.cc.purdue.edu>
Heribert Wettels <heribert.wettels@sueddeutsche.de> writes:
}In order to determin the date I use localtime(time); as described in the
}camel book. As result I always get month-1, i.e. "5" instead of "6"
}which would be correct for June. The shell command "date", however,
}delivers the correct date.
}Am I doing something wrong or is this probably a known bug (didn't find
}any reference to it)?
man perlfunc, look for localtime. It explicitly describes this.
(If you can't find it, send mail DIRECTLY to me and I'll show you
where.)
You now have a karmic debt to this group for asking a question
which is directly answered in the man page. Don't worry, though: you
can pay your karmic debt by helping out someone else on this group.
And remember: the universe doesn't give credit for rude answers.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Tue, 30 Jun 1998 18:54:02 GMT
From: Greg Hersh <ghersh@bbnplanet.com>
Subject: multithreading in Perl?
Message-Id: <35993432.5534@bbnplanet.com>
I've heard that the forthcoming release of Perl (5.005?) will
support multithreading. Never done it in C, and wonder whether
it will have the same functionality you can achive using 'fork'.
I'm interested in mutlthreading because forking multipile childs
takes too much space.
I would appreciate any info regarding this feature implemented in
Perl.
--
Greg
------------------------------
Date: 30 Jun 1998 19:27:03 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: multithreading in Perl?
Message-Id: <6nbe67$kmt$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Greg Hersh <ghersh@bbnplanet.com> writes:
:I've heard that the forthcoming release of Perl (5.005?) will
:support multithreading. Never done it in C, and wonder whether
:it will have the same functionality you can achive using 'fork'.
:
:I'm interested in mutlthreading because forking multipile childs
:takes too much space.
That makes no sense. Multiple forked children take up virtually
the same about of space as a single parent. Only on primitive
operating systems without copy-on-write technology is this
a proplem.
:I would appreciate any info regarding this feature implemented in
:Perl.
#::::::::::::::
#prime-fork
#::::::::::::::
#!/usr/bin/perl
# prime-fork - demo silly prime number finder
# using forks.
sub forksub(&);
use strict;
main();
exit;
sub main {
my($head,$tail) = queue();
my $kid = forksub {
close($tail);
check_num($head, 2)
};
close $head;
for (my $i = 3; $i <= 1000; $i++) {
enqueue($tail, $i);
}
close $tail;
waitpid($kid,0);
}
sub check_num {
my ($stream, $cur_prime) = @_;
my ($spawned, $num);
my($head, $tail) = queue();
while ($num = dequeue($stream) ) {
next unless $num % $cur_prime;
if ($spawned) {
enqueue($tail, $num);
next;
}
print "Found prime $num\n";
$spawned = forksub {
close($tail);
check_num($head, $num)
};
close $head;
}
close($head) unless $spawned;
close($tail);
waitpid($spawned,0) if $spawned;
exit;
}
sub forksub(&) {
my $coderef = $_[0];
my $pid = fork();
die "cannot fork: $!" unless defined $pid;
return $pid if $pid;
goto &$coderef; # don't need no stinkin' stack frames
}
sub queue {
local(*READER, *WRITER);
pipe(READER, WRITER) || die "can't pipe: $!";
return (*READER, *WRITER);
}
sub enqueue(*$) {
my ($stream, $n) = @_;
syswrite($stream, pack("L", $n), 4); # XXX: errno
}
sub dequeue(*) {
my ($stream) = @_;
my $n;
sysread($stream, $n, 4) == 4 || return;
unpack("L", $n);
}
# ::::::::::::::
# prime-thread
# ::::::::::::::
#!/usr/bin/perl
# prime-thread - demo silly prime number finder
# using threads. see prime-fork.
use Thread;
use Thread::Queue;
my $stream = new Thread::Queue;
my $firstborn = new Thread(\&check_num, $stream, 2);
for my $i ( 3 .. 1000 ) {
$stream->enqueue($i);
}
$stream->enqueue(undef);
$firstborn->join();
sub check_num {
my ($upstream, $cur_prime) = @_;
my $kid;
my $downstream = new Thread::Queue;
while (my $num = $upstream->dequeue) {
next unless $num % $cur_prime;
if ($kid) {
$downstream->enqueue($num);
} else {
print "Found prime $num\n";
$kid = new Thread(\&check_num, $downstream, $num);
}
}
$downstream->enqueue(undef) if $kid;
$kid->join() if $kid;
}
::::::::::::::
prime-thread-sugalskd
::::::::::::::
#!/usr/bin/perl -w
use strict;
use Thread;
use Thread::Queue;
my $ChildQueue = new Thread::Queue;
my $FirstThread = new Thread \&check_num, \$ChildQueue, 2;
for my $i ( 3 .. 1000 ) {
$ChildQueue->enqueue($i);
}
$ChildQueue->enqueue(undef);
$FirstThread->join;
sub check_num {
my ($Queue, $LocalPrime) = @_;
my $MadeChild = 0;
my $ChildThread;
my $ChildQueue = new Thread::Queue;
while (my $CheckNum = ($$Queue->dequeue)) {
if ($CheckNum % $LocalPrime) {
if ($MadeChild) {
$ChildQueue->enqueue($CheckNum);
} else {
print "Found prime $CheckNum\n";
$ChildThread = new Thread \&check_num, \$ChildQueue, $CheckNum;
$MadeChild = 1;
}
}
}
$ChildQueue->enqueue(undef) if $MadeChild;
$ChildThread->join if $MadeChild;
}
# ::::::::::::::
# chkfork
# ::::::::::::::
#!/usr/bin/perl
## usage: chkfork [ N [ L ] ]
## We check memory changes in /proc/meminfo.
## This start 2**N processes. N defaults to 0.
## We only show the first L lines. L defaults to all.
use strict;
BEGIN { die "This isn't linux." unless $^O =~ /linux/i; }
use Fcntl qw(:flock);
use vars qw($MEMINFO $Filter_Pid);
$MEMINFO = "/proc/meminfo";
my $Count = shift || 0;
my $Lines = shift || 0;
filter();
@::GOBBLE = ("fred") x 100000; # gobble lotsa memory
show_info();
while (--$Count > 0) {
fork;
show_info();
}
unfilter();
exit;
################################################
sub show_info {
open(MEMINFO) || die "can't open $MEMINFO: $!";
# flock(MEMINFO, LOCK_EX);
while (<MEMINFO>) {
next if /^(Mem|Swap):/;
s{(\d+) kB}{sprintf("%*dM", (length($1)-1), $1/1024)}ge;
s/^/$$:/;
print unless /total:/;
}
close MEMINFO;
}
sub filter {
flush();
unless ($Filter_Pid = open(STDOUT, "|-")) {
die "cannot fork: $!" unless defined $Filter_Pid;
head($Lines) if $Lines;
my %mem;
while (<STDIN>) {
my ($pid, $field, $size) = split /[:\s]+/;
next unless $size;
push @{ $mem{$pid}{$field} }, $size;
}
foreach my $pid ( sort { $a <=> $b } keys %mem ) {
foreach my $field ( keys %{ $mem{$pid} } ) {
my @vals = @{ $mem{$pid}{$field} };
printf "%-5d %12s " . "%6s " x @vals . "\n",
$pid, $field, @vals;
}
}
exit;
}
flush();
}
sub unfilter {
close(STDOUT);
# waitpid($Filter_Pid,0);
}
sub head {
return if my $pid = open(STDOUT, "|-");
die "cannot fork: $!" unless defined $pid;
my $count = shift;
while (<STDIN>) {
if ($count-- > 0) {
print;
} else {
exit;
}
}
exit;
}
sub flush { $| = 1; } # or duplicate output buffers!!
__END__
total: used: free: shared: buffers: cached:
Mem: 130650112 80674816 49975296 49299456 25858048 22708224
Swap: 263192576 0 263192576
MemTotal: 127588 kB
MemFree: 48804 kB
MemShared: 48144 kB
Buffers: 25252 kB
Cached: 22176 kB
SwapTotal: 257024 kB
SwapFree: 257024 kB
--
"Software is like sex: It's better when it's free." (Linus Torvalds, from
FSF T-shirt)
------------------------------
Date: Tue, 30 Jun 1998 14:02:42 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Music w/ Perl
Message-Id: <comdog-ya02408000R3006981402420001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6nau5v$u5a$1@nnrp1.dejanews.com>, prakashpatel@my-dejanews.com posted:
>I have about 5 .ram audio files and I'm wondering if I could have them all
>play just by one click of mouse button. Instead of visitors having to click
>on them seperately after every song is over. I need to know if I can do that
>through perl cgi-script.
one problem is that you don't know when one song has stopped playing
since the user can pause the stream.
perhaps, instead of a kludge, you should just make them into one Real
Audio file.
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>
------------------------------
Date: Tue, 30 Jun 1998 18:41:14 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: Net::FTP ftp->put() - How to get the Error Code upon failure
Message-Id: <35992e11.970811232@news.mmc.org>
[ posted to comp.lang.perl.misc and a courtesy copy was mailed to the cited
author ]
On Tue, 30 Jun 1998 07:51:48 -0400, "Rathnakar Yelandur" <r.r@worldnet.att.net>
wrote:
>I am using Net::FTP package. When I use the PUT
>Function returns "Remote File Name" that was created or
>specified upon Success.
>It returns UNDEF upon FAILURE.
>
>Is there any way to get ERROR CODE & the Message text
>upon failure.
>
>Turning DEBUG mode on and processing STDERR is one
>way of circumventing this problem.
The message() method is inherited from Net::Cmd, so you can simply check
$ftp->message (assuming here that your FTP object is named $ftp):
$ftp->get($remote_file,$local_file) or die $ftp->message;
You probably want to do something other than die . . . ;-)
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me
------------------------------
Date: 30 Jun 1998 19:18:35 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: panic: malloc at D:\nDS\wwwroot\cgi-bin\constructsys.pl line 186.
Message-Id: <6nbdmb$ael$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Norman Bunn
<norman.bunn@mci.com>],
who wrote in article <Ch4m1.1032$P06.378473@pm01nn>:
> I get the following message:
>
> panic: malloc at D:\nDS\wwwroot\cgi-bin\constructsys.pl line 186.
>
> when running the following code:
Hmm, this message may happen only with DEBUGGING perl. It is left as
a remnant of old time, newer malloc.c's have a better message
"Out of memory during ridiculously large request"
down below the execution path, which is not reached ;-(.
On 32-bit machines it means that malloc() got a request for 2^31 bytes
or more, most probably due to giving a negative arg to malloc(), or
something like $arr[time].
>
> $systemFile = "/nDS/wwwroot/data/db.$groupID.$profile.$systemID";
> dbmopen (%systemBase, $systemFile, 0666) || die "Can't open $systemFile\n";
> $thisCounter = 0;
> while ( $thisCounter <=3 )
> {
> $counter[$thisCounter] = 0;
> $thisCounter++;
> }
> while (($systemKey, $systemValue) = each %systemBase)
> {
> # ($type, $MSO, $linkage, $package) = split('{}', $systemValue);
> print "$systemValue";
> #=========
> }
> dbmclose(systemBase);
> end_html;
> exit;
> #=========
>
> the data looks like:
>
> Monitor{}3{}6{}yesJC-1746UMAMonitor{}3{}6{}yes360-5420Monitor{}3{}6{}yes360-
> 6014Monitor{}3{}6{}yes360-5231Monitor{}3{}6{}yes360-6170Monitor{}3{}6{}yes36
> 0-5033Monitor{}3{}6{}yes360-5031Modem{}3{}0{}313-0520Input{}3{}0{}310-3600Ne
> twork{}3{}3{}430-1576Network{}3{}3{}360-6015Video{}3{}0{}320-0220Storage{}3{
> }5{}340-0748Storage{}3{}5{}340-0751Storage{}3{}5{}340-0734Storage{}3{}5{}340
> -0737Sound{}3{}4{}313-1001Sound{}3{}4{}313-0202Sound{}3{}0{}313-0375Memory{}
> 3{}2{}311-0518Memory{}3{}2{}311-0517DTAccess{}3{}1{}220-0498DTAccess{}3{}1{}
> 220-0483Warranty{}3{}0{}900-1902OS{}3{}0{}420-0118Configuration{}1{}0{}365-0
> 211Desktop{}0{}0{}220-0416
>
> Where the 123-1234 portions represent the keys.
>
> I'm running Perl 5.004_002 under IIS 4 and NT 4.0. This code works fine for
> the following data:
Hope this helps,
Ilya
------------------------------
Date: 30 Jun 1998 19:22:24 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: problems with script
Message-Id: <6nbdtg$60e$1@client3.news.psi.net>
Matt Knecht (hex@voicenet.com) wrote on MDCCLXIV September MCMXCIII in
<URL: news:wk7m1.60$zY.548756@news3.voicenet.com>:
++ Abigail <abigail@fnx.com> wrote:
++ >I dunno. Where does it stop?
++ >
++ > ($foo = (($bar) + (7)));
++
++ Long before that, hopefully! I can't remember where I read it, but a
++ very good book about C says something to the effect of: "You need only
++ remember one rule of precedence. Multiplication and division come
++ before addition and subtraction. Any else, use parentheses." Of
++ course, in C you don't have to worry about the precedence of '='.
So, you state a rule, directly followed by an exeption.
What about $foo = $bar [3] + 3; ? Another exception?
$foo = $$bar + 3; ? Yet another exception?
/bar/ || /foo/; ? Parens here??
++
++ I think this style is a Good Thing(tm):
++
++ if (!((($a < $b) && ($c > $d)) || $f))
Not to me, as it starts all kinds of bells and whistle that
something special is going on. But there isn't.
unless ($a < $b && $c > $d || $f) { ... }
Less noisy and clear.
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")\n-> define ("foldoc", "perl")) [0] -> print'
------------------------------
Date: 30 Jun 1998 13:36:54 -0500
From: Quentin Fennessy <quentin@shaddam.amd.com>
Subject: Re: PUZZLE: dutree (new)
Message-Id: <xim90meivnd.fsf@shaddam.amd.com>
>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
TC> Why does this version run thrice as fast as the previous one?
TC> --tom
Tom, I tried the two dutree programs and this is what I saw:
: qf@shaddam:~/tmp; time ./dutree.new>/dev/null
real 0m26.830s
user 0m0.300s
sys 0m1.160s
: qf@shaddam:~/tmp; time ./dutree.new>/dev/null
real 0m27.490s
user 0m0.250s
sys 0m1.370s
: qf@shaddam:~/tmp; time ./dutree.old>/dev/null
real 0m29.630s
user 0m0.390s
sys 0m1.220s
: qf@shaddam:~/tmp; time ./dutree.old>/dev/null
real 0m26.830s
user 0m0.390s
sys 0m1.140s
Client - UltraSPARC, cwd on NFS over 10mb/s Ethernet.
Server - Auspex, lightly loaded. Runs almost back to back.
So I cannot answer your question--I cannot reproduce
your results. Both programs take about 26-29 seconds.
Perhaps larger directories would show more difference.
~/tmp includes about 160MB of data in 7240 files.
------------------------------
Date: 30 Jun 1998 19:29:19 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: PUZZLE: dutree (new)
Message-Id: <6nbeaf$kmt$3@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Quentin Fennessy <quentin@shaddam.amd.com> writes:
:Tom, I tried the two dutree programs and this is what I saw:
Assume that the old version does take 3x the runtime that the new version
does. (Which, on a large enough dataset, it will.) Now, tell me why?
--tom
--
echo "I can't find the O_* constant definitions! You got problems."
--The Configure script from the perl distribution
------------------------------
Date: Tue, 30 Jun 1998 14:12:22 -0400
From: "Pap" <Pap22@erols.com>
Subject: Re: Sorting values usings arrays
Message-Id: <6nba04$md7$1@winter.news.erols.com>
Well here is the whole script, allong with the url for the form:
#!/usr/bin/perl
$filename = "players.dat";
print "Content-type:text/html\n\n";
print <<HTMLHead;
<html><head><title>Club Scores</title></head>
<body bgcolor="Black" text="White">
HTMLHead
;
open(INF,$filename);
@indata = <INF>;
close(INF);
print "<table border=1>";
print "<tr
bgcolor='#c00000'><th>Player</th><th>Kills</th><th>Deaths</th><th>%</th></tr
>\n";
foreach $i (@indata) {
chop($i);
($player,$zone,$heat,$email,$kills,$deaths,) = split (/\|/,$i);
$percent=int(($kills/($kills+$deaths))*100);
if ($deaths == 1 && $kills == 1) {
$percent=0;
$kills=0;
$deaths=0;
}
sub bypercent { $percent{$b} <=> $percent{$a} }
print "<tr>";
print "<td>$player</td>";
print "<td><p align=right>$kills</td>";
print "<td><p align=right>$deaths</td>";
print "<td><p align=right>$percent%</td>";
print "</tr>\n";
}
print "</table>";
print "</body></html>";
this script works, yet does not sort the data by percentage
notice sub bypercent { $percent{$b} <=> $percent{$a} }
has no relevance when i add it, since it needs something like:
foreach $player ( sort bypercent keys($percent) ) {
but this gives an error when i put it in, 500 error.
i also tried
foreach $player ( sort%percent bypercent keys($percent) ) {
and
foreach $player ( sort %percent bypercent keys($percent) ) {
same outcome, 500 server error.
the database this info comes from is in a line by line format:
Pap|zone|heat|pap22@erols.com|0|0
Pap2|zone2|heat2|pap22@erols.com|0|0
the last 0|0 are kills|deaths, fyi
if you wanna try it out, here's the url, just enter some mock info:
http://descent2defiance.fsn.net/signup.htm
Larry Rosler wrote in message ...
>[This followup was posted to comp.lang.perl.misc and a copy was sent to
>the cited author.]
>
>In article <6nb1mp$h3o$1@winter.news.erols.com> on Tue, 30 Jun 1998
>11:51:06 -0400, Pap <Pap22@erols.com> says...
>> Ok, so I have this script, and it is meant to display a player name, with
>> info about the number of kills and deaths they have, and also, their
>> percentage, as calculated. But it just displays in the order it came
from
>> the database, line by line, in the order the data was appended. I added
the
>> first two lines you see below, but they don't seem to work.
>>
>> sub bypercent { $percent{$b} <=> $percent{$a} }
>> foreach $player ( sort bypercent keys($percent) ) {
>> print "<tr>";
>> print "<td>$player</td>";
>> print "<td><p align=right>$kills</td>";
>> print "<td><p align=right>$deaths</td>";
>> print "<td><p align=right>$percent%</td>";
>> print "</tr>\n";
>> }
>>
>> Incase this might help, when I took out line #2 but kept #1, the form
>> displayed fine without any error, even though it wasnt sorted at all. To
>> clarify, I want the data to be displayed descending by percentage. If
you
>> can point out what is wrong with this script, please do, or if you know
of
>> another way I can do it, please enlighten me. Just incase, this is Perl,
>> and if you wanna take a look at the entire source code and/or want the
url,
>> just ask me.
>
>There certainly is something about this that you haven't shown. In the
>code quoted, $kills $deaths and $percent would have the same values (if
>indeed they have values) for every player. Perhaps what you meant to say
>is $kills{$player} $deaths{$player) $percent{$player}.
>
>There is no reason not to use the '-w' flag on the first line of your
>script (which would warn you about the use of undefined values for the
>variables in your script) and the 'use strict;' pragma (which would
>require you to declare each variable explicitly).
>
>The book 'Learning Perl' from O'Reilly and Associates will save you lots
>of time and grief.
>
>--
>Larry Rosler
>Hewlett-Packard Laboratories
>http://www.hpl.hp.com/personal/Larry_Rosler/
>lr@hpl.hp.com
------------------------------
Date: Tue, 30 Jun 1998 14:14:53 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Two commands, one button.
Message-Id: <comdog-ya02408000R3006981414530001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6n9n2s$7pg$1@nnrp3.snfc21.pbi.net>, "Darren Sweeney" <darrensw@pacbell.net> posted:
>I am currently reconfiguring a script, the question I have is can one submit
>button perform two functions, one after the other.
>
>e.g. I have one button which submits data to a HTML screen and another that
>then takes me to that screen
>
> <INPUT TYPE = "submit" NAME = "add_to_form" VALUE = "Add Data">
> <INPUT TYPE = "submit" NAME = "view_form" VALUE = "View Form">
>
>Can the value function accept two commands, if so what is the divider?
in your HTML, something like:
<INPUT TYPE="submit" NAME="action" VALUE="Do Both">
then, in your script, something like this pseudocode:
if ( action eq 'Do Both' )
{
do the first thing
do the second thing
}
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>
------------------------------
Date: Tue, 30 Jun 1998 14:00:51 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Webresource.net
Message-Id: <comdog-ya02408000R3006981400510001@news.panix.com>
Keywords: from just another new york perl hacker
In article <359900F1.76254387@webresource.net>, Rishi Bhattacharya <rishi@webresource.net> posted:
>Webresource.net is a new professional web site devoted to
>archiving and sharing a complete set of resources for web
>developers.
i think your content missed it's release date by about 3 years.
from <URL:http://www.webresource.net/cgi/articles/forms/> by
Brent Michalski:
Line 2 This loads the cgi-lib.pl library file. I use
cgi-lib.pl instead of the CGI.pm file because it is what I
learned on and I am more comfortable with it.
just about says it all.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>
------------------------------
Date: 30 Jun 1998 19:28:28 GMT
From: dha@panix.com (David Adler)
Subject: Re: Webresource.net
Message-Id: <6nbe8s$d5m@news1.panix.com>
On Tue, 30 Jun 1998 14:00:51 -0400, brian d foy
<comdog@computerdog.com> wrote:
>from <URL:http://www.webresource.net/cgi/articles/forms/> by
>Brent Michalski:
>
> Line 2 This loads the cgi-lib.pl library file. I use
> cgi-lib.pl instead of the CGI.pm file because it is what I
> learned on and I am more comfortable with it.
>
>just about says it all.
Uh... Well...
Eek!
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"I was under medication when I made the decision not to burn the
tapes." - President Richard Nixon
------------------------------
Date: 30 Jun 1998 18:02:11 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: What a Crappy World
Message-Id: <6nb973$pie$1@marina.cinenet.net>
John Stanley (stanley@skyking.OCE.ORST.EDU) wrote:
[many good points snipped]
I've made my case, and I recognize your strong case for the opposite view.
We've reached the point of arguing on the metalevel, dissecting analogies,
and reading the minds of strangers, all of which should pretty clearly
signal that it's time to take a deep breath and close (our part of) the
debate. Thanks for an intriguing discussion; I hope it has shed more
light than heat on the issues at question.
---------------------------------------------------------------------
| 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: 30 Jun 1998 11:11:02 -0700
From: thirdeye@sonic.net (Peter Rowell)
Subject: Re: yacc (and lex) in Perl
Message-Id: <6nb9nm$p1l@bolt.sonic.net>
Stuart Hutchinson <hutchinson@aigfpc.com> wrote:
>Just wondering if anyone knows of a yacc equilalent in Perl.
>Ie a yacc that produces Perl programs.
You are probably looking for perl-byacc1.8.2.tar.gz.
(Or whatever the current version is).
Look in http://www.cpan.org/src/misc/ or a CPAN near you.
peter
------------------------------
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 3030
**************************************