[7292] in Perl-Users-Digest
Perl-Users Digest, Issue: 917 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 25 07:07:15 1997
Date: Mon, 25 Aug 97 04:00:25 -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 Mon, 25 Aug 1997 Volume: 8 Number: 917
Today's topics:
&& and associativity denis@mathi.uni-heidelberg.de
Can *anyone* explain details of socket autoflush??? (Anonymous)
Re: Can *anyone* explain details of socket autoflush??? <tom@mitra.phys.uit.no>
Re: cardinality of an array given a reference <tom@mitra.phys.uit.no>
Re: conjugating Portuguese verbs <rovf@earthling.net>
Re: Easy Question: Dont Care. (Michael W Peterson)
Re: help displaying a large number with commas <mbosley@shore.net>
Re: help displaying a large number with commas <mbosley@shore.net>
Re: help displaying a large number with commas <mbosley@shore.net>
Re: help displaying a large number with commas <mbosley@shore.net>
Re: How do I drop trailing spaces? (robert)
How to implement a settings file? (Michael Schuerig)
Re: HTML-TEXT <tom@mitra.phys.uit.no>
Re: OraPerl Field Names (Christian Mondrup)
Re: OS2 Perl socket.pm problem (Ilya Zakharevich)
Perl on NT udefined subroutine call <vmartin@be.oracle.com>
Re: POP3 Mail (Danny Aldham)
Re: rand() does not work, HELP <mbosley@games-online.com>
Re: Removing duplicates from an array (robert)
Re: Removing duplicates from an array <tom@mitra.phys.uit.no>
Replace-Problem <hd@elfie.rhein-neckar.de>
Re: Replace-Problem <tom@mitra.phys.uit.no>
Re: Setting subject in emails <mbosley@shore.net>
Re: Trivial(?) readdir question <qdtcall@esb.ericsson.se>
Re: Trivial(?) readdir question <tom@mitra.phys.uit.no>
Re: Why warning of uninitialized value even if it is in <qdtcall@esb.ericsson.se>
Re: Win95 from a very definite newbie... help please (Terry Carroll)
Re: Win95 from a very definite newbie... help please <youngej@magpage.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 25 Aug 1997 10:31:41 +0200
From: denis@mathi.uni-heidelberg.de
Subject: && and associativity
Message-Id: <340142ED.41C6@mathi.uni-heidelberg.de>
hi,
i read in a perlbook (camel or lama) that the expression:
next && ($abc eq "")
should work... but i think because of the left associativity of
&& it will ignore ($abc eq "") (perl executes next first, and than
there isnot anythink to compare)
am i right or not?
bye
denis
------------------------------
Date: 25 Aug 1997 09:38:29 +0200
From: nobody@REPLAY.COM (Anonymous)
Subject: Can *anyone* explain details of socket autoflush???
Message-Id: <5trcpl$7r7@basement.replay.com>
If there is anyone who really understands how perl
handles sockets, I'd greatly appreciate some help here.
I have found 200 copies of the perlipc man page and
chapter 6 of the camel book on the web, but no in-depth
explanations of the $| autoflush thingy. I am having
a devil of a time getting client-server handshaking to
work, and I think it is because of I/O buffering.
The camel book says that setting $| to non-zero will
force an fflush(3) after every write or print on
_the_currently_selected_output_channel_.
What the heck does that mean, the last stream I wrote
to? Is there some other way to select an output
channel? What if I want all my open streams to
autoflush? For example, please see the attached
client/server, basically right out of the camel book.
All I want is for the client to receive one line
every five seconds. What happens is that 10 seconds
after I start the client, I get all three output lines
at once. This happens no matter where or how many times
I insert the magic $|=1. I am running 5.003 under
Solaris 2.5 if that matters.
Eventually I would like my client and server to
converse, but so far I have not been able to and
I think it's because of this problem. If anyone can
clue me in or point me to a more advanced reference
on the web or a book I can buy I would really
appreciate it. This is dead easy in C. What the
heck am I doing wrong?!?!?
Thanks in advance for any help you can offer!
-Amber
#client**************************************
#!/usr/local/bin/perl
require 5.003;
use strict;
use Socket;
my ($remote, $port, $iaddr, $paddr, $proto, $line);
$| = 1;
$remote = 'localhost';
$port = 2346; # random port
if ($port =~ /\D/) { $port = getservbyname($port, 'tcp')}
die "No port" unless $port;
$iaddr = inet_aton($remote) or die "no host: $remote";
$paddr = sockaddr_in($port, $iaddr);
$proto = getprotobyname('tcp');
socket(SOCK, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
connect(SOCK, $paddr) or die "connect: $!";
while ($line = <SOCK>) {
print "$line\n";
}
close(SOCK) or die "close: $!";
exit 0;
#server***************************************
#!/usr/local/bin/perl5
require 5.003;
use strict;
BEGIN { $ENV{PATH} = 'usr/ucb:/bin'}
use Socket;
use Carp;
my $waitedpid = 0;
sub spawn;
sub logmsg { print "[$$]: @_ at ", scalar localtime, "\n" }
sub REAPER
{
# $SIG{CHLD} = \&REAPER;
$waitedpid = wait;
# logmsg "reaped $waitedpid" . ($? ? " with exit $?" : "");
}
my ($iaddr, $paddr, $inline, $name);
my $port = 2346; # random port
my $proto = getprotobyname('tcp');
$| = 1;
socket(Server, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, pack("l",1)) or die "setsockopt: $!";
bind(Server, sockaddr_in($port, INADDR_ANY)) or die "bind: $!";
listen(Server,SOMAXCONN) or die "listen: $!";
logmsg "server started on port $port";
$SIG{CHLD} = \&REAPER;
for ( ; $paddr = accept(Client,Server); close Client) {
my($port,$iaddr) = sockaddr_in($paddr);
my $name = gethostbyaddr($iaddr,AF_INET);
logmsg "connection from $name [", inet_ntoa($iaddr), "]\n\tOn port $port";
spawn sub {
print CLOUT "Take this\n";
sleep 5;
print CLOUT "and this...\n";
sleep 5;
print CLOUT "and this too!\n";
};
}
sub spawn
{
my $coderef = shift;
unless (@_ == 0 && $coderef && ref($coderef) eq 'CODE')
{ confess "usage: spawn CODEREF";}
my $pid;
if (!defined($pid = fork))
{
logmsg "cannot fork: $!";
return;
}
elsif ($pid)
{
# logmsg "begat $pid";
return; # i'm the parent!
}
#else i'm the child -- go spawn
open(STDIN, "<&Client") or die "can't dup client to stdin";
open(CLOUT, ">&Client") or die "can't dup client to stdout";
# open(STDERR, ">&STDOUT") or die "can't dup stdout to stderr";
exit &$coderef();
}
------------------------------
Date: 25 Aug 1997 11:55:20 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: Can *anyone* explain details of socket autoflush???
Message-Id: <nqooh6my4c7.fsf@mitra.phys.uit.no>
nobody@REPLAY.COM (Anonymous) writes:
> explanations of the $| autoflush thingy.
man IO::Handle
> #!/usr/local/bin/perl
[...]
> $| = 1;
This will autoflush STDOUT, not your socket.
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 25 Aug 1997 11:43:20 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: cardinality of an array given a reference
Message-Id: <nqorabiy4w7.fsf@mitra.phys.uit.no>
Aaron Newman <newman@ttd.teradyne.com> writes:
> print "cardinality is ",$#ar,"\n";
Any of these:
print "cardinality is ",$#$ar,"\n"; # only for plain references
print "cardinality is ",$#{$ar},"\n"; # safer
print "cardinality is ",$#{@$ar},"\n"; # Huh? Why does this work?
> | newman@ttd.teradyne.com | "A forest is a finite |
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 25 Aug 1997 09:31:20 +0200
From: Ronald Fischer <rovf@earthling.net>
To: etienne@isr.isr.ist.utl.pt (Etienne Grossmann)
Subject: Re: conjugating Portuguese verbs
Message-Id: <xz2zpq6n2gn.fsf@uebemc.siemens.de>
>>>>> On 20 Aug 1997 19:03:36 GMT
>>>>> "EG" == Etienne Grossmann <etienne@isr.isr.ist.utl.pt> wrote:
EG> my name is Etienne Grossmann, I study in Lisbon (Portugal), an since
EG> I am not Portuguese, I wanted to learn the language. With that in
EG> mind, I wrote a perl script that drills me on conjugation, and a perl
EG> module with a verb-conjugating function.
[snip]
EG> Is anyone interested?
EG>
EG> If so, I can try to document the code properly, and make it
EG> available as a module.
Hey, THAT would be great. Yes, please, go ahead (and if I could
already have a copy just to try it it???? :-)
--
Ronald Fischer (rovf@Earthling.net) (PGP public key available)
http://ourworld.compuserve.com/homepages/ronald_fischer/
[When posting a followup, mailing a courtesy copy is fine, provided it is
clearly marked as such.]
------------------------------
Date: 25 Aug 1997 07:25:00 GMT
From: michael@flash.net (Michael W Peterson)
Subject: Re: Easy Question: Dont Care.
Message-Id: <5trc0c$3q$1@excalibur.flash.net>
On 25 Aug 1997 03:23:45 GMT,
the Thief of Always <omard@blue.seas.upenn.edu> wrote:
>
>whats the dont care variable as in.
>
>($wanted, ______I DONT GIVE A SHIT ___) = split (/&/,$_);
($wanted, undef) = split (/&/,$_);
and since you're splitting $_ you could even:
($wanted, undef) = split /&/;
>
> ^^^^^^ This is what I'm looking for.
>
> yeah I know I can do it with just a /(/d*)#/;
> but I wanna do it the hard way. Obviously I cant
> look it up in a reference 'cause I dont know the name.
>
>So, I'ld appreciate it if you just took a second, winged some email
>my way and let me know what precisely is the name of the I-Dont-Care
>variable.
>
--
Michael W Peterson <http://www.flash.net/~michael/>
Senior System Administrator
FlashNet Communications <http://www.flash.net/>
"Unix: more than enough rope..."
------------------------------
Date: Sun, 24 Aug 1997 00:44:44 +0100
From: random <mbosley@shore.net>
To: randy.paries@avex.com
Subject: Re: help displaying a large number with commas
Message-Id: <33FF75EC.610BF393@shore.net>
Hi,
An alternative to the ones provided:
sub commify {
local($_) = shift;
1 while s/^(-?\d+)(\d{3})/$1,$2/;
return $_;
}
btw, this was pulled straight from the faq. Just call like
$varString = &commify($var);
thx
random
randy.paries@avex.com wrote:
>
> Hello,
>
> I need help...
> I have a number 12300000.00
> I would like to display it like 12,300,000.00
> I am looking for a clean way instead of a for loop counting char positions
> Any suggestions
>
> thanks
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Sun, 24 Aug 1997 00:45:39 +0100
From: random <mbosley@shore.net>
To: randy.paries@avex.com
Subject: Re: help displaying a large number with commas
Message-Id: <33FF7623.CFCAB80E@shore.net>
Hi,
An alternative to the ones provided:
sub commify {
local($_) = shift;
1 while s/^(-?\d+)(\d{3})/$1,$2/;
return $_;
}
btw, this was pulled straight from the faq. Just call like
$varString = &commify($var);
thx
random
randy.paries@avex.com wrote:
>
> Hello,
>
> I need help...
> I have a number 12300000.00
> I would like to display it like 12,300,000.00
> I am looking for a clean way instead of a for loop counting char positions
> Any suggestions
>
> thanks
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Sun, 24 Aug 1997 00:46:51 +0100
From: random <mbosley@shore.net>
To: randy.paries@avex.com
Subject: Re: help displaying a large number with commas
Message-Id: <33FF766B.C7A1A301@shore.net>
Hi,
An alternative to the ones provided:
sub commify {
local($_) = shift;
1 while s/^(-?\d+)(\d{3})/$1,$2/;
return $_;
}
btw, this was pulled straight from the faq. Just call like
$varString = &commify($var);
thx
random
randy.paries@avex.com wrote:
>
> Hello,
>
> I need help...
> I have a number 12300000.00
> I would like to display it like 12,300,000.00
> I am looking for a clean way instead of a for loop counting char positions
> Any suggestions
>
> thanks
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Sun, 24 Aug 1997 00:48:39 +0100
From: random <mbosley@shore.net>
Subject: Re: help displaying a large number with commas
Message-Id: <33FF76D7.3E791DFF@shore.net>
Hi,
An alternative to the ones provided:
sub commify {
local($_) = shift;
1 while s/^(-?\d+)(\d{3})/$1,$2/;
return $_;
}
btw, this was pulled straight from the faq. Just call like
$varString = &commify($var);
thx
random
randy.paries@avex.com wrote:
>
> Hello,
>
> I need help...
> I have a number 12300000.00
> I would like to display it like 12,300,000.00
> I am looking for a clean way instead of a for loop counting char positions
> Any suggestions
>
> thanks
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 25 Aug 1997 11:37:57 +0200
From: robert@ICK.il.fontys.nl (robert)
Subject: Re: How do I drop trailing spaces?
Message-Id: <5trjpl$ap@bsd1.hqehv-internal.ilse.net>
bernard510@hotmail.com:
>How can I replace the contents of $name with the text string without the
>trailing spaces?
How about:
$name =~ s/\s*$//;
robert
------------------------------
Date: Mon, 25 Aug 1997 12:35:40 +0200
From: uzs90z@uni-bonn.de (Michael Schuerig)
Subject: How to implement a settings file?
Message-Id: <19970825123540825377@rhrz-isdn3-p2.rhrz.uni-bonn.de>
I want to move the configurable settings of a script to a separate file,
but can't sort out how to do it. I played around with require and
Exporter, without success, though.
Michael
--
Michael Schuerig Consistency is the last refuge
mailto:uzs90z@uni-bonn.de of the unimaginative.
http://www.uni-bonn.de/~uzs90z/ -Oscar Wilde
------------------------------
Date: 25 Aug 1997 11:52:44 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: HTML-TEXT
Message-Id: <nqopvr2y4gj.fsf@mitra.phys.uit.no>
sandler@ren.eecis.udel.edu (<b>Michael (Sandman) Sandler</b>) writes:
> Does anyone have a utility to strip the HTML stuff out of
> text
You probably want to look at the HTML::Parser and HTML::TreeBuilder
manpages.
> Michael Sandler <sandler@eecis.udel.edu>
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 25 Aug 1997 07:31:29 GMT
From: scancm@biobase.dk (Christian Mondrup)
Subject: Re: OraPerl Field Names
Message-Id: <5trcch$36k@bioalp.biobase.dk>
Stephan D. Cote (sdcote@lci.net) wrote:
: Does anyone know how to retrieve field names with the data with OraPerl?
: All I get with ora_fetch is the data. I need to know what the
: field(column) name is.
>From the oraperl documentation:
@titles = &ora_titles($csr [, $truncate])
A program may determine the field titles of an executed query by calling
&ora_titles(). This function takes one mandatory parameter, a statement
identifier (obtained from &ora_open()) indicating the query for which
the titles are required. The titles are returned as an array of
strings, one for each column.
: If this is mis-posted, please direct me to the appropriate newsgroup.
: --
: ---[Stephan D. Cote, CCP]------[ Sr. Network Engineer ]---
: Data Engineering, LCI International Inc.
: 4650 Lakehurst Court, Dublin, OH 43016
: ---[ (614) 798-6000 ]-------------------------------------
--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Christian Mondrup +
+ Computer Programmer +
+ Scandiatransplant, Skejby Hospital, University Hospital of Aarhus +
+ Brendstrupgaardsvej +
+ DK 8200 Aarhus N +
+ Denmark +
+ +
+ Phone: +45 89 49 53 01 +
+ Telefax: +45 89 49 60 07 +
+ E-Mail: scancm@biobase.dk +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------
Date: 25 Aug 1997 07:17:54 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: OS2 Perl socket.pm problem
Message-Id: <5trbj2$f1s@agate.berkeley.edu>
In article <slrn5vuumf.9r.bsa@rushlight.kf8nh.apk.net>,
Brandon S. Allbery KF8NH <bsa@void.apk.net> wrote:
> You have to run perl_.exe instead of perl.exe. If your installation doesn't
> have that exe or the socket extension isn't preloaded in yours, you will have
> to get one that does. The manual says this is an EMX wart. (See perlos2.pod.
> I'm not quite crazy enough to attempt a VAC++ port to see if it helps....)
VAC++ is not used not because it is better, but because it is
*infinitely* worse. To get a problem when fork()ing you need to be
able to fork() first, and VAC++ will (never?) be able to do this.
Ilya
------------------------------
Date: 25 Aug 1997 09:50:12 GMT
From: "Vincent Martin" <vmartin@be.oracle.com>
Subject: Perl on NT udefined subroutine call
Message-Id: <01bcb13b$f2cc8dd0$5fae8f8d@gran_s>
Hi All,
I am just experiencing Perl on Windows NT and it seems that The Registry
settings are strange.
I installed the distribution coming with the NT resource Kit and when I try
one of the Win32 library, I get the undefined subroutine call.
Does it mean anything to you
Rgards.
Vincent.
--
Vincent MARTIN
tel.: +32 2 719 5994
EMEA Internal Training
Bruxelles Global Education Center
Excelsiorlaan 36, Keiberg
B-1930 Zaventem
Belgium
------------------------------
Date: 24 Aug 1997 19:25:16 -0700
From: danny@lennon.postino.com (Danny Aldham)
Subject: Re: POP3 Mail
Message-Id: <5tqqec$idu$1@lennon.postino.com>
Marty D. Cudmore (cudmores@gte.net) wrote:
: I know (little||nothing) about Perl for Win32, but I would like to use pull
: down mail messages
: from a POP3 server. I've already began some code to do this, but instead
: of, "Reinventing the
: Wheel", I'm wondering if it's possible to use the Net::POP3 module on my
: Win32 system.
I have a script that uses the Mail::POP3Client module, and I had a bit
of trouble with the module on NT. The module wants to be able to resolve
the name, and then does a reverse lookup. Our reverse lookups were failing,
and so was the script. I found it worked fine if I edited out the reverse
lookup in the sub Host function, the two lines with gethostbyaddr in them.
--
Danny Aldham SCO Ace , MCSE , JAPH , DAD
I don't need to hide my e-mail address, I broke my sendmail.
------------------------------
Date: Sun, 24 Aug 1997 00:41:15 +0100
From: random <mbosley@games-online.com>
To: remove NO-SPAM and this phrase <hm@NO-SPAMroyal.net>
Subject: Re: rand() does not work, HELP
Message-Id: <33FF751B.67407FA4@games-online.com>
This might be a stupid question, but did you "srand();" before calling
rand()?
thx
random
Hedin Meitil wrote:
>
> I can't get the rand() function to return values higher than 1. Or in
> fact when I set the upper limit to 100, the highest returned value is
> 0.0013.... Of course if I set the limit to 100000, I get values higher
> than 1, but...
>
> MY CODE IS OK!: I've tried to run a script from the book "Teach
> yourself perl in 21 days", directly from the accompanying CD-rom. Same
> result.
>
> Is there a solution to my problem? I run perl 4.
>
> - Hedin
------------------------------
Date: 25 Aug 1997 11:52:53 +0200
From: robert@ICK.il.fontys.nl (robert)
Subject: Re: Removing duplicates from an array
Message-Id: <5trkll$d1@bsd1.hqehv-internal.ilse.net>
randall@grcmc.net (Patrick Randall):
>Can anyone show me an easy way to remove duplicate elements from an
>array?
my %hash = map { $_ => 1 } @originalarray;
@originalarray = keys %hash;
What this does is build a hash-array using the values stored in
@originalarray, and fill @originalarray with the keys of that hash-
array. Since the keys in a hash-array are unique, duplicates are
removed.
Note that the original order of elements in @originalarray WILL be lost
(if you want the array to be sorted, try '@originalarray = sort keys
%hash' instead).
robert
PS: If you're not using perl5, try something like this:
%hash = ();
foreach $_ (@originalarray)
{
$hash{$_} = 1;
};
@originalarray = keys %hash;
------------------------------
Date: 25 Aug 1997 12:37:01 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: Removing duplicates from an array
Message-Id: <nqolo1qy2eq.fsf@mitra.phys.uit.no>
randall@grcmc.net (Patrick Randall) writes:
> Can anyone show me an easy way to remove duplicate elements from an
> array?
It's in the FAQ.
@a = grep {!$seen{$_}++} @orig_a;
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 23 Aug 1997 00:24:15 +0200
From: Heinz Diehl <hd@elfie.rhein-neckar.de>
Subject: Replace-Problem
Message-Id: <5tl3if$2qf$1@elfie.rhein-neckar.de>
Hi !
I have a big number of strings, and I want to replace all
"x" characters with an "_" , but if the first character of a
string is an "x", then that "x" at the beginning should not be
converted:
"hxaxlxlxo" should be converted to "h_a_l_l_o"
"fxxxooxbxxar" should be "f___oo_b__ar"
"xblaxbxxla" should be "xbla_b__la"
Is it possible to do this with a single "search and replace" ?
Regards, Heinz.
--
# Heinz Diehl, 68259 Mannheim, Germany
# PGP-encrypted mails welcome, key on request [subj: get pgpkey]
------------------------------
Date: 25 Aug 1997 12:33:18 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: Replace-Problem
Message-Id: <nqon2m6y2kx.fsf@mitra.phys.uit.no>
Heinz Diehl <hd@elfie.rhein-neckar.de> writes:
> I have a big number of strings, and I want to replace all
> "x" characters with an "_" , but if the first character of a
> string is an "x", then that "x" at the beginning should not be
> converted:
> Is it possible to do this with a single "search and replace" ?
Does it *have* to be "search and replace"?
substr($string,1) =~ tr/x/_/;
(tested and works as requested)
> # Heinz Diehl, 68259 Mannheim, Germany
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Sun, 24 Aug 1997 00:57:29 +0100
From: random <mbosley@shore.net>
To: Dan_Margalit@brown.edu
Subject: Re: Setting subject in emails
Message-Id: <33FF78E9.185CDA86@shore.net>
Or if you like, you can also just do this in html
<a href="mailto:me@home.com?Subject='From the web'">Mail Me</a>
(Courtesy copy for those using browsers that interpret html)
<a href="mailto:me@home.com?Subject='From the web'">Mail
Me</a>
(hmm... I can't remember if the whitespace has to be changed to +
signs...)
thx
random
Dan_Margalit wrote:
>
> Dear Perl group,
> Can anyone tell me how to send an email with a specific subject from
> perl? For example, when I receive an automatically sent email from one of my
> web sites, I want to know whether it is a tutor application, a student
> questionnaire, etc... so it would be nice if I could just put this in the
> subject of the automatic email and then have it filtered by my email program.
> Please email me (juggler@brown.edu) if you can help, as I do not
> frequent this newsgroup. Thank you very much.
> Sincerely,
> Dan Margalit.
------------------------------
Date: 25 Aug 1997 10:25:14 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Trivial(?) readdir question
Message-Id: <isoh6mzn2t.fsf@godzilla.kiere.ericsson.se>
kisrael@allegro.cs.tufts.edu (Kirk L. Israel) writes:
> How likely is readdir to NOT return '.' and '..' as the first two
> directory entries when reading in a directory?
At a guess, highly so if you're runing at something that isn't Unix.
> It's just for a demo on Solaris and seems to work.
These "just for a demo" things have a way of living *lots* longer than
first intended. Do yourself a favour and do it the right way from the
beginning. At worst you waste three minutes now, at best you save two
days of debugging and your sanity next year.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esb.ericsson.se http://www.lysator.liu.se/~calle/
------------------------------
Date: 25 Aug 1997 11:39:10 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: Trivial(?) readdir question
Message-Id: <nqosovyy535.fsf@mitra.phys.uit.no>
kisrael@allegro.cs.tufts.edu (Kirk L. Israel) writes:
> @entries = readdir DIR;
@entries = grep !/^\.\.?$/ readdir DIR;
> Kirk Is |
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 25 Aug 1997 09:50:34 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Why warning of uninitialized value even if it is initialized?
Message-Id: <issovyzool.fsf@godzilla.kiere.ericsson.se>
Ronald Fischer <rovf@earthling.net> writes:
> The command
> perl -w -e 'local($a)="abc"; open($a)'
> produces the warning
> Use of uninitialized value at -e line 1.
> In Perl 5.002.
> Could someone please confirm if this still appears in 5.004, or if the
> warning is correct in this case?
It still appears, and it is correct. The uninitialised value it's
complaining about is $abc. See the documentation for open() in
perlfunc for the reason why.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esb.ericsson.se http://www.lysator.liu.se/~calle/
------------------------------
Date: Mon, 25 Aug 1997 08:00:15 GMT
From: carroll@tjc.com (Terry Carroll)
Subject: Re: Win95 from a very definite newbie... help please
Message-Id: <34053ac2.134080786@news.aimnet.com>
On Mon, 25 Aug 1997 00:58:30 GMT, jzawodn@wcnet.org (Jeremy D. Zawodny)
wrote:
>Perl for Win32 and the docs, FAQ, etc. are all available from
>http://www.activesite.com/
That should be http://www.activeware.com .
--
Terry Carroll | "Mars ain't the kind of place to raise your kids.
Santa Clara, CA | In fact, it's cold as hell." - Bernie Taupin, 1972
carroll@tjc.com | "Air temperatures ... show an afternoon high near +9
Modell delenda est | degrees Fahrenheit." - Mars Pathfinder Mission, 1997
------------------------------
Date: 25 Aug 1997 08:25:06 GMT
From: Ed Young <youngej@magpage.com>
To: Martin Smallridge <catflap@geocities.com>
Subject: Re: Win95 from a very definite newbie... help please
Message-Id: <5trfh2$eho$0@204.179.92.204>
Martin Smallridge wrote:
>
> Ok.. simple question really.. I'm running win95 on a pentium 120 and for
> the life of me can't work out what the heck an intelx86 build or alpha
> build is.. so for starters I'm buggered.
>
> So: could you help by telling me
> 1. which perl build / type do I need to get
> 2. how do I install it successfully?
> 3. are there any plans for a win95 faq which idiots like me who only know
> how to program basic (so far) can read and understand without getting the
> screaming heebie jeebies..
>
Don't mess with builds, use binaries:
ftp://ftp.sedl.org/pub/mirrors/CPAN/ports/win95/Gurusamy_Sarathy/
perl5.00402-bindist04-bc.readme 10 Kb Sun Aug 10 20:12:00
1997
perl5.00402-bindist04-bc.tar.gz 5014 Kb Mon Aug 11 05:01:00
1997
You will require gzip.exe and tar.exe to install the distribution.
This is an excellent rendition of perl. Well worth the trouble.
gzip -d perl5.00402-bindist04-bc.tar.gz
tar -xf perl5.00402-bindist04-bc.tar
cd perl5.00402-bindist04-bc
install
(answer the questions...)
------------------------------
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 917
*************************************