[16312] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3724 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 18 10:43:08 2000

Date: Tue, 18 Jul 2000 07:42:58 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963931377-v9-i3724@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 18 Jul 2000     Volume: 9 Number: 3724

Today's topics:
    Re: Perl Expert? I need help! (Tad McClellan)
    Re: Perl Expert? I need help! (Alejandro Kurczyn)
    Re: Perl Expert? I need help! (Alejandro Kurczyn)
    Re: Perl Expert? I need help! (Scott McGerik)
    Re: Perl Expert? I need help! (Alan J. Flavell)
    Re: Perl Expert? I need help! (Jonathan Stowe)
    Re: Perl Expert? I need help! (Alejandro Kurczyn)
    Re: Perl Expert? I need help! (Greg Snow)
    Re: Perl Expert? I need help! (Abigail)
    Re: Perl Expert? I need help! (Bernard El-Hagin)
    Re: PERL IDES (mike solomon)
    Re: PERL IDES (Jennifer Moter)
        perl makemaker tutorial (Trent Mankelow)
    Re: perl makemaker tutorial (Anno Siegel)
    Re: perl makemaker tutorial (Anno Siegel)
    Re: perl makemaker tutorial (Trent Mankelow)
    Re: Perl on irc (Abigail)
    Re: perl prog to change UNIX password through CGI ()
    Re: Perl Rocks!(OT?) (Tad McClellan)
    Re: Perl Rocks!(OT?) (Michael Carman)
    Re: Perl Rocks!(OT?) (Nobody)
        perl/ftp/iis help needed (BobS)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 15 Jul 2000 14:30:01 GMT
From: tadmc@metronet.com.bbs@openbazaar.net (Tad McClellan)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bPa7R$Vns@openbazaar.net>

[ Please put your comments *following* the quoted text that you
  are commenting on.

  Please do not quote an _entire_ article. Quote just enough to
  establish the context for your comments that follow.

  Please do not quote .sigs

  Please visit:         news.announce.newusers

  Thank you.
]


On Sat, 15 Jul 2000 00:15:02 -0500, Alejandro Kurczyn <akurczyn@usa.net> wrote:
>Assuming the regexp works, what is the difference between it and:
>
>$a =~ s/\s+//g;
>$a=substr($a,0,8);


