[13836] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1246 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 1 18:06:08 1999

Date: Mon, 1 Nov 1999 15:05:24 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <941497523-v9-i1246@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 1 Nov 1999     Volume: 9 Number: 1246

Today's topics:
    Re: 'Crypt' function on CPAN <petec@REMOVEozemail.com.au>
    Re: -w <uri@sysarch.com>
    Re: -w <jeffp@crusoe.net>
    Re: -w <lr@hpl.hp.com>
    Re: <STDIN> to a @ (Craig Berry)
    Re: <STDIN> to a @ (Craig Berry)
    Re: <STDIN> to a @ <lr@hpl.hp.com>
    Re: Basic Question <gellyfish@gellyfish.com>
    Re: Basic Question <skilchen@swissonline.ch>
    Re: Basic Question <lr@hpl.hp.com>
    Re: Book suggestions <cassell@mail.cor.epa.gov>
    Re: Book suggestions <msalter@bestweb.net>
    Re: Book suggestions (Kragen Sitaker)
    Re: Book suggestions <lr@hpl.hp.com>
    Re: Can this be made faster? <lr@hpl.hp.com>
    Re: Card shuffling (Bennett Todd)
    Re: comparing text with words (Bart Lateur)
        Database script help (Jim)
        Date <mazhar@nmt.edu>
    Re: Date (Bill Moseley)
    Re: DBD::Oracle make test problem (John D Groenveld)
    Re: DBI prepare error when running select stmt slicks78@my-deja.com
    Re: Deleting line in a file. (Michael Budash)
        Don't we have POINTERS on Perl? <landim2NOlaSPAM@brhs.com.br.invalid>
    Re: Don't we have POINTERS on Perl? (Greg Bacon)
    Re: Don't we have POINTERS on Perl? (Craig Berry)
    Re: Don't we have POINTERS on Perl? <lr@hpl.hp.com>
    Re: FAQ 1.7: Is Perl difficult to learn? (Bart Lateur)
    Re: FAQ 1.7: Is Perl difficult to learn? <keithmur@mindspring.com>
    Re: How exactly do I start creating a CGI with PERL <AgitatorsBand@yahoo.com>
    Re: It is always like this here? (Jon Bell)
    Re: multiline editing (Craig Berry)
    Re: Need routine to find banned or "Bad" words (Bart Lateur)
    Re: Need routine to find banned or "Bad" words <flavell@mail.cern.ch>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 1 Nov 1999 19:07:40 +1100
From: "Pete" <petec@REMOVEozemail.com.au>
Subject: Re: 'Crypt' function on CPAN
Message-Id: <6omT3.51$tk4.515@nsw.nnrp.telstra.net>

My thanks to the group for the assistance provided. Situation resolved!




------------------------------

Date: 01 Nov 1999 15:08:25 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: -w
Message-Id: <x7n1sy9dqe.fsf@home.sysarch.com>

>>>>> "DC" == David Cassell <cassell@mail.cor.epa.gov> writes:

  DC> [emailed also]
  DC> Jeff Pinyan wrote:
  DC> [snip]
  >> On a totally unrelated note, November 9th shall be my undoing.  For I
  >> shall be 18 years of age.  Look out.

  DC> Mazel tov.  We eagerly await your posts after Nov 9.  Probably
  DC> lots of drunken posts after midnight, and then lots of really
  DC> surly hangover-laden posts on the subsequent mornings.  Should
  DC> liven things up considerably.  :-)

don't know what planet you're from, but min drinking age is 21 all over
the .us. but now japhy can vote and create all sorts of nasty perl
voting scripts to elect his favorite politician.

:-)

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


------------------------------

Date: Mon, 1 Nov 1999 15:59:30 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: -w
Message-Id: <Pine.GSO.4.10.9911011558320.2694-100000@crusoe.crusoe.net>

[posted & mailed]

On Nov 1, David Cassell blah blah blah:

> > On a totally unrelated note, November 9th shall be my undoing.  For I
> > shall be 18 years of age.  Look out.
> 
> Mazel tov.  We eagerly await your posts after Nov 9.  Probably
> lots of drunken posts after midnight, and then lots of really
> surly hangover-laden posts on the subsequent mornings.  Should
> liven things up considerably.  :-)

