[7863] in Perl-Users-Digest
Perl-Users Digest, Issue: 1488 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 17 04:07:17 1997
Date: Wed, 17 Dec 97 01:00:30 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 17 Dec 1997 Volume: 8 Number: 1488
Today's topics:
Beginner with a ? <entrpneur@earthlink.net>
Re: compacting array (Figured it out) <rhodri@wildebst.demon.co.uk>
Re: foreach && references <rets@meta3.com>
Re: help decode a pattern <rjk@coos.dartmouth.edu>
Re: help decode a pattern <rootbeer@teleport.com>
HELP! How to use records in Perl? <gregr@ee.uwa.edu.au>
Re: HELP! How to use records in Perl? <ajh@rtk.com>
Re: localtime() _is_ year-2000 compliant, right? <westxga@ptsc.slg.eds.com>
Re: localtime() _is_ year-2000 compliant, right? <rootbeer@teleport.com>
Re: localtime() _is_ year-2000 compliant, right? <rjk@coos.dartmouth.edu>
Re: Looking to work with Perl for Master's Thesis (Tad McClellan)
LWP for Windows <aslan@dbis.eecs.uic.edu>
Re: NEED: Fast, Fast string trim() <rjk@coos.dartmouth.edu>
Re: newbie file input question <rjk@coos.dartmouth.edu>
Re: Perl Implementation of Checksum? (Stephen P. Clouse)
Re: Please advise. Fastest way to line-count files <rjk@coos.dartmouth.edu>
Re: Problem running perl from cron... <rootbeer@teleport.com>
Re: recursive regex? <rootbeer@teleport.com>
Re: Reset of the 'each' iterator with the assignment op <rootbeer@teleport.com>
Re: Script calls embedded in web pages <socheer.kwek@ac.com>
Re: Teaching programing <rhodri@wildebst.demon.co.uk>
Web Based Auction Script? <ghost@Zssn.net.au>
Re: What's your favorite UNIX pl-db? twod@not.valid
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 16 Dec 1997 20:33:26 -0800
From: "Diran A." <entrpneur@earthlink.net>
Subject: Beginner with a ?
Message-Id: <34975616.34F2@earthlink.net>
Hi all,
I've searched FAQ's and newsgroup search engines for a post with some
information that might help me, but no luck. You're my last hope. :)
I'm writing perl scripts on my NT server. They seem to run fine with
all the web browsers that I use, except Microsoft Internet Explorer
4.0. When IE4 encounters a page with a .pl extension of mine, it loads
the page properly, but seems to keep searching... and finally times out
with an error message saying it was unable to locate the page,
connection reset by server.
I'm running a Netscape Enterprise server.
If this sounds familiar to anyone, I'd be grateful for any help you may
be able to provide.
Diran A.
------------------------------
Date: Wed, 17 Dec 1997 01:09:45 +0000 (GMT)
From: Rhodri James <rhodri@wildebst.demon.co.uk>
Subject: Re: compacting array (Figured it out)
Message-Id: <47f9a464f4rhodri@wildebst.demon.co.uk>
In article <3496AEBC.6682@nospam.com>,
NerveGas <NerveGas@nospam.com> wrote:
> I know it's not elegant, I know you'd probably all do it differently.
> And you can tell I'm used to C. : ) Here it is:
> $last_good=0;
> for ($loop=0;$loop<@array;$loop++){
> if ($array[$loop]){
> $array[$last_good]=$array[$loop];
> undef($array[$loop]) if ($loop!=$last_good);
> $last_good++;
> }
> }
[Pause for contemplation]
Truly, there is more than one way to do it. Sadly, this isn't one of
them. Undefining $array[$loop] (I presume this works as you'd expect)
will cause the original $array[$loop+1] item to be skipped.
> That will only use a temporary storage space as large as the largest
> single element in your array, which will usually be much, much smaller
> than the array itself. It will also undef() the "extra" entries after
> compacting.
For an array of 50-odd 256-byte strings, for example, this ain't
necessarily so. If you are really paranoid about temporary storage, use
splice() or don't bother copying things around.
--
Rhodri James *-* Wildebeeste herder to the masses
If you don't know who I work for, you can't misattribute my words to them
... Worse things happen in C
------------------------------
Date: Tue, 16 Dec 1997 13:26:36 -0600
From: Ken Holm <rets@meta3.com>
To: Justin Banks <justinb@cray.com>
Subject: Re: foreach && references
Message-Id: <3496D5EC.237C@meta3.com>
Justin Banks wrote:
>
> Hello -
> I can't see why the following two snippets execute differently.
> I'm sure that it's something simple, but I can't see it.
>
> $a = "one: two:three:four:five";
> ($junk, @b) = (split ':', $a);
> $c{test} = \@b;
> foreach $d (@$c{test}) {
> print "$d\n";
> }
>
> Prints nothing.
>
> $a = "one: two:three:four:five";
> ($junk, @b) = (split ':', $a);
> $b = \@b;
> $c{test} = $b;
> foreach $d (@$b) {
> print "$d\n";
> }
>
> Prints :
>
> two
> three
> four
> five
>
Ok... I don't know why but...
#!/usr/bin/perl5 -w
# -w for clues
my $junk;
my $d;
my @b;
my %c;
my $a = "one: two:three:four:five"; # load $a
($junk, @b) = (split ':', $a); # split
print "[@b]\n\n"; # ensure we're getting @b right
$c{test} = \@b; # load hash c with ref to @b
print "[$c{test}]\n\n"; # ensure we're getting hash c ok
print "[@{$c{test}}]\n\n"; # help
foreach $d (@{$c{test}}) { # help
print "$d - [$c{test}]\n"; # $d and hash c
}
I am still going through the Panther (Advanced Perl Programming). It
explains complex data structures, which the above appears to be.
Perhaps you get something out of this.
-K
--
Kennneth A Holm | META 3 - Webmaster |webmaster@meta3.com
PO Box 1508 |----------------------------------|(601)948.3399 x 227
Jackson, MS 39215|PGP Key finger webmaster@meta3.com|(601)948.5999 (fax)
This article was posted from <A HREF="http://www.slurp.net/">Slurp Net</A>.
------------------------------
Date: Wed, 17 Dec 1997 00:45:48 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Larry Daffner <ldaffner@rsn.hp.com>
Subject: Re: help decode a pattern
Message-Id: <3497670B.8080F076@coos.dartmouth.edu>
Larry Daffner wrote:
>
> >>>>> "t" == terminator <milab@nortel.ca> writes:
>
> t> could someone interpret the expression below for me.
> t> $alines=~ /^\[([^\]]*)\]/
>
> The [^\]]* construct simply keeps the inside expression from matching
> a ], in case there's another one on the line (Literally, match 0 or
> more non-] characters). Thus, if you have something like [foo][bar],
> it would match [foo], and not [foo][bar]. This could also be written
> (and probably more correctly) as /^\[(.*?)\]/ (since the non-greedy
> operator would stop at the first ]).
Actually, I'd say it is less correct. Although it does the same thing,
it could be much slower. The non-greedy quantifier forces the
regexp engine to try matching the rest of the regexp after every
character it matches. Even worse, every time the regexp engine does
that, it is moving into and out of capturing parentheses.
Chipmunk
------------------------------
Date: Tue, 16 Dec 1997 22:10:00 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Larry Daffner <ldaffner@rsn.hp.com>
Subject: Re: help decode a pattern
Message-Id: <Pine.GSO.3.96.971216220602.19797F-100000@user2.teleport.com>
On 16 Dec 1997, Larry Daffner wrote:
> >>>>> "t" == terminator <milab@nortel.ca> writes:
>
> t> could someone interpret the expression below for me.
> t> $alines=~ /^\[([^\]]*)\]/
[ most of explanation snipped ]
> This could also be written (and probably more correctly) as /^\[(.*?)\]/
> (since the non-greedy operator would stop at the first ]).
Those aren't quite the same. For one thing, that dot won't match a
newline, while [^\]] will match a newline. Also, there's an efficiency
issue: The original will, by default, try to match another character
within the parens; yours will, by default, try not to. I suspect that the
first one will be more efficient as the average length of text within the
brackets increases, while yours might be better if the brackets are
expected to be empty or to have only short strings.
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 17 Dec 1997 11:30:02 +0800
From: "Greg Roberts" <gregr@ee.uwa.edu.au>
Subject: HELP! How to use records in Perl?
Message-Id: <677h06$o1d$1@enyo.uwa.edu.au>
Hi. I'm having some trouble at the moment trying to emulate a Pascal record
structure in Perl. What I want is something like this:
machine_record {
hostname,
IP,
group,
traffic,
cost
}
So for machine X, I want to be able to go:
machine_record(X).hostname = "wahey";
So if anyone can tell me how to do this in Perl, I would be very
appreciative. I'm using Perl 5.003 on a Solaris 2.4 machine.
Thanks,
Greg
------------------------------
Date: Tue, 16 Dec 1997 20:27:26 -0800
From: "Aaron Harsh" <ajh@rtk.com>
Subject: Re: HELP! How to use records in Perl?
Message-Id: <677kaf$vg5$1@brokaw.wa.com>
Greg Roberts wrote in message <677h06$o1d$1@enyo.uwa.edu.au>...
>Hi. I'm having some trouble at the moment trying to emulate a Pascal record
>structure in Perl...
The perlref manpage should give you an idea of how to do this.
Aaron Harsh
ajh@rtk.com
------------------------------
Date: Tue, 16 Dec 1997 14:32:55 +0000
From: Glenn West <westxga@ptsc.slg.eds.com>
Subject: Re: localtime() _is_ year-2000 compliant, right?
Message-Id: <34969117.FC8@ptsc.slg.eds.com>
Michael Budash wrote:
>
> Hello all -
>
> The camel book says the $year portion of the list returned by localtime()
> "has had 1900 subtracted from it". Do i dare make the assumption that in
> the year 2000, that value will be 100 and not 0? I guess the more direct
> question is: is $year limited to some set number of decimal places? I
> think not, but a fellow programmer disagrees.
>
> Anybody feel like trying it on their local development machine (by
> falsifying their system date)? Or does anyone know for sure?
The year returned by localtime is based on 1900. So in the year 2000
the value will be 100. Your fellow programmer loses.
>
> TIA,
> Michael
>
> --
> _____________________________
>
> Michael Budash, Owner
> Michael Budash Consulting
> 707-255-5371
> 707-258-7800 x7736
> http://www.sonic.net/~mbudash
> mbudash@sonic.net
> _____________________________
------------------------------
Date: Tue, 16 Dec 1997 22:03:28 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Michael Budash <mbudash@sonic.net>
Subject: Re: localtime() _is_ year-2000 compliant, right?
Message-Id: <Pine.GSO.3.96.971216215725.19797E-100000@user2.teleport.com>
On Tue, 16 Dec 1997, Michael Budash wrote:
> As you probably know, the camel book mentions that localtime can take an
> argument, but it only mentions what happens if you _don't_ pass it!
The camel book is, to an extent, derived from the manpages. If you'd like
to submit a patch to the manpages, that would be welcome! (Use the perlbug
program, supplied with Perl, to submit it.)
> Could you please tell me where the FAQ is?
(Doesn't everybody get that information in response to their first posting
to c.l.p.misc anymore?) Well, the FAQ comes along free with any recent
Perl. Or you can find it directly on CPAN.
http://www.perl.com/CPAN/doc/manual/html/pod/perlfaq.html
Enjoy!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 17 Dec 1997 01:00:06 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: localtime() _is_ year-2000 compliant, right?
Message-Id: <34976A65.DC5FA9EE@coos.dartmouth.edu>
Michael Budash wrote:
>
> The camel book says the $year portion of the list returned by localtime()
> "has had 1900 subtracted from it". Do i dare make the assumption that in
> the year 2000, that value will be 100 and not 0?
I don't know, what is 2000 - 1900?
Chipmunk
------------------------------
Date: Tue, 16 Dec 1997 22:26:59 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Looking to work with Perl for Master's Thesis
Message-Id: <jak776.s74.ln@localhost>
Bradley M. Kuhn (bmk@agnostic.ebb.org) wrote:
: I am currently looking for Master's Thesis topic in a computer science
: graduate program. I have a strong dedication to free (and in particular,
: GPL'ed) software, and I also like to find ways to "bridge the gap" between
: computer science theory and implementation. Plus, I love Perl.
: Consequently, I hope to find a Master's Thesis topic that will result in the
: implementation of something useful for the free software community. I enjoy
: Perl, so I was thinking I might be able to do something with Perl.
: However, I don't know what to do. I need to find something that is
: theoretical and research-y enough to pass off on my advisor
Therein lies the rub, I fear, given my experience with professor types.
Perl is just not formal enough for them to like it much.
It sure does _get stuff done_ though ;-)
It may well be a hard sell...
Maybe some theme like "bringing programming to the masses" would work?
There are many people today who now program, but do not do so for
a living. Average everyday type people who would never have been
exposed to programming if they didn't want to spiff up their web
page with a CGI script.
They will very likely not spend the time to methodically learn how to use
proven effective programming practices (ie. typing, scope, recursion,
data structures, algorithms, etc...)
They don't have years to learn how to do it effectively. They want
to learn it in a few weeks.
And many do!
They just want to _get stuff done_ . It is
not going to bankrupt anybody if it fails. (Then these folks either
give up, or learn how to do debugging without any formal training
(ouch!)).
I'm quite sure that this is a pretty large number of people.
This large number of people very likely do their self-taught
programming with Perl. Because they want to _get stuff done_
with a minimum of fuss.
They have no exposure to Computer Science. They learned their
programming from a book with a "formula title".
Some may even be drawn into learning some CS after they get bitten
enough times by global variables or some such.
So a larger percentage of the population is now at least interested
in programming.
Evangelize these new converts ;-)
: (who loves Scheme
: and Java, BTW, which means Scheme-Java-Perl cross-over stuff might be good),
: but still make it implementable in my short 1.25 years of work on my thesis.
: Any suggestions would be greatly appreciated.
Finally.
I do actually have some suggestions.
----------------
1) I would kill to have some of Perl's text manipulation power
in Scheme (regex pattern matching).
I use Scheme a lot for manipulating tree structures (SGML parse
trees) but often find myself "punting" to Perl when I need to
look into the text that is carried around in the leaf nodes.
I use a compiled version of Scheme as these trees are somewhat
hefty and I am too Lazy and Impatient to wait for an interpreter.
But to _get stuff done_ I use Perl.
I end up with Scheme | Perl | Scheme | ... pipelines.
Would be nice to be able to compile it all into one binary.
----------------
2) XML
XML (eXtensible Markup Language) seems increasingly likely to supplant
HTML in the near future.
It became a W3C Proposed Recommendation last week.
Microsoft and Netscape support it.
It seems to have collected critical mass.
It allows you to *define your own tags*, and to also specify how
those tagged elements should be presented.
XML is a subset of full ISO SGML. The parts of SGML that made it
extremely hard to write conforming parsers are mostly eliminated
from XML. So parsers are easy to write for XML.
There are several written in Java already.
The language (XML) specification is complete.
There has been significant progress in the "linking" aspect (XLL).
The "style specification" (XSL) aspect is not firmed up much at all yet,
but may well end up being a dialect of Scheme (DSSSL like).
But there is also a large block of DPHs (Desperate Perl Hackers)
that we can fully expect to be doing stuff with XML using Perl
(as lots is now done with HTML using Perl).
Maybe you can find some Perl-Scheme crossover in the arena of XML.
The XML FAQ is at:
http://www.ucc.ie/xml/
Send me email if you'd like more information.
Good luck!
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 16 Dec 1997 23:41:31 -0600
From: Yuksel Aslandogan <aslan@dbis.eecs.uic.edu>
Subject: LWP for Windows
Message-Id: <3497660B.4C15@dbis.eecs.uic.edu>
Hi Everyone,
Is the LWP module available for Win95 or NT?
I checked CPAN win32 folder and ActiveState's site but was unable to
find it. I would appreciate any pointers.
Thanks
Y. Alp Aslandogan
DBIS Lab, UIC.
------------------------------
Date: Wed, 17 Dec 1997 00:07:55 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: NEED: Fast, Fast string trim()
Message-Id: <34975E2B.B2A7846B@coos.dartmouth.edu>
Aaron Harsh wrote:
>
> Aaron Harsh wrote in message <676mfm$hl3$1@brokaw.wa.com>...
> >Is it cheating to do some of it outside a regex? Here's my entry, which is
> >about four times faster than Andrew's (to run, not to type :-):
> >
> >$_ = join(" ", /\S+/g);
>
> Hmm.. This can be optimized for the likely case of lots of words with
> single-spaces between them, which doubles the speed on the original test:
>
> $_ = join(" ", /\S+(?: \S+)*/g);
>
> and has the side effect of making the line a little less legible
This appears to be at least as fast as either of your solutions:
$_ = join(" ", split);
Chipmunk
------------------------------
Date: Wed, 17 Dec 1997 00:24:32 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: newbie file input question
Message-Id: <34976210.B6F7A69C@coos.dartmouth.edu>
brian d foy wrote:
>
> In article <3495AE44.7B82866A@teleport.com>, Pete Hurd <phurd@teleport.com> wrote:
>
> >I cannot seem to read in a file, composed of lines (records) of
> >space-separated words (fields),
> >I want to access these words as items in a list, one list per line,
> >something like awk's
> >$1 through $NF.
>
> @words = split /\s+/, $line;
Since he wants it to be something like awk's behaviour, I'd think
@words = split " ", $line;
would be better.
Chipmunk
------------------------------
Date: Wed, 17 Dec 1997 04:58:09 GMT
From: stephenc@granddesign.com (Stephen P. Clouse)
Subject: Re: Perl Implementation of Checksum?
Message-Id: <34995ae9.19705780@news.kc.net>
Hash: SHA1
On Tue, 16 Dec 1997 18:33:12 -0500 in message
<<comdog-ya02408000R1612971833120001@news.panix.com> comp.lang.perl.misc>,
comdog@computerdog.com (brian d foy) wrote:
>In article <6771c4$squ$1@shell3.ba.best.com>, rsr@best.com (Roy S. Rapoport)
wrote:
>
>>I'm looking for an implementation of checksum in perl, or possibly an
>>idea on how I could implement it myself. A search on 'sum' on both
>>the FAQ and the CPAN module listing has come up with no relevant
>>matches ...
>
>you might want to look into the MD5 module, which would call this sort
>of thing a "digest". using the module makes this task very simple.
I personally wouldn't recommend MD5 if this is part of a security thing, as MD5
has already been partially broken and further hacking may compromise it
entirely. You may want to look at some implementation of SHA (Secure Hash
Algorithm), which has proven to be substantially more secure. I believe there
is a SHA module for Perl on CPAN. Of course, if security is not an issue then
don't worry about it.
- --
Stephen P. Clouse
stephenc@granddesign.com -- steve@warpcore.org -- UIN 135012
Grand Design, Inc. (http://www.granddesign.com) -- Quality Business Web Design
The Warp Core (http://www.warpcore.org) -- The Web's Premier Descent Site
PGP-Encrypted E-Mail Preferred (Key available at www.granddesign.com/~stephenc)
Fight Spam/UCE -- http://www.cauce.org
Version: PGP for Business Security 5.5
iQA/AwUBNJdb2WOLD55Fj/ZkEQKJewCgmF/6MrTuoIUt3X2L+V3CrGidWd4An2/0
lxUxC2X+7CvbAgrRpJi08MXD
=ESmv
-----END PGP SIGNATURE-----
This article was posted from <A HREF="http://www.slurp.net/">Slurp Net</A>.
------------------------------
Date: Tue, 16 Dec 1997 23:39:45 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: Please advise. Fastest way to line-count files
Message-Id: <34975791.22C54BF4@coos.dartmouth.edu>
NerveGas wrote:
>
> Here is a not-so-elegant approach, but probably one of the fastest
> you'll find:
>
> #!/usr/local/bin/perl
> $result=`wc -l qq.pl`;
> $result =~ s/ //g;
> $result =~ s/qq\.pl//g;
> print($result);
>
> This will use the unix "wc" command, which is optimized for counting the
> lines, and can do so much more quickly than Perl can.
If you're going to do it this way, at least skip the regexps.
#!/usr/local/bin/perl
$result = int(`wc -l qq.pl`);
print "$result\n";
Chipmunk
------------------------------
Date: Tue, 16 Dec 1997 22:31:17 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Tom Carey <tcarey@ngdc.noaa.gov>
Subject: Re: Problem running perl from cron...
Message-Id: <Pine.GSO.3.96.971216222458.19797H-100000@user2.teleport.com>
On Tue, 16 Dec 1997, Tom Carey wrote:
> I have a problem where perl behaves diferently when run by cron than
> when run on the command line. The basic problem is that $? is not set
> correctly when run under cron.
Sometimes a program which is starting Perl has installed its own signal
handler for SIGCHLD. Complain: They shouldn't do that! Try something like
this just before you start your sub-process and see whether it fixes
things.
$SIG{CHLD} = 'DEFAULT';
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Tue, 16 Dec 1997 22:55:23 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Ken Holm <rets@meta3.com>
Subject: Re: recursive regex?
Message-Id: <Pine.GSO.3.96.971216224300.19797I-100000@user2.teleport.com>
On Tue, 16 Dec 1997, Ken Holm wrote:
> Following is a sub that goes starts at a directory and grabs everything
> and returns it in a hash:
>
> get_files($dir, \%Flag);
> @List = keys %Flag;
> ###############
> sub get_files {
> my ($dir, $Flag) = @_;
To avoid confusion, I'd call that second one $flag_ref, or something like
that.
> chdir $dir || die "[Z][$!][$dir]\n";
That's a pretty cryptic error message. But, hey, if that's what you like!
:-) I'd prefer this:
chdir $dir
or die "Can't chdir to '$dir': $!";
Since that omits the trailing newline, Perl will finish the message
automitically, adding something like "at myscript line 7". Handy, huh?
> my $pwd = $dir;
> my @ls = `ls -1`;
It would be faster and otherwise better to use readdir, especially if your
system allows newlines within filenames. This method ignores files whose
names begin with a dot, of course.
> chomp @ls;
> foreach $file (@ls) {
> if (-d $file) {
You should also check for symbolic links, to avoid infinite loops.
> $dir .= "/$file";
> $$Flag{$dir} = 1;
> get_files($dir, $Flag);
> chdir $pwd || die "[A][$!][$pwd]\n";
All of those chdir operations are time consuming. It would be faster to
save a list of directories yet-to-be-visited. (You also could allow for
unreadable directories.)
> $dir = $pwd;
> } else {
> $file = $dir . "/$file";
> $$Flag{$file} = 1;
> }
> }
> }
Another approach might be to make a multi-level structure which mirrors
the directory structure. That could potentially take much less memory.
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Tue, 16 Dec 1997 22:23:00 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: kboutin@magi.com
Subject: Re: Reset of the 'each' iterator with the assignment operator '=' ?
Message-Id: <Pine.GSO.3.96.971216221210.19797G-100000@user2.teleport.com>
On Tue, 16 Dec 1997 kboutin@magi.com wrote:
> I am getting confused about the behaviour of the 'each' function
> combined with the assignment '=' operator. The "each iterator" of a
> hash seem to get reset if this hash is assigned subsequently to
> something in a list context (e.g.: to an @array or to a %hash).
If I understand what you're saying correctly, that's not supposed to
happen.
> EXAMPLE 2
>
> DOES NOT WORK! Loops infinitely in the first while loop
Doesn't loop on my machine. Maybe there's a bug in your copy of Perl?
Which version is it?
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 17 Dec 1997 13:31:22 +0800
From: "SoCheer" <socheer.kwek@ac.com>
Subject: Re: Script calls embedded in web pages
Message-Id: <34976d64.0@cwaix>
Hi there,
Instead of physically clicking on a link to execute the perl script, could
we call a perl script from a html tag ?
I know <IMG SRC="/cgi-bin/scriptname.pl"> does it, but a broken image is
shown. How could I get rid of it ?
Thanks !
So Cheer
socheer.kwek@ac.com
><a href="/cgi-bin/scriptname.pl"> goforit link</a>
>
>hope this helps
------------------------------
Date: Wed, 17 Dec 1997 01:40:01 +0000 (GMT)
From: Rhodri James <rhodri@wildebst.demon.co.uk>
Subject: Re: Teaching programing
Message-Id: <47f9a72a44rhodri@wildebst.demon.co.uk>
In article <882261631.337683@cabal>,
? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au> wrote:
> > Or should I take BASIC (oh horror!)?
> No No No, the learning of Basic taints the mind and deseases the
> interlect. Teaching somebody basic is a step backwards on the path
> of good programing practice.
This does depend rather on the BASIC being taught. BBC BASIC, for
instance, is a proper procedure-based language with moderate typing but a
rather loose attitude to pointers (makes a damn good macro assembler,
actually, by no accident whatsoever).
I'd still recommend starting with something like Pascal, however. The
rigid typing makes sure that when you are free and easy with another
language, you at least know that you are breaking rules.
--
Rhodri James *-* Wildebeeste herder to the masses
If you don't know who I work for, you can't misattribute my words to them
... but that's a herring of a different colour
------------------------------
Date: Wed, 17 Dec 1997 16:22:07 +1100
From: Paul Radford <ghost@Zssn.net.au>
Subject: Web Based Auction Script?
Message-Id: <3497617F.EF7CB7CD@Zssn.net.au>
Does anybody know where I can get a good quality auction script. or am I
going to have to get it custom made, I been to cgi-resources.com and
found three but alas, 2 ain't what I am looking for and the 3rd I got no
response from the owner of the script.
Can some one please help.
------------------------------
Date: 17 Dec 1997 06:21:24 GMT
From: twod@not.valid
Subject: Re: What's your favorite UNIX pl-db?
Message-Id: <677r14$eo4$2@vnetnews.value.net>
Brad Johnson (bgjohnso@unix.amherst.edu) wrote:
: The shql module seems to be nice, but how do I implement that
: in Perl? How do I construct an equivalent to the DB->SQL command
: in ODBC? Can the ODBC.pm module be used in Unix on text files?
I'm not an ODBC fan, so ..
Are you aware of the DBI and DBD-<insert several unix dbs here> modules ?
Have a peek at www.hermetica.com for moredetails.
IAP
--
I am using anti-spam measures, please replace 'not.valid' with 'value.net'
------------------------------
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 1488
**************************************