That looks just like the code I posted in a different subthread
(except you've made it harder to read).

If it is, then:

   If you have a question about my code, followup to the article
   where I posted the code.

   Please don't break stuff by copying it from one subthread
   to another.

   There should be an entry in the References: header for articles
   that you are referring to.


 
>Is it better to use regexps if there is already a function to do it?


We cannot answer unless "better" is defined.

What is "better" depends on what you want to optimize.


   Speed?

   Size of source code?

   Size of executable?

   Memory usage?

   Disk usage?

   Development time?

   Maintenance time?



For code that I post, you can nearly always assume the last one there.

I am a (plodding) Software Engineer rather than a (clever) Hacker.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 16 Jul 2000 15:40:02 GMT
From: akurczyn@usa.net.bbs@openbazaar.net (Alejandro Kurczyn)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bQRN2$Wrr@openbazaar.net>

From: "Tad McClellan" <tadmc@metronet.com>
> [ Please put your comments *following* the quoted text that you
>   Please do not quote an _entire_ article. Quote just enough to
>   Please do not quote .sigs


Yeah, sorry about that. It's been some years since I posted on Usenet :-)

> That looks just like the code I posted in a different subthread
> (except you've made it harder to read).

I don't mind loosing a few spaces...

>    If you have a question about my code, followup to the article
>    where I posted the code.

It's not about "your code", it's a valid question regarding Perl. I've seen
some tricks performed using regex, when other functions are available. I
just want to know if there is any difference whatsoever.


>    Please don't break stuff by copying it from one subthread
>    to another.

I didn't copied anything, my post includes "my code", I didn't even had your
message available on the server when I responded.

> >Is it better to use regexps if there is already a function to do it?
>
> We cannot answer unless "better" is defined.
>
> What is "better" depends on what you want to optimize.
>
>
>    Speed?
>
>    Size of source code?
>
>    Size of executable?
>
>    Memory usage?
>
>    Disk usage?
>
>    Development time?
>
>    Maintenance time?
>
>
>
> For code that I post, you can nearly always assume the last one there.


OK, can you give any light on the other ones? Myself I prefer good
performance (that's a function of Speed, I/O, and Memory).

Regards,
-Alejandro


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

Date: 16 Jul 2000 16:20:01 GMT
From: akurczyn@usa.net.bbs@openbazaar.net (Alejandro Kurczyn)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bQSP1$VCJ@openbazaar.net>

From: "Tad McClellan" <tadmc@metronet.com>
> [ Please put your comments *following* the quoted text that you
>   Please do not quote an _entire_ article. Quote just enough to
>   Please do not quote .sigs


Yeah, sorry about that. It's been some years since I posted on Usenet :-)

> That looks just like the code I posted in a different subthread
> (except you've made it harder to read).

I don't mind loosing a few spaces...

>    If you have a question about my code, followup to the article
>    where I posted the code.

It's not about "your code", it's a valid question regarding Perl. I've seen
some tricks performed using regex, when other functions are available. I
just want to know if there is any difference whatsoever.


>    Please don't break stuff by copying it from one subthread
>    to another.

I didn't copied anything, my post includes "my code", I didn't even had your
message available on the server when I responded.

> >Is it better to use regexps if there is already a function to do it?
>
> We cannot answer unless "better" is defined.
>
> What is "better" depends on what you want to optimize.
>
>
>    Speed?
>
>    Size of source code?
>
>    Size of executable?
>
>    Memory usage?
>
>    Disk usage?
>
>    Development time?
>
>    Maintenance time?
>
>
>
> For code that I post, you can nearly always assume the last one there.


OK, can you give any light on the other ones? Myself I prefer good
performance (that's a function of Speed, I/O, and Memory).

Regards,
-Alejandro


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

Date: 16 Jul 2000 16:10:02 GMT
From: scottlm@visi.com.bbs@openbazaar.net (Scott McGerik)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bQSCS$X5r@openbazaar.net>

Alejandro Kurczyn wrote:

> From: "Tad McClellan" <tadmc@metronet.com>
> > [ Please put your comments *following* the quoted text that you
> >   Please do not quote an _entire_ article. Quote just enough to
> >   Please do not quote .sigs
>
> Yeah, sorry about that. It's been some years since I posted on Usenet :-)

[snip]

How many times are you going to post this article? This is the third
posting of this article that I have seen.

Scott McGerik


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

Date: 16 Jul 2000 18:10:08 GMT
From: flavell@mail.cern.ch.bbs@openbazaar.net (Alan J. Flavell)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bQVIb$VmA@openbazaar.net>

On Sun, 16 Jul 2000, Alejandro Kurczyn wrote:

> From: "Tad McClellan" <tadmc@metronet.com>
> > [ Please put your comments *following* the quoted text that you
[...]

> Yeah, sorry about that. It's been some years since I posted on Usenet :-)

That's not funny.  Usenet self-discipline in this respect was better
'some years' ago than it is now, so, by claiming to be an old-time
poster, you put yourself into an even worse light.

[f'up set]


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

Date: 17 Jul 2000 08:30:04 GMT
From: gellyfish@gellyfish.com.bbs@openbazaar.net (Jonathan Stowe)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bR5bU$UOQ@openbazaar.net>

On Fri, 14 Jul 2000 18:28:26 +0200 Bart Lateur wrote:
> Sylvain2k wrote:
>
>>I have a little problem. there it is:
>>
>>$a = "My name is Sylvain";
>>
>>I want to delete ALL spaces in this variable.
>>I only want the first 8 caracters of the result.
>
> First, delete stha spaces, e.g. using "tr///d". Then, using substr, get
> the first eight characters.
>
> 	print test("My name is Sylvain"), "\n";
>
> 	sub test {
> 	    local $_ = shift;
> 	    tr/ //d;
> 	    if(int rand 2) {
> 	        print STDERR "Route 1\n";
> 	        substr($_, 8) = '';
> 	        return $_;
> 	    } else {
> 	        print STDERR "Route 2\n";
> 	        return substr $_, 0, 8;
> 	    }
> 	}
>

Hmm Schroedingers subroutine ....

/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
   <http://www.yapc.org/Europe/>   <http://www.ica.org.uk>


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

Date: 17 Jul 2000 18:00:01 GMT
From: akurczyn@usa.net.bbs@openbazaar.net (Alejandro Kurczyn)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bRKU2$UaR@openbazaar.net>

"Scott McGerik" <scottlm@visi.com> escribió en el mensaje
news:walc5.1314$6E.225840@ptah.visi.com...

> How many times are you going to post this article? This is the third
> posting of this article that I have seen.

I don't know what's going on the NNTP server, I only posted it once.

Please accept my apologies.

regards,
Alejandro


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

Date: 17 Jul 2000 19:00:03 GMT
From: snow@statsci.com.bbs@openbazaar.net (Greg Snow)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bRM94$XLt@openbazaar.net>

In article <CNGb5.399$Ew5.9130@news6-win.server.ntlworld.com>,
Cal Henderson <cal@iamcal.com> wrote:
>
>"Bernard El-Hagin" <bernard.el-hagin@lido-tech.net> wrote...
>:
>: #!/usr/bin/perl -w
>: use strict;
>:
>: my $a = "My name is Sylvain";
>: $a =~ s/\s+//g;
>: $a =~ s/^(.{8}).*$/$1/;
>:
>: print $a;
>
>can this be done in a single reg ex?

my $a = "My name is Sylvain";
$a =~
s/(\S)\s*(\S)\s*(\S)\s*(\S)\s*(\S)\s*(\S)\s*(\S)\s*(\S).*/$1$2$3$4$5$6$7$8/s;

print $a;

But I think that the other methods suggested are probably better in most
cases.




--
-------------------------------------------------------------------------------
     Gregory L. Snow         |  Inertia makes the world go round,
     (Greg)                  |   Love makes the trip worth taking.
 gsnow@splus.mathsoft.com    |


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

Date: 17 Jul 2000 20:10:05 GMT
From: abigail@delanet.com.bbs@openbazaar.net (Abigail)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bRO0S$VuM@openbazaar.net>

Alejandro Kurczyn (akurczyn@usa.net) wrote on MMDXI September MCMXCIII in
<URL:news:39716dd1_2@excalibur.gbmtech.net>:
-- From: "Tad McClellan" <tadmc@metronet.com>
-- >
-- > What is "better" depends on what you want to optimize.
-- >
-- >
-- >    Speed?
-- >
-- >    Size of source code?
-- >
-- >    Size of executable?
-- >
-- >    Memory usage?
-- >
-- >    Disk usage?
-- >
-- >    Development time?
-- >
-- >    Maintenance time?
-- >
-- >
-- >
-- > For code that I post, you can nearly always assume the last one there.
--
--
-- OK, can you give any light on the other ones? Myself I prefer good
-- performance (that's a function of Speed, I/O, and Memory).


If it's speed & memory that are your prime requisites, then what on earth
are you doing in this group?

You should be going to comp.lang.c.



Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


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

Date: 18 Jul 2000 06:20:03 GMT
From: bernard.el-hagin@lido-tech.net.bbs@openbazaar.net (Bernard El-Hagin)
Subject: Re: Perl Expert? I need help!
Message-Id: <3bRdh2$XTt@openbazaar.net>

On 17 Jul 2000 18:40:14 GMT, Greg Snow <snow@statsci.com> wrote:
>In article <CNGb5.399$Ew5.9130@news6-win.server.ntlworld.com>,
>Cal Henderson <cal@iamcal.com> wrote:
>>
>>"Bernard El-Hagin" <bernard.el-hagin@lido-tech.net> wrote...
>>:
>>: #!/usr/bin/perl -w
>>: use strict;
>>:
>>: my $a = "My name is Sylvain";
>>: $a =~ s/\s+//g;
>>: $a =~ s/^(.{8}).*$/$1/;
>>:
>>: print $a;
>>
>>can this be done in a single reg ex?
>
>my $a = "My name is Sylvain";
>$a =~
>s/(\S)\s*(\S)\s*(\S)\s*(\S)\s*(\S)\s*(\S)\s*(\S)\s*(\S).*/$1$2$3$4$5$6$7$8/s;
>
>print $a;

You're just being silly. :-)

>But I think that the other methods suggested are probably better in most
>cases.

I can't help but agree. ;)

Bernard
--
perl -e'@x=(3,2,4,1,3,2,1,3,1,3,2,3,3,2,3,0,0,1,2,1,1,1,4,1,2,1,1,2,2,1,
2,1,2,1,2,1,2,1,1,1,2,1,0,0,3,2,3,2,3,2,1,1,1,1,1,2,4,2,3,2,1,2,1,0,0,1,
2,1,1,1,4,1,2,1,1,1,2,2,1,1,4,1,1,1,2,1,1,1,2,1,0,0,3,2,4,1,1,2,1,1,1,3,
1,1,1,4,1,1,1,2,1,1,3,0,0);sub x{print q x$xx$_;print q x x x shift@x};#
while(defined($_=shift @x)){s o0o\no;$_!=0?x:print}' #Symmetry yrtemmyS#


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

Date: 17 Jul 2000 10:20:02 GMT
From: mike.solomon@eps.ltd.uk.bbs@openbazaar.net (mike solomon)
Subject: Re: PERL IDES
Message-Id: <3bR8V2$WLb@openbazaar.net>

robin

try vim

http://www.math.fu-berlin.de/~guckes/vim/

this is a great editor and it is free

it is bases on the Unix standard editor vi

it has perl syntax highlighting




Robin Bank <rbank@csf.edu> wrote in message
news:8knutk$116q$1@reader.nmix.net...
> Anyone know any good PERL IDEs for Win98, I'm sick of notepad, and I need
to
> be able to rapidly develop perl.
>
> Thanks,
> Robin
>
>


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

Date: 17 Jul 2000 19:40:04 GMT
From: jmoter@1viewnetwork.com.bbs@openbazaar.net (Jennifer Moter)
Subject: Re: PERL IDES
Message-Id: <3bRNB8$W0S@openbazaar.net>

Try Lemmy:
its an inexpensive  vi emulation with modifiable syntax coloring
available highlighters are perl, java, c, c++, sql, pascal, html,...
as well as shell out to your OS.

and no, I don't work for the owner - I just *really* like this editor

http://www.softwareonline.org/lemmy41.html

jennifer

On Fri, 14 Jul 2000 14:44:07 -0600, "Robin Bank" <rbank@csf.edu>
wrote:

>Anyone know any good PERL IDEs for Win98, I'm sick of notepad, and I need to
>be able to rapidly develop perl.
>
>Thanks,
>Robin
>
>

Jennifer Moter
Sr QA Engineer
Electronic Bill Payment & Presentment
Digital Insight
jmoter@1viewnetwork.com


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

Date: 17 Jul 2000 02:10:01 GMT
From: trent.mankelow@unisys.com.bbs@openbazaar.net (Trent Mankelow)
Subject: perl makemaker tutorial
Message-Id: <3bQhgP$XTf@openbazaar.net>

Does anyone know of a good ExtUtils::MakeMaker tutorial with lots of
examples?


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

Date: 18 Jul 2000 10:19:34 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: perl makemaker tutorial
Message-Id: <8l1avm$h2l$1@lublin.zrz.tu-berlin.de>

Trent Mankelow <trent.mankelow@unisys.com> wrote in comp.lang.perl.misc:

[Reply moved where it belongs: below the quoted text]

Don't post jeopardy!

>"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
>news:8kv16s$evc$1@lublin.zrz.tu-berlin.de...
>> Trent Mankelow <trent.mankelow@unisys.com> wrote in comp.lang.perl.misc:
>> >Does anyone know of a good ExtUtils::MakeMaker tutorial with lots of
>> >examples?
>>
>> I don't know of any such tutorial, but examples are easy to come by.
>> Most modules on CPAN contain one.

>What I'm trying to do is a little unusual though, and the Makefile.PLs that
>I've looked at haven't been much help. I basically want to abuse the
>Makefile concept by using it to install several scripts (including shell
>scripts, javascript, etc), modules, and images as well as creating a
>directory structure to place these into. I've had a look at CPAN for
>something of this sort (an Installer module?) but can't find anything apart
>from ExtUtils::MakeMaker, which I've found difficult to use for this
>purpose.

This sounds like a typical install target for a makefile and is not
unusual at all.  Since MakeMaker can write any makefile at all, it
shouldn't be hard to do.

Anno


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

Date: 17 Jul 2000 13:20:02 GMT
From: anno4000@lublin.zrz.tu-berlin.de.bbs@openbazaar.net (Anno Siegel)
Subject: Re: perl makemaker tutorial
Message-Id: <3bRDG3$RyL@openbazaar.net>

Trent Mankelow <trent.mankelow@unisys.com> wrote in comp.lang.perl.misc:
>Does anyone know of a good ExtUtils::MakeMaker tutorial with lots of
>examples?

I don't know of any such tutorial, but examples are easy to come by.
Most modules on CPAN contain one.

Anno


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

Date: 17 Jul 2000 21:30:03 GMT
From: trent.mankelow@unisys.com.bbs@openbazaar.net (Trent Mankelow)
Subject: Re: perl makemaker tutorial
Message-Id: <3bRQ4S$Xzl@openbazaar.net>

What I'm trying to do is a little unusual though, and the Makefile.PLs that
I've looked at haven't been much help. I basically want to abuse the
Makefile concept by using it to install several scripts (including shell
scripts, javascript, etc), modules, and images as well as creating a
directory structure to place these into. I've had a look at CPAN for
something of this sort (an Installer module?) but can't find anything apart
from ExtUtils::MakeMaker, which I've found difficult to use for this
purpose.


"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:8kv16s$evc$1@lublin.zrz.tu-berlin.de...
> Trent Mankelow <trent.mankelow@unisys.com> wrote in comp.lang.perl.misc:
> >Does anyone know of a good ExtUtils::MakeMaker tutorial with lots of
> >examples?
>
> I don't know of any such tutorial, but examples are easy to come by.
> Most modules on CPAN contain one.
>
> Anno


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

Date: 17 Jul 2000 19:40:04 GMT
From: abigail@delanet.com.bbs@openbazaar.net (Abigail)
Subject: Re: Perl on irc
Message-Id: <3bRNB7$VyT@openbazaar.net>

Kiel Stirling  (taboo@doofa.net) wrote on MMDVIII September MCMXCIII in
<URL:news:396e0f8d_3@nexus.comcen.com.au>:
//
// Any idea's on good perl irc channels?


#teensex



Abigail
--
               split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_)  {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


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

Date: 16 Jul 2000 21:30:12 GMT
From: oct1pm@hotmail.com.bbs@openbazaar.net ()
Subject: Re: perl prog to change UNIX password through CGI
Message-Id: <3bQaSa$TyH@openbazaar.net>

In article <8kngop$kt3$1@nnrp1.deja.com>,
  spock0000@my-deja.com wrote:
> You can type "system ("passwd")" the problem is that it runs a
different
> program but I don't know how to write the required passwords for that
> program, maybe someone else can answer that.
>
> In article <396dd536$1_2@nexus.comcen.com.au>,
>   "Kiel Stirling" <taboo@doofa.net> wrote:
> >
> > oct1pm@hotmail.com wrote:
> > >Hi,>
> > >I am trying to write a Perl CGI program so that when a user click
> 'reset
> > >password' button through webpage, he can update his UNIX password.
> > >One can type 'passwd' interactively to reset the password. Is there
a
> > >way I can reset it using something like "system("passwd")" in
> Perl/CGI ?
> > >
> > >thanks for your info,
> > >
> > >Andrew
> > >
> > >
> > >Sent via Deja.com http://www.deja.com/
> > >Before you buy.
> >
> > Try looking at poppasswd or maybe if your running FreeBSD
> > pw(8) which if your working on a localhost is more efficient.
> >

Kiel,Spock000 thanks for your reply. What is 'poppasswd' ?
I am running Sun OS 5.6.
When I run "system"passwd username"", I still need to type in
new password interactively. That is not what I want. What I want is:
I choose a password and set it as the user's password. The question is
how can I let the machine accept my chosen password without asking
stupid questions. Any idea ?

Andrew


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


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

Date: 14 Jul 2000 05:10:02 GMT
From: tadmc@metronet.com.bbs@openbazaar.net (Tad McClellan)
Subject: Re: Perl Rocks!(OT?)
Message-Id: <3bOW3R$VOA@openbazaar.net>

On Fri, 14 Jul 2000 02:15:37 +0100, Rage Matrix <Rage@matrix13.freeserve.co.uk> wrote:

>I don't know if this is off-topic for this NG,


It is not about <modules> or <tk>

I suppose it could be an <announce> (but it wouldn't be approved
'cause the moderator is a meanie and his name is hard to spell
(correctly)   :-)  :-)

You might try <moderated>, but that wouldn't be approved, because
advocacy is not allowed there (and because they are a bunch of
curmudgeons (sp?) too).

There is a mailing list for Perl advocacy though.

Since it doesn't fit into any of the other newsgroups, and
it is about the <comp>uter <lang>uage <Perl>, it is on-topic!

So let's have it...



>This was my first interview and I got the job even though I made it
>clear that I knew nothing about Perl. Working is MUCH better than
>university. I get to code all day and I actually get paid for it. Its like
>getting paid for your hobby. Awesome!


Shhhhhh.

We try to not let that get around (else there would be way more
competition (and competition is bad if you happen to be a
competitor)).


>Anyway, I have come to the conclusion that Perl ROCKS!


That's not going to get a rise out of anyone here.

Try it in the Python newsgroup  ( just kidding! )


>I don't see much
>point in using it on a non-UNIX based machine,


Eh?

The more crippled the machine, the more tools you need (because
they are not provided).

Perl is good for writing tools (http://language.perl.com/ppt/).

Folks on non-Unix systems need Perl *more* than Unix(ites?) do.


>but the language integrated
>so well with Linux and I LOVE it!


Bwwhaahaa.

Another convert to the (one of many) True Way.


>I always considered UNIX OS's to be less
>of a technology and more of an art form and Perl simply makes this art form
>a richer experience.


We already know that here   :-)


>I just wanted to tell the world that!


Using Perl makes me shake my head in wonderment at what can be
done in relatively little time.

It does this to me often.

Must be that I have some of Larry's third virtue going there...

(see the end of:      perldoc perl)



>BTW, as I have never posted to this NG before,


You really should lurk for a while before posting.


>The motto that I have learnt so far is: Never assume anything. (This is
>regarding bugs in Perl programs).


Make sure you always do these two (three if doing CGI) things:

1) enable warnings with -w

2) use strict;

3) enable taint checking with -T


>Sorry for the rant, but I'm very happy with working with Perl!!
 

Shhhhhh. There you go again. Come on man, you'll give it away...


>Jonathan M Baker
>Software Engineer, Semantico Ltd (www.semantico.com)
 ^^^^^^^^^^^^^^^^^


That sure sounds a lot better than "Student".

Congratulations!


--
Looking back on what I wrote, I get the
(feeling that (I've been doing too (much scheme (programming lately))))
:-(


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

Date: 14 Jul 2000 14:20:02 GMT
From: mjcarman@home.com.bbs@openbazaar.net (Michael Carman)
Subject: Re: Perl Rocks!(OT?)
Message-Id: <3bOkJ7$X5n@openbazaar.net>

Rage Matrix wrote:
>
> I have come to the conclusion that Perl ROCKS! I don't see much
> point in using it on a non-UNIX based machine, but the language
> integrated so well with Linux and I LOVE it!

Hmm. Perl isn't 'integrated' with Linux, it's been ported to it, and to
damn near every other OS out there. With a few exections, most of its
features behave identically regardless of platform. This is one of
Perl's great strengths. Know it. Love it.

> [...] how many programmers here work solely with Perl

I work in Perl, Ada, C, a few other scripting languages peculiar to
specific applications, and will need to learn some Python soon.
(*ducking*) It's all about which tool fits the task at hand.

> and do most of you use it primarily on UNIX/Linux systems or Win32?

I try to write scripts that will run anywhere. :) The exception is quick
scripts to automate a tedious *nix or Win* task.

> How long did you code in Perl before you became quite proficent in
> it?

Aw, heck, I'm still learning. I *thought* I was pretty decent after six
months. I was a crude hack then. (I like to think of myself as an
elegant hack now.)

> How important is in-depth knowledge of UNIX regarding your proficieny
> in Perl?

Of Unix? Not much, I think, but a familiarity with *using* Unix (as
opposed to in-depth knowledge of it's inner workings) is very helpful in
accelerating the learning curve. Perl seems much more intuitive if
you're accustomed to mucking about from a shell prompt.

> Is the mindset for Perl different from OO languages like C++ and
> Java? i.e. Is there a different logic that helps you solve Perl
> problems faster?

I'm not really qualified to comment on this as I don't work with C++ or
Java, but to generalize it to any old language: Yes, there is a
different approach to doing things in Perl, due to the different
features of the language. e.g. a transitioning C programmer tends to
write loops like this:

for (my $i=0; $i <= $#array; $i++) {}

while a Perler writes:

foreach my $i (0 .. $#array) {}

or more likely:

foreach my $elem (@array) {}

And of course those C guys keep trying to think of strings as arrays of
characters... :)

> The motto that I have learnt so far is: Never assume anything. (This is
> regarding bugs in Perl programs).

Get friendly with -w, use strict, and perl -d.

Oh, and welcome to the Dark Side.

-mjc


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

Date: 17 Jul 2000 13:40:01 GMT
From: nobody@contract.Sun.COM.bbs@openbazaar.net (Nobody)
Subject: Re: Perl Rocks!(OT?)
Message-Id: <3bRDf2$Tjh@openbazaar.net>

In article <396F18B7.3950FF6F@home.com>,
Michael Carman  <mjcarman@home.com> wrote:
>Rage Matrix wrote:
>> [...] how many programmers here work solely with Perl
>
>I work in Perl, Ada, C, a few other scripting languages peculiar to
>specific applications, and will need to learn some Python soon.
>(*ducking*) It's all about which tool fits the task at hand.
>

Wow, someone else who knows Perl and Ada!  I thought I was the only one,
since most people look at me funny a go "Huh?" when I mention Ada (I
used to program tanks in a former life :-)

>> How long did you code in Perl before you became quite proficent in
>> it?
>
>Aw, heck, I'm still learning. I *thought* I was pretty decent after six
>months. I was a crude hack then. (I like to think of myself as an
>elegant hack now.)
>

Every time I start to consider myself an 'expert', I read something in this
group that makes me feel like a newbie again.  Some of these folks are simply
Perl deities :-)


>> Is the mindset for Perl different from OO languages like C++ and
>> Java? i.e. Is there a different logic that helps you solve Perl
>> problems faster?
>
>I'm not really qualified to comment on this as I don't work with C++ or
>Java, but to generalize it to any old language: Yes, there is a
>different approach to doing things in Perl, due to the different
>features of the language. e.g. a transitioning C programmer tends to
>write loops like this:
>

Having worked with all of the above, I agree that there are different
approaches to take.  I have found that Perl (with the advent of version
5) lends itself quite nicely to the OO design model.


Anita


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

Date: 17 Jul 2000 16:20:02 GMT
From: sturdevr@yahoo.com.bbs@openbazaar.net (BobS)
Subject: perl/ftp/iis help needed
Message-Id: <3bRI14$W1a@openbazaar.net>

Hi all,

 I have a problem that seems related to IIS4. I'm using perl and the
NET::FTP module to move files from several clients to the IIS4 server and
return other files. For reasons of legacy code, only one client can access
the server at a time. To control access to the server, I have worked out a
simple (I thought) protocol whereby a control file is placed on the server
whenever it is busy. Absence of the control file indicates the server is
avail for anonymous transfers. I use $ftp->size to determine whether the
control file is present on the server.

Initial transfers for the first client work fine. But then I get an unusual
response. The normal file size is 24 bytes which is correctly reported when
the file is located in the folder on the server. However, if the file is
removed (by the administrator) to the recycle bin, I still get a file size
of 8 bytes. I assume this has to do with cacheing of filehandles on IIS4 but
I can't locate any specific references. Anyway, the script thinks the file
is still there and further access is denied. Also, if the administrator then
tries to empty the recycle bin, an Access Denied results until the server is
rebooted.

I don't know if this is an IIS, perl, or headspace problem. Any ideas,
workarounds, etc. will be appreciated. TIA


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

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 3724
**************************************


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