Heh.  Sadly (?) I can program quite well under the influence of alcohol.
Straight shots of Puerto Rican Rum didn't phase me.  They stung like a
bastard, though.

-- 

  MIDN 4/C PINYAN, USNR, NROTCURPI
  jeff pinyan      japhy@pobox.com
  perl stuff       japhy+perl@pobox.com
  CPAN ID: PINYAN  http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/



------------------------------

Date: Mon, 1 Nov 1999 13:28:29 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: -w
Message-Id: <MPG.1287a5dc7c6f70af98a171@nntp.hpl.hp.com>

In article <381DEF43.2C07FD11@mail.cor.epa.gov> on Mon, 01 Nov 1999 
11:51:31 -0800, David Cassell <cassell@mail.cor.epa.gov> says...
> Jeff Pinyan wrote:
> [snip]
> > On a totally unrelated note, November 9th shall be my undoing.  For I
> > shall be 18 years of age.  Look out.
> 
> Mazel tov.  We eagerly await your posts after Nov 9.  Probably
> lots of drunken posts after midnight, and then lots of really
> surly hangover-laden posts on the subsequent mornings.  Should
> liven things up considerably.  :-)

Ahem.  The legal drinking age is now 21, everywhere in the USA, as far 
as I know.  Don't give the (still a) minor any bad ideas, or any alcohol 
for that matter.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 01 Nov 1999 21:16:04 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: <STDIN> to a @
Message-Id: <s1s0ok46qof91@corp.supernews.com>

