[8643] in Perl-Users-Digest
Perl-Users Digest, Issue: 2260 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 6 17:07:51 1998
Date: Mon, 6 Apr 98 14:00:28 -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, 6 Apr 1998 Volume: 8 Number: 2260
Today's topics:
Re: -comparing the values of 2 arrays- <james@cydaps.co.uk.NOSPAM>
Re: -comparing the values of 2 arrays- <ajohnson@gpu.srv.ualberta.ca>
Re: bitbucket for (,$b,,,$e,,)=split(/\,/,$string) <Robert.Lopez@abq.sc.philips.com>
Re: bitbucket for (,$b,,,$e,,)=split(/\,/,$string) <lr@hpl.hp.com>
DBD::Pg <ben@nilenet.com>
easy way to enable perl script setuid? (KHongLiu)
Re: Help: on "format" (repost) (Jason Gloudon)
How can I read a randomly generated file cmeena@hotmail.com
Re: How can I read a randomly generated file <lr@hpl.hp.com>
I need latest perl for HPUX, AIX, Solaris gold_bag@yahoo.com
Re: Is there a "Newsgroup" for Newbies to Perl? (I R A Aggie)
Re: Is there a "Newsgroup" for Newbies to Perl? (Chris Vogel)
Re: Is there a "Newsgroup" for Newbies to Perl? (Chris Vogel)
New DB_File user <peredina@progress.com>
Re: perl linux database program? (sandra)
Perl5_on_Solaris_2.6 ()
Re: Post - is lwp the only answer? eugene@vertical.net
search for Perl/MS Access docs (sandra)
Seek and Read <sidney@acpub.duke.edu>
Re: Use of implicit split to @_ is deprecated (Peter Scott)
Re: Use of implicit split to @_ is deprecated (Jason Gloudon)
Re: Wanted: email address gleaner <jp@glpbooks.BADMAIL.com>
Re: Wanted: email address gleaner <jp@glpbooks.BADMAIL.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 6 Apr 1998 19:19:01 +0100
From: "James" <james@cydaps.co.uk.NOSPAM>
Subject: Re: -comparing the values of 2 arrays-
Message-Id: <891887074.6219.0.nnrp-08.c2de3f1b@news.demon.co.uk>
Quentin Fennessy wrote in message ...
>
> James> Hi I am trying to compare the values of two arrays, and
> James> combining them in another array, ensure that no duplicates
> James> are entered.
>
>James - check out perlfaq4, in the section entitled:
>
>How do I compute the difference of two arrays?
>How do I compute the intersection of two arrays?
>
This is useful, but they say to assume that the values in the two arrays are
unique. What would I need to do to ensure that they *are* unique, just a
simple:
unless ($value_from_array1 == $value_from_array2) {
push(etc.......);
}
or is there more to it? Sorry for being thick, but I just cannot get this to
work for some reason???
Many thanks
James
>--
>Quentin Fennessy AMD, Austin Texas
>Secret hacker rule #11 - hackers read manuals
------------------------------
Date: Mon, 06 Apr 1998 13:51:50 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: -comparing the values of 2 arrays-
Message-Id: <35292446.1FFE77E7@gpu.srv.ualberta.ca>
James wrote:
!
Quentin Fennessy wrote in message ...
! >
! > James> Hi I am trying to compare the values of two arrays, and
! > James> combining them in another array, ensure that no duplicates
! > James> are entered.
! >
! >James - check out perlfaq4, in the section entitled:
! >
! >How do I compute the difference of two arrays?
! >How do I compute the intersection of two arrays?
! >
!
! This is useful, but they say to assume that the values in the two
! arrays are unique. What would I need to do to ensure that they
! *are* unique, just a simple:
!
! unless ($value_from_array1 == $value_from_array2) {
! push(etc.......); }
!
!
! or is there more to it? Sorry for being thick, but I just cannot
! get this to work for some reason???
another faq might be more applicable to your situation:
perlfaq4: How can I extract just the unique elements of an array?
items b and d provide convenient solutions for your problem (they'll
work as well with two arrays as with one).
regards
andrew
--
"They're not soaking...they're rusting"
--my wife, on my dishwashing habits.
------------------------------
Date: 06 Apr 1998 13:02:13 -0600
From: Robert Lopez <Robert.Lopez@abq.sc.philips.com>
Subject: Re: bitbucket for (,$b,,,$e,,)=split(/\,/,$string)
Message-Id: <jc6vhsmg4ei.fsf@abqn07.ato.sca.philips.com>
Larry Rosler <lr@hpl.hp.com> writes:
> Abigail wrote:
> >
> > Robert Lopez (Robert.Lopez@abq.sc.philips.com) wrote on MDCLXXVI
> > September MCMXCIII in
> > <URL: news:jc6yaxmftwg.fsf@abqn07.ato.sca.philips.com>:
> > ++ Using perl 5.004_04
> > ++
> > ++ Every perl book I have shows some use of split such as
> > ++ ($login, $passwd, $uid, $gid, $gcos, $home, $shell)=split /:/;
> > ++ but I find none of them address when not all fields are needed.
> >
> > (undef, $passwd, undef, undef, undef, undef, $shell) = split /:/;
> >
> > Abigail
> > --
> > perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle 'print +(HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET", "http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content)) =~ /(.*\))[-\s]+Additional/s) [0]'
>
> Or use an array slice:
>
> ($passwd, $shell) = (split /:/)[1, 6];
>
> Larry Rosler
> Hewlett-Packard Laboratories
> lr@hpl.hp.com
Thanks to everyone who helped me out with good answers. I found the
camel book had the same trick Larry Rosler mentioned. It is shown in
two places in "Appendix A:Exercise Answers".
One is page 224, Ch.11, Ex#1 which shows
($user,$uid,$gcos) = (split /:/)[0,2,4];
I typed in that exercise answer and it worked. I went back
to my file and added a subscript and ran into the error
"Can't use subscript on split".
It took me some frustrating moments before I finally thought
"subscript of what? must be subscript of array." Then I saw the
critical difference between the syntax of the line I was trying
to use which was like
($user,$uid,$gcos) = split (/:/)[0,2,4];
and the syntax of the line as it needs to be, which is
($user,$uid,$gcos) = (split /:/)[0,2,4];
which has split return an array and pick out subscript-specified
elements of that array and then assign them.
Again, thanks for the help.
--
Robert Lopez <Robert.Lopez@abq.sc.philips.com>
Philips Semiconductors, 9201 Pan American Fwy. N.E., ms 20,
Albuquerque, New Mexico 87113 USA [P: (505)822-7112 F: x7237]
------------------------------
Date: Mon, 06 Apr 1998 12:47:40 -0700
From: Larry Rosler <lr@hpl.hp.com>
To: Robert Lopez <Robert.Lopez@abq.sc.philips.com>
Subject: Re: bitbucket for (,$b,,,$e,,)=split(/\,/,$string)
Message-Id: <3529315C.7DF3051@hpl.hp.com>
Robert Lopez wrote:
>
> Larry Rosler <lr@hpl.hp.com> writes:
>
...
>
> Thanks to everyone who helped me out with good answers. I found the
> camel book had the same trick Larry Rosler mentioned. It is shown in
> two places in "Appendix A:Exercise Answers".
You're welcome. But that should be the Llama book :-). No exercises in
the Camel.
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Mon, 06 Apr 1998 17:13:20 +0000
From: Ben Bergen <ben@nilenet.com>
Subject: DBD::Pg
Message-Id: <35290D30.5C441AD7@nilenet.com>
I keep getting an unresolved symbol error when I try to use the
postgreSQL driver with DBI. The error is:
perl: error in loading shared libraries
/usr/lib/perl5/site_perl/i386-linux/auto/DBD/Pg/Pg.so: undefined symbol:
PQconnectdb
any one have any ideas??? I am using version 0.69 of DBD-Pg.
--
Ben Bergen I/O Green Mountain, Inc.
ben@gmg.com Boulder, CO 80303
------------------------------
Date: Mon, 06 Apr 1998 19:06:34 GMT
From: khongliu@nease.net (KHongLiu)
Subject: easy way to enable perl script setuid?
Message-Id: <3529272d.99367508@news.sta.net.cn>
Hi, please tell me some easy way to enable setuid perl script work,
just as a setuid c program, thank you
Flae
------------------------------
Date: Mon, 06 Apr 1998 19:32:02 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: Help: on "format" (repost)
Message-Id: <slrn6iib8i.qlf.jgloudon@manitoba.bbn.com>
Tommy <tkho@technologist.com> wrote:
>I have a question on "format". I had try to have a format print out.
>However, lines are kept missing. Here is the script.
>
> #!/usr/local/bin/perl -w
> use strict;
> my $A="Test";
> my $B=" 12345678 \r 12345678 \r";
The documentation (man perlform) says :
If any value supplied for these fields contains a newline,
only the text up to the newline is printed. Finally, the
So if you have \r in your output, you won't see anything after it.
--
Jason Gloudon
------------------------------
Date: Mon, 06 Apr 1998 13:42:08 -0600
From: cmeena@hotmail.com
Subject: How can I read a randomly generated file
Message-Id: <6gb7m0$tsi$1@nnrp1.dejanews.com>
Hi all,
In my perl script, I create a random file name and write to it. I do that
using the following commands:
$link_up_file = "lup_";
$rand_name = int(rand(time())); # this will give me a random number
$name .= $rand_name # this will join lup_ and the random number to create a
# random file name. for example, lup_156694811 etc.
open(LDDOUT, ">>/tmp/$name") || die could not open $name for writing\n";
print LDDOUT ($device\n"); # write something to the file.
Later on, I like to open this file for reading. All I know is that the file
name is stored in $name.
So, when I do this,
$test2 = "/tmp/$name
open(LDD, $test2) || die "could not open $name : $!\n";
@input = <LDD>;
print (@input);
I do not get any error. But, I don't read any lines even though I verified
that the file is not empty and all the file permissions are set. I even
printed $test2 and it prints the correct file name. But I do not know whether
it contains any hidden characters. How do check for that? However, if I
hardcode the file name like
open(LDD, "/tmp/lup_156694811") || die "could not open $name : $!\n";
@input = <LDD>;
print (@input);
I have no problem reading that.
Any help would be appreciated.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Mon, 06 Apr 1998 12:26:51 -0700
From: Larry Rosler <lr@hpl.hp.com>
To: cmeena@hotmail.com
Subject: Re: How can I read a randomly generated file
Message-Id: <35292C7B.A8FC8358@hpl.hp.com>
cmeena@hotmail.com wrote:
>
> Hi all,
>
> In my perl script, I create a random file name and write to it. I do that
> using the following commands:
>
> $link_up_file = "lup_";
> $rand_name = int(rand(time())); # this will give me a random number
> $name .= $rand_name # this will join lup_ and the random number to create a
> # random file name. for example, lup_156694811 etc.
>
> open(LDDOUT, ">>/tmp/$name") || die could not open $name for writing\n";
...
Isn't the problem that you initialized $link_up_file to that prefix,
but didn't use it, and you didn't initialize $name?
#!/usr/local/bin/perl -w [or whatever your perl path is...]
would have warned you about this and other typos
($link_up_file used only once...; Use of uninitialized value at ...).
Also, "use strict;" forces you to declare variables before using them,
making this type of error even less likely.
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Mon, 06 Apr 1998 15:25:06 -0500
From: gold_bag@yahoo.com
Subject: I need latest perl for HPUX, AIX, Solaris
Message-Id: <35293A22.2EC@yahoo.com>
Where can i find compiled binaries of perl for HPUX, AIX, Solaris?
I found binaries of perl for win95/nt but not for hpux, aix, sol.
thanks
------------------------------
Date: Mon, 06 Apr 1998 14:11:38 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <fl_aggie-0604981411380001@aggie.coaps.fsu.edu>
In article <6gasj0$m8@co-op.newsguy.com>, snitty77@pacbell,net wrote:
+ In article <352868DC.A055D96C@coos.dartmouth.edu>, Ronald says...
+ >By the time I decide not to answer the question, it's already been
+ >a nuisance.
+ What a pile of crap.
No, it isn't.
+ You're reaching, Ronald.
No, he isn't.
+ This is a public forum.
And I can post spam here, too, right? Let me beat you to the punch:
you'll dismiss this as being "silly", right?
+ And
+ I'll repeat my question - I assume you're all for another newsgroup for these
+ nuisances to go to, right?
Nope. That's what we got clp.misc for.
James - thus why I'm just waiting on the clp.moderated group to come to
vote, so you and your precious FAQers can sit and wallow in the
in FAQdom, giving us all some peace...
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Mon, 06 Apr 1998 14:10:00 +0100
From: C.VOGEL@LINK-GOE.de (Chris Vogel)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6rKtDGhntSB@-sweet.link-goe.de>
Goettingen, Stardate 0962.80
Hi there,
jdf (Jonathan Feinberg) wrote in pvixn2l3.fsf@mailhost.panix.com on
06.04.98 following lines, starting with '*'
* 9 out of 10 people with what they perceive to be an
* *urgent* need to know how to do a web-counter in Perl will look at the
* two newsgroups available and choose the one that they think will have
* more experts in it.
Go ahead - handle this people as before. But the elevnth who really
wishes to learn about perl could be send to a place where this is
possible (without putting more traffic to this group).
As far as I read you would be one of the people answering questions on
which already a group of novices has discussed ;-).
Chris.
--
Paranoia ist das, was PGP sicher macht.
------------------------------
Date: Mon, 06 Apr 1998 14:07:00 +0100
From: C.VOGEL@LINK-GOE.de (Chris Vogel)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6rKtD0xntSB@-sweet.link-goe.de>
Goettingen, Stardate 0962.72
Hi there,
ljz (Lloyd Zusman) wrote in luwwd6ysiz.fsf@asfast.com on
06.04.98 following lines, starting with '*'
* First of all, a university has classes geared for various levels of
* expertise.
[...]
* If we were to create some sort of ".novices" newsgroup in addition
I think this will not work. The reason is that people have to decide
for themself how good they are and that there will be a constant flow
of novices becoming intermediate becoming professionals (I hope ;-).
It is hard to put this in a structure of newsgroups if you want to
have the people in groups where they can have some kind of social
connectivity like in a study group IRL.
I think that the 'social connectivity' is as important as the goal
of learning itself - at least for some people.
I talked to some students I know in the last days about the topic of
how they prefer to learn and as I already wrote: There are some people
who get the books and go as far as possible and some others who need
to talk and discuss with others to learn.
This is the reason why I think that mailinglists or some similar
communication structure might fit better the needs of such idea.
* Not true. Most education systems I'm familiar with consist of more
* than just universities. There are primary schools, secondary schools,
* specialized "trade" schools, etc.
Right. And there is one token they all have in common: People are
organized in groups. They know each other personally and can
communicate with eachother without a mentor.
* And finally, one aspect of the "university model" consists of
* classroom time where students can actually ask questions of the
* professor.
I would think that the classroom is comp.lang.perl.misc . The people
learning together should be invited to ask questions they can not
solve in their study groups or research from net ressources in the
newsgroup.
The problem with teachers is that teaching is a hard sometimes painful
job. Some people in cplm are already very, very helpful and spend a
lot of time (so it seems to me) in helping other people. I can
understand that they are somehow sorry if questions brought to them
are - without any intention of insult - somehow unintelligent.
If the study groups try to work out the question together the
questions will be less and more qualified and people who are willing
to answer will have the feeling they really help.
To put it together at the end. I think something with the following
features would be immense helpful:
- people can communicate somehow with a group of other peoples about
their learning experiences
- a study group should be limited in members
- students in a study group should be somehow on one level - in their
knowledge and in their personalities (don't know really how to say
this in english - hope it gives a hint ;-)
- there should be a place where questions can be directed which cannot
be solved by the group
I am not sure about the following points:
- does each group need to have some kind of organisator, leader,
moderator?
- how can people brought in one group who are at the same level of
knowledge and who will learn at the same speed?
To discuss this topics and not to waste more bandwith on this group I
set up a mailinglist to discuss possible models for learning-groups.
The name of the list is learning-perl (I read this wonderful book and
would have liked to exchange my first experiences with other people).
The list is not ment to be a place to learn, but a place to discuss
the topic of this thread. Other lists can be set up as needed (to some
level of traffic I can afford...).
The address to enter the list is learning-perl-request@w12.link-goe.de
Foreign submission to the list is off. Please subscribe if you want to
discuss on the topic of the list first.
I set up some kind of charter to the list - critics to language,
grammar and content welcome (I do this the first time so please be
kind with me ;-).
Chris.
--
Die Telekom wird nicht, wie sie selbstherlich versucht zu vermitteln,
der Hecht im Karpfenteich sein, sondern die fette Wasserleiche im
Haifischtank. (schuetzmann@chaos.dirnet.com)
------------------------------
Date: Mon, 06 Apr 1998 14:47:45 -0400
From: CP <peredina@progress.com>
Subject: New DB_File user
Message-Id: <35292350.3A47369E@progress.com>
Im using a newly installed Berkeley DB along with DB_File.
Everything has compiled, but I keep getting "Out of memory!" when
running the following:
use DB_File;
tie %x, "DB_File", "test";
$x{"1"} = "testing";
untie (%x);
I've searched everywhere, and this is probably a very vague type of
problem, but any pointers would be appreciated.
Thanks in advance,
Curt
------------------------------
Date: Sun, 05 Apr 1998 18:54:18 GMT
From: perl.babe@mailexcite.com (sandra)
Subject: Re: perl linux database program?
Message-Id: <3527d2dd.10710417@newsreader.cais.net>
Perl - per se - is not a database, thus one would not be trying to
create "perl databases" on Linux or anything else. There are numerous
sites with info about how to use Perl to manipulate various databases
on various systems. I myself am searching for information on how to
make calls to MS Access files, and that is why I have tripped over
such information for Oracle, Informix, and Sybase.
sandy
On Sat, 4 Apr 1998 07:34:47 -0500, "Greg Waters" <gwaters@dorsai.org>
wrote:
>Does anybody know resource information and help files on how to create perl
>databases for linux? Did someone write a program?
>
>Greg
>http://www.silly.com/~gwaters
>
>
------------------------------
Date: 6 Apr 1998 19:29:29 GMT
From: rproulx@rap.East.Sun.COM ()
Subject: Perl5_on_Solaris_2.6
Message-Id: <6gbaep$8re@walters.East.Sun.COM>
Keywords: 64-bit
Does anyone know how to make perl5 use 64-bit integers on SUN Solaris 2.6?
I need to be to have 64-bit integers like 0xFFFF.FFFF.FFFF.FFFF work!
P.S. I am on an ultra-sparc I
Thanks Again
Richard.Proulx@SUN.com x20522
--
###################################################################
# #
# RICHARD A. PROULX #
# ______ Verification/Diagnostic/FirmWare Engineer #
# /_____/\ #
# /____ \\ \ Sun MicroSystems, Inc. #
# /_____\ \\ / Sun Microsystems Computer Corporation #
# /_____/ \/ / / Five Omni Way #
# /_____/ / \//\ Chelmsford, Ma 01824 #
# \_____\//\ / / Main: --------- (978) 442-0000 #
------------------------------
Date: Mon, 06 Apr 1998 14:25:14 -0600
From: eugene@vertical.net
Subject: Re: Post - is lwp the only answer?
Message-Id: <6gba6q$1hh$1@nnrp1.dejanews.com>
Marcia,
the LWP Readme sez:
"If you want to install a private copy of libwww-perl in your home
directory, then you should try to produce the initial Makefile with
something like this command:
perl Makefile.PL LIB=~/perl
etc. . . . .. . . "
You can find it
at:
http://www.perl.com/CPAN-local/modules/by-category/15_World_Wide_Web_HTML_HTTP
_CGI/LWP/libwww-perl-5.30.readme
(though you may want to use a CPAN closer to you)
>I know that the lwp module will do this, but our host
>wont/can't let me install it...
I hate Perl-unfriendly ISPs. . . Any better ones for you to choose from?
Eugene
In article <fl_aggie-0604981218590001@aggie.coaps.fsu.edu>,
fl_aggie@thepentagon.com (I R A Aggie) wrote:
>
> In article <8c90pjvyg2.fsf@gadget.cscaper.com>, Randal Schwartz
> <merlyn@stonehenge.com> wrote:
>
> + And you *do* realize that you can install LWP in your own area -- it
> + doesn't need sysadmin assistance. Right?
>
> Probably not. I know this is explicitly addressed in the CGI.pm
> module, but might be a...hmmm...it _is_ a FAQ. Thought so... :)
>
> How do I keep my own module/library directory? (perldoc perlfaq8)
>
> James
>
> --
> Consulting Minister for Consultants, DNRC
> The Bill of Rights is paid in Responsibilities - Jean McGuire
> To cure your perl CGI problems, please look at:
> <url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 04 Apr 1998 14:13:40 GMT
From: perl.babe@mailexcite.com (sandra)
Subject: search for Perl/MS Access docs
Message-Id: <35273e24.1695545@newsreader.cais.net>
Where is a good source for documentation about getting MS Access 97
data into HTML pages via Perl? Thank you
Sandy
------------------------------
Date: Mon, 6 Apr 1998 16:02:55 -0400
From: Ted Gonzalez <sidney@acpub.duke.edu>
Subject: Seek and Read
Message-Id: <Pine.SOL.3.91.980406160002.14660A-100000@godzilla4.acpub.duke.edu>
I don't understand these two functions very well. I need to know how I
can use them to read a database text file in which each line has variable
length and the fields in each line are delimited by a colon ":". Please
email all replies to sidney@acpub.duke.edu. Thanks.
Ted
------------------------------
Date: 6 Apr 1998 18:10:32 GMT
From: psf@euclid.jpl.nasa.gov (Peter Scott)
Subject: Re: Use of implicit split to @_ is deprecated
Message-Id: <6gb5qo$rfc@netline.jpl.nasa.gov>
(BTW, I was doing this because I wanted only the count of the
number of tokens split.)
jgloudon@manitoba.bbn.com (Jason Gloudon) wrote:
> >psf@euclid.jpl.nasa.gov (Peter Scott) writes:
> >> Is it really necessary for perl to give this warning (with -w)
> >> when I'm using split in a scalar context? I can trigger this with
> >> perl -we '$x = split'.
>
> It gives this warning because as the docs say (man perlfunc) about split:
>
> If not in a list context, returns the number of fields found and splits into
> the @_ array.
I'm aware of that, and of why it is a bad idea; I just thought that it
would recognize that it was in scalar context and return the count without
putting the results into an array which it was only going to throw away.
The Camel suggests this: the definition of split (p.220) makes no mention
of @_ (the only mention of this behavior that I could find was on p.527:
"If you alter your @_ arguments [...] (such as with shift or pop)...").
But it does say in the first paragraph: "... returning the list value in
list context, or the count of substrings in scalar context."
> If you want to count the number of elements returned by split you should say
> $x = scalar(@junkarray = split), which says explicitly what you want and what
> actually happens.
True. But bad style if it could be avoided, which is what I thought was
implied by the Camel. (Although $x = () split isn't as bad style.)
--
This is news. This is your | Peter Scott, NASA/JPL/Caltech
brain on news. Any questions? | (psf@euclid.jpl.nasa.gov)
Disclaimer: These comments are the personal opinions of the author, and
have not been adopted, authorized, ratified, or approved by JPL.
------------------------------
Date: Mon, 06 Apr 1998 19:56:50 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: Use of implicit split to @_ is deprecated
Message-Id: <slrn6iicn1.qlf.jgloudon@manitoba.bbn.com>
Peter Scott <psf@euclid.jpl.nasa.gov> wrote:
>(BTW, I was doing this because I wanted only the count of the
>number of tokens split.)
Hence the scalar().
My old second edition camel mentions that in a scalar context it returns the
number of fields and splits into the @_ array. The manpage says so as well.
>
>True. But bad style if it could be avoided, which is what I thought was
>implied by the Camel. (Although $x = () split isn't as bad style.)
Oh No. Not the fashion police ...
--
Jason Gloudon
------------------------------
Date: Mon, 06 Apr 1998 13:21:36 +0000
From: Jeff Potter <jp@glpbooks.BADMAIL.com>
Subject: Re: Wanted: email address gleaner
Message-Id: <3528D6E0.400C@glpbooks.BADMAIL.com>
PS: Email sent by whatever means to a person regarding a particular
post, being an offer to BUY that post, is neither 'commercial' in the
prohibited sense nor is it unsolicited, as it is about a particular post.
(Commercial in netiquette sense is mail from folks trying to sell you
stuff, right?) Method of delivery in itself doesn't make email spam.
If I have 100 particular people I want to buy particular quoted posts
off of, I can automail them about those exact posts, with an offer to buy,
and it's not spam. Right? If not, show how.
--
Jeff Potter jp@glpbooks.BADMAIL.com delete '.BADMAIL' to reply
***"Out Your Backdoor": Friendly Magazine of DIY Adventure and Culture
http://www.glpbooks.com/oyb ... with new bookstore & bulletin board
------------------------------
Date: Mon, 06 Apr 1998 13:46:17 +0000
From: Jeff Potter <jp@glpbooks.BADMAIL.com>
Subject: Re: Wanted: email address gleaner
Message-Id: <3528DCA9.28A0@glpbooks.BADMAIL.com>
PS: Email sent by whatever means to a person regarding a particular
post, being an offer to BUY that post, is neither 'commercial' in the
prohibited sense nor is it unsolicited, as it is a reply to a particular post.
(Commercial in netiquette sense is mail from folks trying to sell you
stuff, right?) Method of delivery in itself doesn't make email spam.
If I have 100 particular people I want to buy particular posts
from, I can automail them about those exact posts and it's not spam.
Right? If not, show how.
--
Jeff Potter jp@glpbooks.BADMAIL.com delete '.BADMAIL' to reply
***"Out Your Backdoor": Friendly Magazine of DIY Adventure and Culture
http://www.glpbooks.com/oyb ... with new bookstore & bulletin board
------------------------------
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 2260
**************************************