[10634] in Perl-Users-Digest
Perl-Users Digest, Issue: 4226 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 15 22:08:03 1998
Date: Sun, 15 Nov 98 19:00:18 -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, 15 Nov 1998 Volume: 8 Number: 4226
Today's topics:
Re: A Newbie That Needs Some Quick Help <uri@sysarch.com>
Re: A Newbie That Needs Some Quick Help (Ronald J Kimball)
Re: A Newbie That Needs Some Quick Help <just_the_man@hotmail.com>
A really novice question? dean_at_home@my-dejanews.com
Re: A really novice question? (Matthew Bafford)
Re: A really novice question? <pamaku@americasm01.nt.com>
another pod Q (was Re: Q: pod inside data structures) <uri@sysarch.com>
Easy question? <ben@smartservers.com>
Re: Easy question? (Martien Verbruggen)
Re: Easy question? (Tad McClellan)
Freeware: SmartRanker digger_chen@my-dejanews.com
Getting fd from tie(%hash,MLDBM,$file,O_RDWR,0666) <walshg@indigo.ie.indigo.ie>
Help reading binary file <pamaku@americasm01.nt.com>
Re: Just a quick debugging problem..... <J.D.Gilbey@qmw.ac.uk>
Re: magic increment problem (Sam Holden)
Not deleteing correctly <anthony@nova-creations.com>
NT Close a FORMAT statement (Smellymama)
Re: NT Close a FORMAT statement (Ronald J Kimball)
Re: Perl for web programming (Tad McClellan)
Perl on 64 bits bus? <aufempen@dyson.brisnet.org.au>
Perl vs C <cobalt@dircon.co.uk>
Re: Perl vs C (Alan Barclay)
Re: testing problems <damonbrent@earthlink.net>
web-based e-mail client - desperately looking for <jtjohnston@courrier.usherb.ca>
Re: Where can I get a Perl mode that indents properly (Ilya Zakharevich)
Why does this give a warning! <spamsucks@unicomp.net>
Re: Why does this give a warning! (Tad McClellan)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 15 Nov 1998 17:59:45 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: A Newbie That Needs Some Quick Help
Message-Id: <x7n25s5zq6.fsf@sysarch.com>
he asked for a SMALL sample. who needs 60k of example data?!!
you should post it again with only a few (few being < 5) records so we
can actually look at it. i am lucky to have a high speed connection but
i don't want 60 posts either.
and please don't use mime. it is all just text. cut and paste your post
next time.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 15 Nov 1998 20:04:49 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: A Newbie That Needs Some Quick Help
Message-Id: <1dijvcb.x7pt453h90aqN@bay1-361.quincy.ziplink.net>
> This is a multi-part message in MIME format.
Please don't post multi-part messages in MIME format.
You haven't provided enough information on valid values for these
fields. Your main examples had:
ACT N 0 1000 0
and
ABQ DHN 0 1000 0
but I found a mobile in the included file that had:
AH 0 0 500 0
(all zeros)
Is the value of the second field significant to whether the substitution
is done?
The following code assumes that all long descriptions are terminated by
a newline, that all the # lines are present as in the example, that the
value of the first field begins with an A and contains only uppercase
letters, and that the value of the second field is unimportant.
$/ = ''; # paragraph mode
while (<>) {
next unless /^#MOBILES/mi;
@mobiles = split /(?=^#\d+$)/m, $_; # split before each mobile
foreach (@mobiles) {
s/
( # begin capture
\n~\n # end of long description
[a-zA-Z]+~\n # race
A[A-Z]+\s+\S+\s+\S+\s+ # bit-vectors affects align
)
/${1}0 /x; # add affects2 after align
}
$_ = join '', @mobiles;
} continue {
print;
}
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 15 Nov 1998 18:39:24 -0800
From: Lee <just_the_man@hotmail.com>
Subject: Re: A Newbie That Needs Some Quick Help
Message-Id: <364F905C.2815@hotmail.com>
Yes, that is very helpful. Thank you. I think that would work.
I apologize to everyone for my foolishness in posting the 60K
file. My bad. I wasn't sure if you needed a complete reference.
Sorry about that. The script that was provided will hopefully
work, and i think it will. Thanks again.
------------------------------
Date: Sun, 15 Nov 1998 22:17:23 GMT
From: dean_at_home@my-dejanews.com
Subject: A really novice question?
Message-Id: <72njti$qu$1@nnrp1.dejanews.com>
I am totally new to this so I apologise for the dumb question.
I have a file which is made up of several lines of text. Each line of text is
made up of a series of fileds separated by commas, like so:
45654,some text,7900
87988,more text,0978
How do I extract each item (not including the ',') into say the following
variables:
($item1, $item2, $item3) = ($_ =~ / WHATS IN HERE? /);
The bit I am having the most trouble with is the bit that says 'WHATS IN
HERE?', that would be sufficient to spilt the three items on the line into the
three separate variables.
Is this really beginner stuff?
If anybody can help then please email me at the address below after removing
the obvious:
deanNO@SPAMtrinity-house.demon.co.uk
Thanks in advance.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 15 Nov 1998 17:56:56 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: A really novice question?
Message-Id: <MPG.10b92644c38e2dd8989712@news.scescape.net>
In article <72njti$qu$1@nnrp1.dejanews.com>, dean_at_home@my-dejanews.com
<dean_at_home@my-dejanews.com> pounded in the following:
[snip]
=> I have a file which is made up of several lines of text. Each line of text is
=> made up of a series of fileds separated by commas, like so:
=>
=> 45654,some text,7900
=> 87988,more text,0978
=>
=> How do I extract each item (not including the ',') into say the following
=> variables:
=>
=> ($item1, $item2, $item3) = ($_ =~ / WHATS IN HERE? /);
[snip]
Using your example (and assuming that some text can not contain a ,):
#!/usr/bin/perl -w
while ( <DATA> ) {
my ( $item1, $item2, $item3 ) = split /,/, $_, 3;
print "$item1|$item2|$item3\n";
}
__DATA__
45654,some text,7900
87988,more text,0978
Or, if some text _can_ contain a comma, but it will be escaped (using \),
then:
#!/usr/bin/perl -w
use strict;
while ( <DATA> ) {
chomp;
my ( $item1, $item2, $item3 ) =
map { s/\\,/,/g; $_ } split(/(?<!\\),/, $_, 3);
print "$item1|$item2|$item3\n";
}
__DATA__
45654,some\, text,7900
87988,more\, text,0978
=> If anybody can help then please email me at the address below after removing
=> the obvious:
=>
=> deanNO@SPAMtrinity-house.demon.co.uk
If anybody can help you they will email at the address above you after
you remove the obvious.
=> Thanks in advance.
Hope This Help(s|ed)!
--Matthew
------------------------------
Date: Sun, 15 Nov 1998 19:59:40 -0600
From: Patrick Amaku <pamaku@americasm01.nt.com>
Subject: Re: A really novice question?
Message-Id: <364F870C.3A02A7F9@americasm01.nt.com>
dean_at_home@my-dejanews.com wrote:
> I am totally new to this so I apologise for the dumb question.
>
> I have a file which is made up of several lines of text. Each line of text is
> made up of a series of fileds separated by commas, like so:
>
> 45654,some text,7900
> 87988,more text,0978
>
> How do I extract each item (not including the ',') into say the following
> variables:
>
> ($item1, $item2, $item3) = ($_ =~ / WHATS IN HERE? /);
($item1, $item2, $item3) = ($_ =~ /(\d+),(.+),(\d+)/);
Check regular expressions section of documentation
>
>
> The bit I am having the most trouble with is the bit that says 'WHATS IN
> HERE?', that would be sufficient to spilt the three items on the line into the
> three separate variables.
>
> Is this really beginner stuff?
>
> If anybody can help then please email me at the address below after removing
> the obvious:
>
> deanNO@SPAMtrinity-house.demon.co.uk
>
> Thanks in advance.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 15 Nov 1998 01:27:23 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: another pod Q (was Re: Q: pod inside data structures)
Message-Id: <x7vhkh5v3o.fsf_-_@sysarch.com>
>>>>> "Z" == Zenin <zenin@bawdycaste.org> writes:
Z> Uri Guttman <uri@sysarch.com> wrote:
Z> >snip<
Z> : a decent workaround and i will probably use it unless something better
Z> : comes along. but it is not a proper answer to why it fails. i was
Z> : drinking with randal tonight and he says it has to do with the parser
Z> : expecting an expression token next.
Z> Yep. Personally, I think throwing the pod away in a preprocessing
Z> operation would be better then trying to have the parser deal with
Z> it inline, although that might make line number debug statements
Z> harder...
i have another pod and data question. i think this is impossible but an
interesting idea. i want to have a single usage text be in both a perl
string AND pod text in the same file. you can see the advantage here of
maintaining only one usage text and having it print from perl and in the
pod2xxx output.
any possibilities? i doubt it since perl and pod parsing are mutually
exclusive from what i gather.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 15 Nov 1998 20:09:25 -0400
From: Ben Duncan <ben@smartservers.com>
Subject: Easy question?
Message-Id: <364F6D35.ED09170@smartservers.com>
Hi!
I have written a small Perl script which grabs data
from an mySQL server - I have 5 rows, the last row
contains the product name. I only want to store
unique product-names in @productname, no duplicates
of the same record.
How can I do this?
while (my @row = $sth->fetchrow) {
($user,$email,$title,$os,$product) = @row;
push(@usermail,$email);
push(@productname,$product) if($product ???????? @productname);
}
Any help would be great!
------------------------------
Date: Mon, 16 Nov 1998 01:16:54 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Easy question?
Message-Id: <a2L32.54$cl1.270@nsw.nnrp.telstra.net>
In article <364F6D35.ED09170@smartservers.com>,
Ben Duncan <ben@smartservers.com> writes:
> I have written a small Perl script which grabs data
> from an mySQL server - I have 5 rows, the last row
> contains the product name. I only want to store
I suppose you mean 'the last column contains..' ?
> unique product-names in @productname, no duplicates
> of the same record.
Use a hash to store the product names. Whenever you ask yourself the
question: "How do I store things uniquely?" think hash.
> How can I do this?
>
my %products;
> while (my @row = $sth->fetchrow) {
> ($user,$email,$title,$os,$product) = @row;
> push(@usermail,$email);
> push(@productname,$product) if($product ???????? @productname);
$products{$product}++; # or something else.
Martien
--
Martien Verbruggen | My friend has a baby. I'm writing down
Webmaster www.tradingpost.com.au | all the noises the baby makes so later
Commercial Dynamics Pty. Ltd. | I can ask him what he meant - Steven
NSW, Australia | Wright
------------------------------
Date: Sun, 15 Nov 1998 19:28:43 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Easy question?
Message-Id: <b4vn27.gkb.ln@flash.net>
Ben Duncan (ben@smartservers.com) wrote:
: Subject: Re: Easy question?
^^^^^^^^^^^^^
No.
Frequently Asked Question.
: I have written a small Perl script which grabs data
: from an mySQL server - I have 5 rows, the last row
: contains the product name. I only want to store
: unique product-names in @productname, no duplicates
: of the same record.
: How can I do this?
The way described in the Perl FAQ, part 4:
"How can I extract just the unique elements of an array?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 15 Nov 1998 23:51:42 GMT
From: digger_chen@my-dejanews.com
Subject: Freeware: SmartRanker
Message-Id: <72npef$555$1@nnrp1.dejanews.com>
http://www.tooto.com
Tooto Internet Technologies is proud to introduce our newest breakthrough
product for information research, SmartRanker -- An Ultra Precision Ranking
Engine, giving you strikingly accurate and highly relevant results when you
search on the World Wide Web. And It is FREE.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 15 Nov 1998 23:58:01 +0000
From: Gerry <walshg@indigo.ie.indigo.ie>
Subject: Getting fd from tie(%hash,MLDBM,$file,O_RDWR,0666)
Message-Id: <364F6A89.41C67EA6@indigo.ie.indigo.ie>
After trying a data file to a hash, I want to flock the appropriate
file descriptor (or vice versa if that makes more sense).
I'm sure that $obj will gove me what I need, but I don't
know how to coax it ($obj->fd does not exist, unlike a direct
tie to DB_File).
The idea is to open & lock the file without having to keep track
of a separate variable/lock file.
use MLDBM qw(DB_File); # To store structures in hash file.
use Fcntl qw(:DEFAULT :flock); # For file permissions. etc
:
:
$obj = tie(%table, 'MLDBM', "$filename", O_CREAT|O_RDWR, 0666);
# hmm, how to set a shared/excl lock: need a fd!
Any help, redirects to appropriate resources or good reasons
to try a different approach much appreciated.
(I may have posted something similar a few hours ago: my browser
crashed.
Apologies if that's the case)
------------------------------
Date: Sun, 15 Nov 1998 19:50:18 -0600
From: Patrick Amaku <pamaku@americasm01.nt.com>
Subject: Help reading binary file
Message-Id: <364F84DA.51E8260C@americasm01.nt.com>
Hi,
How do i get a substring from a buffer containing binary data?
When a execute the lines below i get 55 rather than 78. What am i
doing wrong? Any idea where i can find sample scripts that process
binary data
$SIZE_WORD=4;
read(FH,$buffer,2048)
$buffer=0x004e; # just initialize buffer to a
know value (78 decimal)
$word1 = unpack("C*",substr($buffer,0,$SIZE_WORD));
print $word1, "\n";
Thanks
Patrick
------------------------------
Date: Sun, 15 Nov 1998 23:26:32 +0000
From: Julian Gilbey <J.D.Gilbey@qmw.ac.uk>
Subject: Re: Just a quick debugging problem.....
Message-Id: <364F6328.7317DB1B@qmw.ac.uk>
Tyler Hutcheon wrote:
>
> Hi.
>
> I'm no beginner to programming perl, but I've found one problem that I can't
> find the answer to.
> Here is what perl is reporting the problem to be.
>
> Use of uninitialized value at index.cgi line 52.
> Use of uninitialized value at index.cgi line 70.
Your code would help....
This message means that you are writing some code like:
$b = $a + 1;
without having ever given $a a value. That's OK in Perl, it'll
be assumed to be zero (or empty string, etc), but it may not be
what you intended -- you may have made a typo and intended to say
$b = $aa + 1;
instead. So it's Perl trying to be helpful to you. If you intend
to use the standard uninitialised value and you don't like the
warning, just add in an appropriate initialisation.
Julian
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey Email: J.D.Gilbey@qmw.ac.uk
Dept of Mathematical Sciences, Queen Mary & Westfield College,
Mile End Road, London E1 4NS, ENGLAND
-*- Finger jdg@goedel.maths.qmw.ac.uk for my PGP public key. -*-
------------------------------
Date: 15 Nov 1998 22:39:46 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: magic increment problem
Message-Id: <slrn74um1i.bsl.sholden@pgrad.cs.usyd.edu.au>
On 13 Nov 1998 12:36:02 -0500, Ala Qumsieh <aqumsieh@matrox.com> wrote:
>
>Stephen Riehm <sr@pc-plus.de> writes:
>
>> $a = "123";
>> $b = "file1";
>> $c = "1file";
>> $d = "my1stfile";
>> $a++; $b++; $c++; $d++;
>> $a: "124"
>> $b: "file2"
>> $c: "2" <--- whoa there >:-|
>> $d: "1" <--- whoa there >:-|
>>
<snip>
>Actually, this behaviour is vaguely documented in perlop:
<snip>
>
>
>Obviously "1file" and "my1stfile" do NOT match the pattern
>
>/^[a-zA-Z]*[0-9]*$/
>
>So, the autoincrement will NOT work as expected. I am curious to know
>though what ++ exactly does in the above cases and WHY?
>
>Any insight from someone else?
Converts the strings to numbers and then increments those...
Equivalent to :
$c = "1file" + 1; #except this will give a waring under -w.
can someone explain the seeming inconsistancy with the warnings...
# This is perl, version 5.005_02 built for i686-linux-thread
$c = "1file";
$c = $c + 1; #this will warn under -w
$c = "1file";
$c++; #this will not warn under -w
$c = "1file";
$c+=1; #this will warn under -w
$c = "1file";
$c-=1; #this will warn under -w
$c = "1file";
$c--; #this will not warn under -w
I thought it might be magic increments getting in the way of warning, but the
$c-- result indicates this isn't the case (since it is not magic).
So does anyone want to explain why this is so? And is it a bug or feature?
--
Sam
Basically, avoid comments. If your code needs a comment to be
understood, it would be better to rewrite it so it's easier to
understand. --Rob Pike
------------------------------
Date: Mon, 16 Nov 1998 00:54:10 GMT
From: "Anthony F. Sanchez" <anthony@nova-creations.com>
Subject: Not deleteing correctly
Message-Id: <364F76BB.863BE98A@nova-creations.com>
Dear David Black, Julian Guilbey, Tom Christiansen and Ronald Kimball,
I sincerely apologize for sending that email in HTML format. It truly
was a mistake.
I have posted to this group several times before and have never sent my
post as HTML.
It won't happen again, sorry to have inconvenienced you.
But for those of you who did not complain and just (HELPED) me, thank
you very much.
You put me back on the right track.
Anthony@nova-creations.com
------------------------------
Date: 15 Nov 1998 23:37:31 GMT
From: smellymama@aol.com (Smellymama)
Subject: NT Close a FORMAT statement
Message-Id: <19981115183731.18266.00002656@ng92.aol.com>
I receive
"Format not terminated at m.pl line 84, at end of line"
with this code
format OUTFILE2_TOP =
==========================================================================
=====================
Log Summary
==========================================================================
=====================
User Site Time Date
--------------------------------------------------------------------------
---------------------
.
format OUTFILE2 =
@<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<< @<<<<<< @<<<<<<<<<
$user[$i],$site[$i],$time[$i],$date[$i]
.
Any Ideas??
TIA
Thanks and Have A Pleasant Tomorrow
smellymama@aol.com or
tcasulli@microsNYC.com
------------------------------
Date: Sun, 15 Nov 1998 20:04:50 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: NT Close a FORMAT statement
Message-Id: <1dijwxu.1ljvw9h86igjkN@bay1-361.quincy.ziplink.net>
Smellymama <smellymama@aol.com> wrote:
> I receive
> "Format not terminated at m.pl line 84, at end of line"
If line 84 is the last line in your file, make sure it ends with a
newline. A format is terminated not by ".", but by ".\n".
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 15 Nov 1998 21:13:14 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Perl for web programming
Message-Id: <a85o27.4ub.ln@flash.net>
Alfredo LopezJr. (freddy@attrition.com) wrote:
: Is there some kind of comp.lang.perl.misc FAQ so we know what kind of perl
: questions can be asked
There is a FAQ for Perl itself.
It comes in nine parts.
All of the parts are included with the perl distribution.
If you have a properly installed perl, then the FAQs are
already on your hard disk somewhere.
Find out where ;-)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 16 Nov 1998 02:21:11 GMT
From: "G. North" <aufempen@dyson.brisnet.org.au>
Subject: Perl on 64 bits bus?
Message-Id: <72o26n$egl$1@bunyip.cc.uq.edu.au>
Perl on 64 bits bus?
In the next few months or next year Intel will release a 64 bits
bus called Merc.
Does Perl run on 64 bits bus?
Which bus are they and which operating system is that?
I have to do a project on this.
You may respond directly to
aufempen@dyson.brisnet.org.au
Thanks Cheers Guy North
------------------------------
Date: Mon, 16 Nov 1998 01:00:50 -0800
From: "Paul Davies" <cobalt@dircon.co.uk>
Subject: Perl vs C
Message-Id: <364f7733.0@newsread1.dircon.co.uk>
Hi There
Can anyone give me some information as to the relative speeds of perl and C
programs?
thanks
Paul
------------------------------
Date: 16 Nov 1998 02:09:10 GMT
From: gorilla@elaine.drink.com (Alan Barclay)
Subject: Re: Perl vs C
Message-Id: <911182145.674251@elaine.drink.com>
In article <364f7733.0@newsread1.dircon.co.uk>,
Paul Davies <cobalt@dircon.co.uk> wrote:
>Hi There
>
>Can anyone give me some information as to the relative speeds of perl and C
>programs?
Perl programs are faster than C programs in someways, and slower than C
programs in other ways. Without specific questions, it's impossible to
say any more than that.
------------------------------
Date: Sun, 15 Nov 1998 17:30:48 -0500
From: brent verner <damonbrent@earthlink.net>
Subject: Re: testing problems
Message-Id: <364F5618.E5BFCA9D@earthlink.net>
"John E. Garrott" wrote:
>
> Perl novice question:
>
> Has any one else successfully compiled perl under
> glibc2.06 and egcs1.03b (or egcs1.1)?
>
> Perl compiles ok, not even a warning. It complains
> "Note (probably harmless): No library found for"
> -lgdb, -lucb, and -lcposix, but my reading leads
> me to believe this is ok.
yeah, i just compiled 5.00502 today. if you by chance
are a user of one of the packaging systems .rpm .deb
etc, make sure you have the proper linux headers for
your kernel. my first linux was a redhat5.1 (shortlived)
and it had 2.0.32 headers with a 2.0.34 kernel. this
would be my best guess as to the cause of your problem.
btw, i used the ./configure.gnu script to genereate the
Makefile...
hth.
brent
------------------------------
Date: Sun, 15 Nov 1998 19:54:54 -0500
From: JTJ <jtjohnston@courrier.usherb.ca>
Subject: web-based e-mail client - desperately looking for
Message-Id: <364F77DE.469C@courrier.usherb.ca>
I'm looking for an easy to install web-based e-mail client. Something
like:
http://hermes.usherb.ca/webmail/index.cgi
For educational purposes. This one above led nowhere. The author's site
no longer exists.
Please erase the erase in my address.
------------------------------
Date: 16 Nov 1998 01:36:30 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Where can I get a Perl mode that indents properly
Message-Id: <72nviu$srn$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Jeremy D. Zawodny
<jzawodn@wcnet.org>],
who wrote in article <m3iughx5fx.fsf@peach.z.org>:
> > Is there a perl mode out there that can sucessfully indent the "print"
> > line in the following Perl text:
>
> Yes, cperl-mode:
>
> ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl
I wonder why people repeat this... The new linear-time
indent-many-lines algorithm CPerl is using on newer emaxen was buggy
as hell at toplevel - until several minutes ago, when I released
v4.13.
Probably very few people batch-indent at toplevel, I *always*
batch-indent functions only, and do indentation at toplevel
line-by-line (both were OK, since I use them often ;-).
Ilya
------------------------------
Date: Sun, 15 Nov 1998 19:31:45 -0600
From: Eric Molitor <spamsucks@unicomp.net>
Subject: Why does this give a warning!
Message-Id: <364F8081.61B9BB4F@unicomp.net>
Why does the following give the uninitialed error listed in the code
below?
#!/usr/bin/perl -w
# Perl script to report number of POP Mail sessions
use strict;
my $count=0;
my $ignore=0;
open NETSTAT, "/bin/netstat -n --tcp|";
while (<NETSTAT>) {
if ($ignore eq 0) {
$ignore=1;
} else {
# Why does the following line give the error
# Use of uninitialized value at line ..., <NETSTAT> chunk2.
if ((split(/:/,(split(/ +/))[3]))[1] eq "110") {
$count+=1;
}
}
}
close NETSTAT;
print "$count\n";
------------------------------
Date: Sun, 15 Nov 1998 21:33:57 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Why does this give a warning!
Message-Id: <5f6o27.14c.ln@flash.net>
Eric Molitor (spamsucks@unicomp.net) wrote:
: Why does the following give the uninitialed error listed in the code
: below?
Maybe because there is no second colon separated value
in the fourth whitespace separated field?
: #!/usr/bin/perl -w
: # Perl script to report number of POP Mail sessions
: use strict;
: my $count=0;
: my $ignore=0;
: open NETSTAT, "/bin/netstat -n --tcp|";
On my system that command makes two lines of header stuff.
Your code skips one, and then tries to do its thing on
the second one. Skip the second one too :-)
<NETSTAT>; # discard first line
<NETSTAT>; # discard second line
: while (<NETSTAT>) {
or...
next unless /^tcp/; # skip uninteresting lines
: if ($ignore eq 0) {
: $ignore=1;
Don't need this flag now either.
: } else {
: # Why does the following line give the error
: # Use of uninitialized value at line ..., <NETSTAT> chunk2.
: if ((split(/:/,(split(/ +/))[3]))[1] eq "110") {
: $count+=1;
: }
: }
: }
: close NETSTAT;
: print "$count\n";
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4226
**************************************