morpheus (r00tz@ciudad.com.ar) wrote:
: I need to get 8 letters from the user and put each one of them in a
: different part of an array (
: @array[0] = m;
: @array[1] = d;
: ...
: Anybody could help me?

Do you want to read them one at a time, or all at once and then fill the
array?

#!/usr/bin/perl -w
# 8 chars - get 8 chars from the user into an array, two different ways.
# Craig Berry (19991101)

use strict;

print "All at once technique\n",
      '  Enter 8 characters: ';
chomp(my $line = <>);
die "That's not 8 characters!" unless length($line) == 8;

my @chars = split //, $line;

print '  ', join(':', @chars), "\n",
      "One at a time technique\n";

@chars = ();

while (@chars < 8) {
  print "  Enter a character: ";
  chomp(my $line = <>);
  die "That's not one character!" unless length($line) == 1;
  push @chars, $line;
}

print '  ', join(':', @chars), "\n";

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


------------------------------

Date: Mon, 01 Nov 1999 21:18:53 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: <STDIN> to a @
Message-Id: <s1s0ttb5qof47@corp.supernews.com>

Larry Rosler (lr@hpl.hp.com) wrote:
: I know that works the way you want it too -- split on every character.  
: It just looks so much like a common programming trap (split on vertical 
: bar) that I find it grating.  Can anyone defend writing anything but // 
: for the 'split on null string' regex?

I can't defend any alternative, but this special case does bother me.
Ordinarily, an empty regex means "match on last regex encountered" (see
another currently active thread on this issue).  Giving it yet another
special meaning in the context of split is a little too magical for my
taste.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


------------------------------

Date: Mon, 1 Nov 1999 13:51:11 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: <STDIN> to a @
Message-Id: <MPG.1287ab2a1bbee76498a175@nntp.hpl.hp.com>

In article <s1s0ttb5qof47@corp.supernews.com> on Mon, 01 Nov 1999 
21:18:53 GMT, Craig Berry <cberry@cinenet.net> says...
> Larry Rosler (lr@hpl.hp.com) wrote:
> : I know that works the way you want it too -- split on every character.  
> : It just looks so much like a common programming trap (split on vertical 
> : bar) that I find it grating.  Can anyone defend writing anything but // 
> : for the 'split on null string' regex?
> 
> I can't defend any alternative, but this special case does bother me.
> Ordinarily, an empty regex means "match on last regex encountered" (see
> another currently active thread on this issue).  Giving it yet another
> special meaning in the context of split is a little too magical for my
> taste.

So what would you do about it?  The magic is there willy-nilly.  That's 
the way it was, is, and always will be.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 31 Oct 1999 22:39:46 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Basic Question
Message-Id: <7vigfi$2to$1@gellyfish.btinternet.com>

On Sun, 31 Oct 1999 21:21:06 GMT fbrito@my-deja.com wrote:
>   I have already read the perlfunc but could not find this:
>   I need to discover a way to do the 'whoami' Unix command in Perl.
>   Where can I find the argument ( file or variable ) of getpwuid()
> function to get this ?

I think you want to look at the variables $< and $> in the perlvar
manpage in concert with the getpwuid entry of perlfunc ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Mon, 01 Nov 1999 21:22:50 GMT
From: "Samuel Kilchenmann" <skilchen@swissonline.ch>
Subject: Re: Basic Question
Message-Id: <KwnT3.28055$m4.100978251@news.magma.ca>

David Cassell <cassell@mail.cor.epa.gov> wrote in message
news:381DEDD4.9462E76A@mail.cor.epa.gov...
> fbrito@my-deja.com wrote:
> >
> > I have already read the perlfunc but could not find this:
> > I need to discover a way to do the 'whoami' Unix command in
> > Perl.
> > Where can I find the argument ( file or variable ) of getpwuid()
> > function to get this ?
>
> Hmmm.  The info on getpwuid() is right there in perlfunc.
> You could also get it just by typing:
>
> perldoc -f getpwuid
>
> So I guess I don't understand what you're asking.  Was there
> a part of the documentation which you didn't understand?

For my part, i don't understand why the description of getpwuid
doesn't contain a pointer to the perlvar manpage where $UID etc. could
be found. (I don't even understand why such platform specific things
are still part of the Perl core language instead of (only) the POSIX
module.)




------------------------------

Date: Mon, 1 Nov 1999 14:06:12 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Basic Question
Message-Id: <MPG.1287aeae772f33e498a176@nntp.hpl.hp.com>

In article <KwnT3.28055$m4.100978251@news.magma.ca> on Mon, 01 Nov 1999 
21:22:50 GMT, Samuel Kilchenmann <skilchen@swissonline.ch> says...
> David Cassell <cassell@mail.cor.epa.gov> wrote in message
> news:381DEDD4.9462E76A@mail.cor.epa.gov...
> > fbrito@my-deja.com wrote:
> > > I have already read the perlfunc but could not find this:
> > > I need to discover a way to do the 'whoami' Unix command in
> > > Perl.
> > > Where can I find the argument ( file or variable ) of getpwuid()
> > > function to get this ?
> >
> > Hmmm.  The info on getpwuid() is right there in perlfunc.
> > You could also get it just by typing:
> >
> > perldoc -f getpwuid
> >
> > So I guess I don't understand what you're asking.  Was there
> > a part of the documentation which you didn't understand?
> 
> For my part, i don't understand why the description of getpwuid
> doesn't contain a pointer to the perlvar manpage where $UID etc. could
> be found. (I don't even understand why such platform specific things
                                     ^^^
> are still part of the Perl core language instead of (only) the POSIX
> module.)

I think you know the answer to this question, and that you know it would 
break compatibility to require the innumerable Perl programs that use 
Unix-related functions and variables to 'use POSIX;'  So your 
parenthetical remark verges on trolling, IMO.

But I will take advantage of it to share one of my favorite language-
related (true) anecdotes.

When I began to study Russian from a native speaker, I asked him *why* a 
particular something was said the way it was.  His answer was terse and 
to the point:  "Potomoo shto kak pyervuy russkiy skazal!"  Because 
that's the way the first Russian said it!

It's easier to identify the first Perlite than the first Russian.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 01 Nov 1999 12:09:37 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Book suggestions
Message-Id: <381DF381.12F74439@mail.cor.epa.gov>

Joel Berger wrote:
> 
> Suggestions for a good book for a newbie?

Umm, how 'newbie' are you?

If you are an experience programmer who hasn't used Perl before,
look at "Programming Perl" or "Perl in a Nutshell".

If you have a little programming experience [enough to know
what an array is, and what structured programming is] then look
at "Learning Perl" or "Learning Perl for Win32 Systems".

If you only know a little HTML and are starting to do some
CGI, then you probably need to start with this web tutorial:
http://www.netcat.co.uk/rob/perl/win32perltut.html
Do not go to books like "Perl for Dummies" unless you want
a book which will try to convince you programming is hard 
and scary.  Get a book which doesn't treat you like a dummy.
 
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Mon, 01 Nov 1999 20:31:34 GMT
From: Mike Salter <msalter@bestweb.net>
Subject: Re: Book suggestions
Message-Id: <Pine.BSF.4.05.9911011528260.6490-100000@monet.bestweb.net>

On Mon, 1 Nov 1999, Joel Berger wrote:

JB>Suggestions for a good book for a newbie?

Go to www.perl.com, and look at 'References'.  You will find books there.

The Llama and Camel books from O'Reilly are always good (www.ora.com).

Mike




------------------------------

Date: Mon, 01 Nov 1999 21:18:01 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Book suggestions
Message-Id: <dsnT3.17872$23.964245@typ11.nn.bcandid.com>

In article <2mlT3.386$Ao3.125@198.235.216.4>,
Joel Berger <joel_berger@manulife.com> wrote:
>Suggestions for a good book for a newbie?

perldoc perlbook
perldoc perl
_Learning Perl_
_Programming Perl_
_Perl: A Programmer's Companion_ -- intended for people who are already
	programmers
_Structure and Interpretation of Computer Programs_ -- to learn to be a
	programmer

-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Mon Nov 01 1999
7 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


------------------------------

Date: Mon, 1 Nov 1999 13:39:10 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Book suggestions
Message-Id: <MPG.1287a85df201ca5c98a173@nntp.hpl.hp.com>

In article <381DF381.12F74439@mail.cor.epa.gov> on Mon, 01 Nov 1999 
12:09:37 -0800, David Cassell <cassell@mail.cor.epa.gov> says...
> Joel Berger wrote:
> > 
> > Suggestions for a good book for a newbie?
> 
> Umm, how 'newbie' are you?
> 
> If you are an experience programmer who hasn't used Perl before,
> look at "Programming Perl" or "Perl in a Nutshell".

For that kind of programmer, Nigel Chapman's book, "Perl: The 
Programmer's Companion", is likely to be a good introduction to Perl, 
perhaps better even than "Programming Perl".  But each of them is a 
'good read'.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 1 Nov 1999 13:25:57 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Can this be made faster?
Message-Id: <MPG.1287a540d998efe498a170@nntp.hpl.hp.com>

In article <7vkomr$iau$1@fir.prod.itd.earthlink.net> on Mon, 1 Nov 1999 
11:12:41 -0800, PB <22pb22@excite.com> says...

 ...

> Thanks for your input and if you have any suggestions or comments I would
> love to hear them.

perldoc Benchmark

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 01 Nov 1999 21:31:49 GMT
From: bet@network.rahul.net (Bennett Todd)
Subject: Re: Card shuffling
Message-Id: <slrn81s1m5.njb.bet@localhost.localdomain>

1999-10-20-09:10:39 Mikko Saari:
>I need a perl script to handle decks of cards. My first and most obvious
>problem is shuffling, a problem which has bothered me previously. How do I
>arrange an array in random order? 

There are a lot of answers to that question. In fact, I doubt any two people
will answer the same way. Here's my favourite:

for my $i (0..$#deck-1){@deck[$i, $_]=@deck[$_, $i] for $i+rand($#deck-$i+1)}

That shuffles an N-card deck using N-1 calls to rand() and swaps. If the
performance edge of doing an in-place swapping shuffle isn't important, it
might be more understandable as

	@shuffled = ();
	push @shuffled, splice(@deck, rand(@deck), 1) while @deck;

-Bennett


------------------------------

Date: Mon, 01 Nov 1999 12:11:00 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: comparing text with words
Message-Id: <381d8263.2202437@news.skynet.be>

Larry Rosler wrote:

>The 'golf score' is often an indication of clarity and even of 
>performance.  In this case, using 'local $_' to eliminate all the 
>repetitions of '$x =~', and using logical short-circuiting '||' instead 
>of all those 'if' statements.

You can do :

	for($x) {
		/.../
	}

too. I use it a lot, as soon as I need to do more than one thing with $x
in a row.

Of course, this won't work if you need to modify the value of a
read-only variable. So for example you can't do:

	if(/($pat)/) {
	    for($1) {
	       tr/\r\n\t / /s;
	       print;
	    }
	}

-- 
	Bart.


------------------------------

Date: Mon, 01 Nov 1999 21:56:07 GMT
From: jim@jimmo.freeuk.com (Jim)
Subject: Database script help
Message-Id: <38200c68.18917744@news.freeuk.net>

Hello,

Can you help ?

We have written a perl script to read/write to a dbm database.

We now need to "hold" the user name when a user logs on to our website
to enable us to identify them.

How do we retain the user name once the scrips has finished executing
?
If the user needs to update his details within the database and not
have to logon again something must retain his user name.

Thanks

Jim & Neil


------------------------------

Date: Mon, 1 Nov 1999 14:51:27 -0800
From: "Mazhar Memon" <mazhar@nmt.edu>
Subject: Date
Message-Id: <7vl23b$isf$1@newshost.nmt.edu>

How do I get the current date in Perl?




------------------------------

Date: Mon, 1 Nov 1999 14:53:23 -0800
From: moseley@best.com (Bill Moseley)
Subject: Re: Date
Message-Id: <MPG.1287b9c23a731ede98982e@nntp1.ba.best.com>

Mazhar Memon (mazhar@nmt.edu) seems to say...
> How do I get the current date in Perl?

Do you want it in localtime or gmtime?

Also note how smart the perl programmers were.  Since there's not date() 
function there can't be a Y2K problem!  What other interpreted languages 
had this much foresight?


-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


------------------------------

Date: 1 Nov 1999 15:33:59 -0500
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: DBD::Oracle make test problem
Message-Id: <7vktfn$8ek$1@grolsch.cse.psu.edu>

In article <3818D484.A026CE4B@altavista.com>,
Arvind Krishnaswamy  <arvindk@altavista.com> wrote:
>but perl Makefile.PL still gives a warning on the Oracle Security
>problem.. Is this OK?
Yes, the script only checks the Oracle version number
John
groenveld@acm.org


------------------------------

Date: Mon, 01 Nov 1999 21:18:57 GMT
From: slicks78@my-deja.com
Subject: Re: DBI prepare error when running select stmt
Message-Id: <7vl03n$l5i$1@nnrp1.deja.com>

In article <7vehtm$488$1@gellyfish.btinternet.com>,
  Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Fri, 29 Oct 1999 19:44:54 GMT slicks78@my-deja.com wrote:
> > I am having a prepare error returned when trying to run a SQL select
> > statement to SQL Server. The SQL is dynamically generated.  Some of
the
> > input is coming from a multi line select box w/ values appended with
> > commas for parsing.  I think this might be some of the problem.
> >
> > The code:
> >
> > sub getMemberID
> > {
> > 	local($sMemberIDSql, @Results,$ListofNames,$name);
> >
> > 	$ListofNames = shift;
> > 	$ListofNames =~ s/,/','/isg;
> > 	$ListofNames = "'" . $ListofNames . "'";
> > 	$sMemberIDSql = qq|SELECT tblMember.MemberId FROM tblMember
> > WHERE tblMember.MemberName in ($ListofNames);|;
> >
> > 	@Results = &executeSQLStatement($sMemberIDSql);
> > 	return @Results;
> > }
> >
> > executeSQLStatement performs a DBI prepare and execute statement and
> > then returns an array of results.
> >
>
> <unmatched quote error>
>
> $ListofNames = join ','. map { qq{'$_'} } split /,/, $ListofNames;
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings:
<URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
>

I used your method to format the list of names for the SQL stmt
($ListofNames).  Unfortunately, the problem does not lie in the
construction of the list.  It turns out that an obscure character is
appended to each value selected in a multiple input select box. The
character is not shown when I try to print out the input.

Do you know what that character may be?
Is there a special delimiter between each selected value in the multi
line select box?

Thank you.


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Mon, 01 Nov 1999 14:17:18 -0800
From: mbudash@wcws.com (Michael Budash)
Subject: Re: Deleting line in a file.
Message-Id: <mbudash-0111991417180001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>

In article
<mbudash-0111990955350001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>,
mbudash@wcws.com (Michael Budash) wrote:

> there's more than one way to do this... for one way (2?), see the faq
> titled ""
> 

oops - i meant see the faq entitled "How do I change one line in a
file/delete a line in a file/insert a line in the middle of a file/append
to the beginning of a file?"

sorry!
-- 
Michael Budash ~~~~~~~~~~ mbudash@wcws.com


------------------------------

Date: Mon, 01 Nov 1999 12:54:19 -0800
From: Landim <landim2NOlaSPAM@brhs.com.br.invalid>
Subject: Don't we have POINTERS on Perl?
Message-Id: <180b7585.359e475e@usw-ex0103-019.remarq.com>

Hi all...


I want to know if we have or not pointers on perl, and
if we have, how to declarate? To manipulate?


landim2@brhs.com.br


* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful


------------------------------

Date: 1 Nov 1999 21:07:15 GMT
From: gbacon@ruby.itsc.uah.edu (Greg Bacon)
Subject: Re: Don't we have POINTERS on Perl?
Message-Id: <7vkve3$2u3$1@info2.uah.edu>

In article <180b7585.359e475e@usw-ex0103-019.remarq.com>,
	Landim <landim2NOlaSPAM@brhs.com.br.invalid> writes:

: I want to know if we have or not pointers on perl, and
: if we have, how to declarate? To manipulate?

Perl has references which are different from, say, C's pointers.  Read
the perlref manpage.

Greg
-- 
Do pediatricians play miniature golf on Wednesdays?
    -- George Carlin


------------------------------

Date: Mon, 01 Nov 1999 21:59:05 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Don't we have POINTERS on Perl?
Message-Id: <s1s3999pqof22@corp.supernews.com>

Landim (landim2NOlaSPAM@brhs.com.br.invalid) wrote:
: I want to know if we have or not pointers on perl, and
: if we have, how to declarate? To manipulate?

Almost.  First, a lot of things you'd need pointers to do in other
languages -- list and array manipulation, for example -- are done "under
the covers" in perl, without any need for programmer-visible pointers. 
Second, for those cases where you do need pointer-like behavior, perl has
references instead.  Refs are a lot like pointers with built-in memory
management so that you need never worry about freeing objects or using
dead pointers.  See perlref for details. 

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


------------------------------

Date: Mon, 1 Nov 1999 14:55:25 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Don't we have POINTERS on Perl?
Message-Id: <MPG.1287ba37a07da7d98a17a@nntp.hpl.hp.com>

In article <s1s3999pqof22@corp.supernews.com> on Mon, 01 Nov 1999 
21:59:05 GMT, Craig Berry <cberry@cinenet.net> says...
> Landim (landim2NOlaSPAM@brhs.com.br.invalid) wrote:
> : I want to know if we have or not pointers on perl, and
> : if we have, how to declarate? To manipulate?
> 
> Almost.  First, a lot of things you'd need pointers to do in other
> languages -- list and array manipulation, for example -- are done "under
> the covers" in perl, without any need for programmer-visible pointers. 
> Second, for those cases where you do need pointer-like behavior, perl has
> references instead.  Refs are a lot like pointers with built-in memory
> management so that you need never worry about freeing objects or using
> dead pointers.  See perlref for details. 

To answer 'To manipulate?' further:

You can create a reference, assign a reference, or dereference a 
reference.  You can convert a reference to a string, but you cannot 
convert a string to a reference.  So you cannot do the arbitrary pointer 
manipulation that is so powerful and so dangerous in C.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 01 Nov 1999 16:28:42 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: FAQ 1.7: Is Perl difficult to learn?
Message-Id: <3820bf7f.2436363@news.skynet.be>

Tom Christiansen wrote:

>  Is Perl difficult to learn?
>
>    No, Perl is easy to start learning -- and easy to keep learning.

Oh no! Don't say that! Say it's difficult to learn!

;-)

How else are we going to deter script kiddies?

-- 
	Bart.


------------------------------

Date: Mon, 01 Nov 1999 16:56:54 -0600
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: FAQ 1.7: Is Perl difficult to learn?
Message-Id: <381E1AB6.B4856BEB@mindspring.com>

Bart Lateur wrote:
> 
> Tom Christiansen wrote:
> 
> >  Is Perl difficult to learn?
> >
> >    No, Perl is easy to start learning -- and easy to keep learning.
> 
> Oh no! Don't say that! Say it's difficult to learn!
> 
> ;-)
> 
> How else are we going to deter script kiddies?
> 
Wouldn't "keep learning" be sufficient for that?
-- 
Everything that I've learned about computers...
I have boiled down into three principles: 

Unix: You think it won't work, but if you find the right wizard, 
  he can make it work. 
Macintosh: You think it will work, but it won't. 
PC/Windows: You think it won't work, and it won't. 

Philip Greenspun, "Phil and Alex's Guide to Web Publishing"


------------------------------

Date: Mon, 01 Nov 1999 20:11:11 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: How exactly do I start creating a CGI with PERL
Message-Id: <ztmT3.380$Yr1.80207@news.shore.net>

Bill Moseley <moseley@best.com> wrote:
: Otherwise, I'd consider searching the web.  I've heard about these 
: search engine things that find things for you.  Cool, I think.  I was 
: also at a bookstore the other day and saw some books on the Web and CGI.  
: Frankly, I couldn't believe it.  Do people actually still read books?

Based on the quality of most Web/CGI/computer-related books out there, I
certainly hope not!

--Art
-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


------------------------------

Date: Mon, 1 Nov 1999 20:24:37 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: It is always like this here?
Message-Id: <FKJCp1.CwJ@presby.edu>

 Jon Shemitz  <jon@midnightbeach.com> wrote:
>
>Maybe what is needed is a comp.lang.perl.arcana, or c.l.p.details, or
>even c.l.p.way-geeky. People always cite the Unix wizards group as an
>example of why this won't work. But if you name it in a way that will
>really only appeal to those who belong there - and you find a moderator
>- this shouldn't be a problem. A moderator, I think, is key.

We already *have* a moderated group, comp.lang.perl.moderated.

-- 
Jon Bell <jtbell@presby.edu>                        Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA
        [     Information about newsgroups for beginners:     ]            
        [ http://www.geocities.com/ResearchTriangle/Lab/6882/ ]


------------------------------

Date: Mon, 01 Nov 1999 21:39:53 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: multiline editing
Message-Id: <s1s259nmqof77@corp.supernews.com>

Jonathan Stowe (gellyfish@gellyfish.com) wrote:
: Because Perl will read a program from its STDIN you can easily do this
: with a her document :

Let's not be sexist, please.  His documents work just as well.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


------------------------------

Date: Mon, 01 Nov 1999 16:31:45 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Need routine to find banned or "Bad" words
Message-Id: <3821bffd.2561482@news.skynet.be>

Geoff Roberts wrote:

>  I was after a routine that I could use to look up either reserved or
>banned words (eg. rude or offensive words and system reserved words).  
>This is primarily for logins and email addresses.
>
>   Does anyone know of such a routine?   Does anyone also know of any
>dictionary files that might contain such words?

TomC once wrote a routine like that, it must be available through
<www.perl.com>. Look up "e-mail address verify" or something like it. It
also checks for quickly "improvised" e-mail addresses, such as "azerty"
and "qwerty". 

-- 
	Bart.


------------------------------

Date: Mon, 1 Nov 1999 22:19:23 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Need routine to find banned or "Bad" words
Message-Id: <Pine.HPP.3.95a.991101221537.16161O-100000@hpplus01.cern.ch>

On Mon, 1 Nov 1999, Bart Lateur wrote:

> TomC once wrote a routine like that, it must be available through
> <www.perl.com>. Look up "e-mail address verify" or something like it. It
> also checks for quickly "improvised" e-mail addresses, such as "azerty"
> and "qwerty". 

Nice idea.  One of our pages of user instructions refers to "email
addresses of the form A.Person@...".  Now the mailer keeps having to
reject spam mails for A.Person at our email domain.  And to Person, too. 
Jibbering idiots. 




------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V9 Issue 1246
**************************************


home help back first fref pref prev next nref lref last post