[13739] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1149 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 22 07:05:27 1999

Date: Fri, 22 Oct 1999 04:05:09 -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: <940590309-v9-i1149@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 22 Oct 1999     Volume: 9 Number: 1149

Today's topics:
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
    Re: Archive (Anno Siegel)
    Re: At the risk of making myself an idiot ...How to cre c_j_marshall@my-deja.com
    Re: At the risk of making myself an idiot ...How to cre <genlabs@gmx.net>
    Re: chomp() nested in split() doesn't work - why? (Anno Siegel)
        crypt function <techam@tm.net.my>
    Re: Examining Win32 processes <carvdawg@patriot.net>
        gd.pm 1.19 <gcaraballo@cajasegovia.es>
        How to round a number? <fyd@u-picardie.fr>
    Re: How to round a number? <donnywi@earthlink.net>
    Re: Ignore the idiots (A.J. Norman)
    Re: in need of example... (Anno Siegel)
    Re: Language resource / module (Bianka Martinovic)
    Re: Mail::Send module doesn't work on NT <greenej@my-deja.com>
        Need for Speed - Perlcompiler? (EED)
    Re: newbie problem writing/reading a file <Rik@fast-speed.demon.nl>
    Re: NTRegSetKeySecurity <carvdawg@patriot.net>
    Re: Perl parser / brackets in C language sintes@my-deja.com
    Re: Reference challenge <jeffp@crusoe.net>
    Re: SGML/HTML parsing tool (Christopher R. Maden)
        Using "use strict" and "Getopt" together c_j_marshall@my-deja.com
    Re: Using Modules (Bart Lateur)
    Re: Very New Perl User question (Bart Lateur)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 22 Oct 1999 10:24:01 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage940587841.1042@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 18 Aug 1999

[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last major update of the Perl FAQ was in Summer of
1998; of course, ongoing updates are made as needed. ]

For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).

    http://www.cpan.org/doc/FAQs/

Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.

    perldoc perlfaq
    man perlfaq

If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.

If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.

    http://www.cpan.org/
    http://www.perl.com/CPAN/
    http://www.cpan.org/doc/FAQs/FAQ/html/
    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/

You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)

    California     ftp://ftp.cdrom.com/pub/perl/CPAN/
    Texas          ftp://ftp.metronet.com/pub/perl/
    South Africa   ftp://ftp.is.co.za/programming/perl/CPAN/
    Japan          ftp://ftp.dti.ad.jp/pub/lang/CPAN/
    Australia      ftp://cpan.topend.com.au/pub/CPAN/
    Netherlands    ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
    Switzerland    ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
    Chile          ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/

If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.
Another possibility is to use one of the FTP-via-email services; for
more information on doing that, send mail to <mail-server@rtfm.mit.edu>
(not to me!) with these lines in the body of the message, flush left:

    setdir usenet-by-group/news.announce.newusers
    send Anonymous_FTP:_Frequently_Asked_Questions_(FAQ)_List

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.

Have fun with Perl!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/


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

Date: 22 Oct 1999 09:57:35 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Archive
Message-Id: <7upcef$pg6$1@lublin.zrz.tu-berlin.de>

Jonathan Stowe  <gellyfish@gellyfish.com> wrote in comp.lang.perl.misc:
>scgilbert@my-deja.com wrote:
>> Is there a searchable archive of the messages in this news group? I'd
>> hate to ask a question that's been covered before.
>> 
>
><snip>
>
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.
>
>Beats me I never heard of such a thing ...

But let's no forget to applaud the laudable intention...

Anno


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

Date: Fri, 22 Oct 1999 10:07:14 GMT
From: c_j_marshall@my-deja.com
Subject: Re: At the risk of making myself an idiot ...How to create files in Perl ?
Message-Id: <7upd0h$k9c$1@nnrp1.deja.com>


> Yeah, I admit that. I like Rich Tennant's sense of humor and I know
about
> Camel. Hard to get in German.

Its definitely available in German - there's quite a copies few kicking
around here (I work in Frankfurt).

Try www.amazon.com

Oh and I recommend O"Reillys Perl Cookbook too because I find it dead
useful.


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


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

Date: Fri, 22 Oct 1999 12:22:36 +0200
From: "make@money.com" <genlabs@gmx.net>
Subject: Re: At the risk of making myself an idiot ...How to create files in Perl ?
Message-Id: <940587751.497058@news.vbs.at>


Craig Berry <cberry@cinenet.net> schrieb in im Newsbeitrag:
s0vb2a37r0184@corp.supernews.com...
> paranoid (genlabs@gmx.net) wrote:
> : Craig Berry <cberry@cinenet.net> schrieb in im Newsbeitrag:
> : s0uk275er0159@corp.supernews.com...
> : > paranoid (genlabs@gmx.net) wrote:
> : > : Ì hope anyone of you can answer my question,
> : > : and mildly ignore it's dumbness .
> : >
> : > If and only if you pledge never to place an apostrophe in possessive
> : > 'its', ever again, so long as you shall live.
> :
> : Excuse me ? Is this comp.lang.perl.misc ? I'm relieved , for a moment I
> : thought it was
> : alt.languages.english.grammar . Arrogancy could be taken for a lack of
> : self-esteem...
>
> Not arrogance, frustration.  If English is not your first language, I
> apologize.  But this simple mistake is becoming infuriatingly common.  I
> did try to phrase my comment in an amusing way.  Sorry it didn't come
> across as intended.

Apology accepted , Macho law prohibits me from admitting I was wrong.


> : > So why haven't you fixed that?  The Llama is the universally
recommended
> : > perl-for-beginners book, and the Camel is the essential reference for
all
> : > of us.  You're doing yourself a grave disservice by trying to code
using a
> : > book which proudly proclaims that it considers you to be a dummy for
> : > having bought it.
> :
> : Yeah, I admit that. I like Rich Tennant's sense of humor and I know
about
> : Camel. Hard to get in German.
>
> Judging from your posts, your English is good enough to benefit from the
> English-language editions.
>
> : > : Can you create files from a Perl script ? If the answer is yes,
what's
> : > : the command and syntax ?
> : >
> : > perldoc -f open
> :
> : That's the syntax ? I think I'll better read the manual before I use
that
> : line in my script !
>
> No, that's where to find a description of the syntax, which will be (a)
> less error-prone than something I type or cut-and-paste here, and (b) lead
> you to other similar resources currently on your hard drive.

Thanks for the help.

> --
>    |   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: 22 Oct 1999 10:58:45 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: chomp() nested in split() doesn't work - why?
Message-Id: <7upg15$pj9$1@lublin.zrz.tu-berlin.de>

Ala Qumsieh  <aqumsieh@matrox.com> wrote in comp.lang.perl.misc:

[...]

>Contrary to the behaviour of chop(), chomp() does NOT return the
>variable after chomp()ing.

Neither does chop().

Anno


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

Date: Fri, 22 Oct 1999 18:40:54 +0800
From: "Mohd Idaham" <techam@tm.net.my>
Subject: crypt function
Message-Id: <7updtd$8v2$1@news5.jaring.my>

Hi everyone,
Below is a part of my perl program:

$salt = substr($etcpasswd, 0, 2);
if (crypt($userentered, $salt) ne $etcpasswd) {
        die "Sorry...\n";
  } else {
    print "ok\n";
}

This program will compare the entered password and the password inside
/etc/passwd. Eg: Assume the /etc/passwd value is hello99.
If user entered hello99123 or hello99bla..bla... the program will accept and
print ok.

Can anybody tell me why and how to overcome this.

Thank you in advance.

--------
Idaham




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

Date: Fri, 22 Oct 1999 06:09:25 -0400
From: "Harlan Carvey, CISSP" <carvdawg@patriot.net>
Subject: Re: Examining Win32 processes
Message-Id: <381037D5.8D90C64F@patriot.net>


Kiram,

Go to:

http://www.generation.net/~aminer/Perl/

Carv



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

Date: Tue, 19 Oct 1999 18:41:44 +0200
From: "Gregorio Caraballo" <gcaraballo@cajasegovia.es>
Subject: gd.pm 1.19
Message-Id: <7ui6u1$adi$1@talia.mad.ttd.net>

Where can I get the old version of GD (1.19) for WinNT?

Thank you




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

Date: Fri, 22 Oct 1999 12:12:53 -0700
From: Francois Dupradeau <fyd@u-picardie.fr>
Subject: How to round a number?
Message-Id: <3810B735.41C6@u-picardie.fr>

Dear All,

Is there a function in Perl to round off the 2nd or the thrird (or the
5th, etc...) number after the decimal point of a number?
ex:
3.123456789 => 3.123 (WITHOUT exponential)

Thanks
Regards
Francois

-- 
Francois Dupradeau
   ------------ 
Faculte de Pharmacie
1, rue des Louvels
80037 Amiens Cedex
France
   ------------ 
Tel 33 (0)3 22 82 74 94
Fax 33 (0)3 22 82 74 69
Email fyd@u-picardie.fr


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

Date: Fri, 22 Oct 1999 05:48:44 -0500
From: Donny Widjaja <donnywi@earthlink.net>
Subject: Re: How to round a number?
Message-Id: <3810410C.A3D48110@earthlink.net>

You can use sprintf or printf.

for example: 
  $number = 3.123456;
  $a = sprintf("%.2f", $number);
  print "Rounded: $a";

The result is:
  Rounded: 3.12
  


Francois Dupradeau wrote:
> 
> Dear All,
> 
> Is there a function in Perl to round off the 2nd or the thrird (or the
> 5th, etc...) number after the decimal point of a number?
> ex:
> 3.123456789 => 3.123 (WITHOUT exponential)
> 
> Thanks
> Regards
> Francois
> 
> --
> Francois Dupradeau
>    ------------
> Faculte de Pharmacie
> 1, rue des Louvels
> 80037 Amiens Cedex
> France
>    ------------
> Tel 33 (0)3 22 82 74 94
> Fax 33 (0)3 22 82 74 69
> Email fyd@u-picardie.fr



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

Date: 22 Oct 1999 10:19:24 +0100
From: nja@le.ac.uk (A.J. Norman)
Subject: Re: Ignore the idiots
Message-Id: <7upa6s$1v9kp@harrier.le.ac.uk>

 In article <7unf70$joe$1@junior.statsci.com>, Greg Snow 
 <snow@statsci.com> wrote: 
 
 > So here seems like a good place (note these are my 
 > opinions based on reading and posting to the group, nothing 
 > official): Advice to non-expert/non-novices for posting to clpm: 
 [Snip sound advice]

 I think what's perhaps needed is a c.l.p.m. FAQ - not the huge Perl FAQ
 that Tom C used to post in chunks in a neverending cycle, but a small
 one with pointers to the Perl FAQ, perl.com and other useful sites, and
 advice similar to Greg's (post tested code, check the Perl FAQ before
 posting, give the exact text of any error messages[1][2], say what you
 think the probable cause of the problem is, etc).

 [1] "I was trying to do that thing and it said error" - a student 
 asking me what had gone wrong in a lab class involving at least half 
 a dozen programs running on three different operating systems.  

 [2] I was rung the other day by a colleague who we'll call Professor X
 to protect his identity.  He was trying to move a file to another
 directory while it was open in Word, and was getting a file sharing
 error.  He didn't actually see the error message in front of his face
 until he read it to me down the phone, and then he realised what the
 problem was without my having to tell him.
 
-- 
Andrew Norman, Leicester, England
nja@le.ac.uk || andrew.norman@le.ac.uk
http://www.le.ac.uk/engineering/nja/


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

Date: 22 Oct 1999 09:32:04 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: in need of example...
Message-Id: <7upauk$pe8$1@lublin.zrz.tu-berlin.de>

Brett W. McCoy <bmccoy@foiservices.com> wrote in comp.lang.perl.misc:

[...]

>For the benefit of writing portable (and secure) code, using the Perl
>supplied functions (or modules, if your an OOP geek :-) ) is safer.  What
                        ^^^^^^^             ^^^

What do modules have to do with objects?  You can have one, the other,
or both independently.

Anno


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

Date: 22 Oct 1999 09:02:19 GMT
From: blackbird@dortmund.crosswinds.net (Bianka Martinovic)
Subject: Re: Language resource / module
Message-Id: <7up96r$i$5@penthesilea.Materna.DE>

In article <7unsag$cd6$1@gellyfish.btinternet.com>, 
gellyfish@gellyfish.com says...
>
>There was an article by Sean M. Burke and Jordan Lachler in issue #13
>of The Perl Journal about localizing Perl programs - well worth a look
>if you are engaged in this stuff - you can order back issues at :
>
Thank you. I've tried to register to the Perl Journal, but I retrieve a 
'no response' message. I'll try again later.

Bye, 
Bianka
-- 
Jede Epoche der Menschheit hat so ihre Plagen: Heuschreckenschwaerme
   im Altertum, die Pest im Mittelalter, Microsoft in der Neuzeit.
  /\_/\
 ( o.o )        eMail: blackbird@dortmund.crosswinds.net
  > ^ <



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

Date: Fri, 22 Oct 1999 09:03:12 GMT
From: JAG <greenej@my-deja.com>
Subject: Re: Mail::Send module doesn't work on NT
Message-Id: <7up98g$hur$1@nnrp1.deja.com>

In article <380FA0C0.9320599C@compaq.com>,
  Abdoulaye Fofana <abdoulaye.fofana@compaq.com> wrote:
> I've tried to use the  "Mail::Send"  module to send a mail message
> programmatically in Perl on NT, but it gives an error
> message from the Mailer.pm module : "No mailer type specified (and no
> default available), thus can not find executable program."
> Does anybody know any other  mail module for Perl on NT or a way to
> programmatically send a mail with Perl on NT.
>
> Thanks in advance,
>
> --
> Abdoulaye Fofana
> Compaq Computers
> Email:   abdoulaye.fofana@compaq.com
> Tel:     408-285-2174
> Fax:     408-285-6230
>
>

If you read the ActiveState FAQ, it tells you that you need a command
line tool for sending mail from WinNT. I recommend that you get a copy
of BLAT from Tim Charron at http://www.interlog.com/~tcharron/blat.html

After you've installed and configured BLAT (about 2 minutes), just
modify your script to write the mail to a temporary file and use a
system() call or backticks to launch BLAT.
--
# James Greene - Informatics Consulting - D-79539 Loerrach, Germany
# http://www.informatics-consulting.com


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


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

Date: Fri, 22 Oct 1999 12:00:26 +0200
From: "Bernd Kronmueller (EED)" <Bernd.Kronmueller@eedn.ericsson.se>
Subject: Need for Speed - Perlcompiler?
Message-Id: <381035BA.3E0743FA@eedn.ericsson.se>

Hello,

we are developing a quite big Perl application and now we slowly run
into speed problems. Things take too long. Is there anything like a Perl
compiler and has anybody experience with it?
We tried already several conventional ways to improve the code but it
simply grows to large. So the possibility is a compiler or rewirting
pieces in C. Is there any profiling function in Perl which gives the
times a single subroutine takes so we can identify the important parts?

Thanks,
    Bernd



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

Date: Fri, 22 Oct 1999 11:45:12 +0200
From: Rik Driever <Rik@fast-speed.demon.nl>
Subject: Re: newbie problem writing/reading a file
Message-Id: <bjB$2DAoIDE4IwRD@fast-speed.demon.nl>

Hi all,

As I said in my first posting here, I'm completely new to Perl.
The code shown below IS my *real* code, and if you say that it won't
compile...I believe you!
All I did, was upload the code to my cgi-bin directory and test it, but
I get errors, so now I want to know what I'm doing wrong. 

>open(MYFILE, >>$file);
Why is this wrong? Because of the space? According to a tutorial this
would be the code for appending to a file...right?

>#!/usr/local/bin/perl
Why add -w? What does it do?

>use strict; 
What does it? Why use it?

I think you all will have a good laugh at me, because this will seem
rather stupid, but I have know idea where to find awnsers on questions
like this, so I hope someone will be so kind to awnser my questions, so
I can upload a code that actually works.

Greetings Rik Driever.





In article <s0uine5gr0160@corp.supernews.com>, Craig Berry
<cberry@cinenet.net> writes
>Rik Driever (Rik@fast-speed.demon.nl) wrote:
>: OK I will:
>: 
>: #!/usr/local/bin/perl
>
>No -w?  No use strict?
>
>: #This code is for appending the values to the file 
>: $file = 'score.txt';            
>: open(MYFILE, >>$file);          
>
>That doesn't even compile!  You're cheating.  Show us your *real* code.
>

-- 
Rik Driever


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

Date: Fri, 22 Oct 1999 06:14:21 -0400
From: "Harlan Carvey, CISSP" <carvdawg@patriot.net>
Subject: Re: NTRegSetKeySecurity
Message-Id: <381038FD.C6F8E865@patriot.net>

Go to:

http://www.roth.net

Get Win32::Perms

Matthew McInerney wrote:

> Hi
>
> Does anyone know of any sample code or how to correctly fill the values that
> the NTRegSetKeySecurity routine uses.
>
> Thanks
> Matt McInerney



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

Date: Fri, 22 Oct 1999 09:01:07 GMT
From: sintes@my-deja.com
Subject: Re: Perl parser / brackets in C language
Message-Id: <7up94i$hn8$1@nnrp1.deja.com>

I agree to clean first the code by indent.


PCCTS is a utility for creeating compiler.
My idea was to modified the C grammar in order to impose to
add bracket as it done in perl language.

you can find a tutorial  about PCCTS on:
http://min.ecn.purdue.edu/~rfisher/Tutorials/PCCTS/

In article <QMHP3.26013$E_1.1382585@typ11.nn.bcandid.com>,
  kragen@dnaco.net (Kragen Sitaker) wrote:
> In article <7umcco$fih$1@nnrp1.deja.com>,  <sintes@my-deja.com> wrote:
> >In article <%VHO3.14408$E_1.848528@typ11.nn.bcandid.com>,
> >  kragen@dnaco.net (Kragen Sitaker) wrote:
> >> You might be able to get away with a half-assed implementation if
you
> >> run the C code through "indent" first.  (Assuming "indent"
understands
> >> your code correctly; it may not.)
> >
> >I think that indent do not have option that allows to add bracket.
>
> It doesn't.  But parsing "indent" output might be easier than parsing
> arbitrary C code.  YMMV, I haven't tried it.
>
> >I thought about using PCCTS with modifying the  grammar of C language
> >but it is too complex for this kind of operation.
>
> What's PCCTS?
> --
> <kragen@pobox.com>       Kragen Sitaker
<http://www.pobox.com/~kragen/>
> Tue Oct 19 1999
> 21 days until the Internet stock bubble bursts on Monday, 1999-11-08.
> <URL:http://www.pobox.com/~kragen/bubble.html>
>


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


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

Date: Fri, 22 Oct 1999 06:53:09 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Reference challenge
Message-Id: <Pine.GSO.4.10.9910220649400.15158-100000@crusoe.crusoe.net>

On Oct 22, Sean McAfee blah blah blah:

> Because it fails if I pass it, say, the string "ARRAY(0xfffff)".

Fine.  Then perhaps THIS regex shall pass the test.

  sub realref {
    my $obj = shift;
    my $type = ref $obj;
    return unless $type =~ /./;
    $obj =~ s/^\Q$type=//;
    ($obj =~ /([A-Z]+)\(0x[a-f0-9]+\)\z/)[0];
  }

-- 

  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: Fri, 22 Oct 1999 03:27:07 -0700
From: crism@exemplary.net (Christopher R. Maden)
Subject: Re: SGML/HTML parsing tool
Message-Id: <crism-2210990327070001@pm3b-18.meer.net>

In article <slrn80rejk.fji.abigail@alexandra.delanet.com>,
abigail@delanet.com wrote:
> Christopher R. Maden (crism@exemplary.net) wrote on MMCCXLI September
> MCMXCIII in <URL:news:crism-2010990243160001@pm3b-12.meer.net>:
> ;; Have you tried HTML::Parser for parsing HTML?
> 
> Yes, I have. It's about as useful for parsing HTML as a table is
> to do shopping with.
> 
> HTML::Parser doesn't parse, nor does it have any HTML knowledge.

Yeah, and you're a cranky geezer.  It's still useful.  In fact, its
non-parser status is helpful, since most HTML out there is such crap that
it doesn't parse cleanly, and an ad-hoc event thrower is in many ways more
useful.  At O'Reilly, I used it to clean up the crap spewed by
FrameMaker+SGML, to check links for CD-ROMs, and to mangle stuff into the
Rocket e-Book format.

It'll do what the original poster *really* wants (if he uses it
correctly), though not fulfilling the letter of his request.

-Chris
-- 
Christopher R. Maden, Solutions Architect
Exemplary Technologies
One Embarcadero Center, Ste. 2405
San Francisco, CA 94111


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

Date: Fri, 22 Oct 1999 10:25:21 GMT
From: c_j_marshall@my-deja.com
Subject: Using "use strict" and "Getopt" together
Message-Id: <7upe2g$l0d$1@nnrp1.deja.com>

Hi,

I've been perling for a couple of years now - and I try to be a good boy
and use 'use strict' all the time.

But for the life of me I have been unable to get a clean compile and
working code whenever I use the Getopt module (which I am fairly reliant
on).

The only clean compile I have managed is below - but it seems to lose
the value of the option for me.

Any ideas ?

(p.s. extra bonus points if you manage not to use the word 'lexical' in
the answer :-)

Cheers
Chris


#!/dvlp/gnu/SunOS5/perl/V5.004/bin/perl -w

use Getopt::Std;

use strict;
use diagnostics;

my $opt_d = "";

if (!getopts('d:'))
{
        print "Usage: UserGroup.pl -d\n";
        print "       -d Do something clever and useful.\n";
}

print "opt_d:$opt_d:\n";


And when I run it:

% ./Test.pl -d fred
opt_d::






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


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

Date: Fri, 22 Oct 1999 10:12:15 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Using Modules
Message-Id: <38122bb5.2007783@news.skynet.be>

Samay wrote:

>Sometime..I want to use module to see how it works, and there are no
>simple ways I can find that out..
>Included in Perl Core Distribution from ActiveX, the XML modules are
>like that..
>One simple example how to use it would be suffice..
>thanks..

The modules should all include documentation, with at least one tiny
example. On Activestate, try finding the HTML file for the module. YOu
can also, at the command line, type

	perldoc Foo::Bar

to see the docs for the module Foo::Bar (file "Foo/Bar.pm"). You can
redicrect to a text file for easier reading.

Furthermore, virtually all module distributes include some "regression
test scripts", which serve to test that the modules work properly with
your version of Perl. The extension is "*.t". Looking at the source for
those test scripts should give you some clue, too.

   HTH,
   Bart.


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

Date: Fri, 22 Oct 1999 10:12:20 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Very New Perl User question
Message-Id: <381934e8.4362582@news.skynet.be>

kennedyjd@my-deja.com wrote:

>The problem is that if I assign $Host with a IP address, it works, yet
>in the current state $Host and $name are blank.
>
>Thoughts?

Is you $ENV{REMOTE_ADDR} environmet variable even set? Try printing it
out to the browser, you'll soon know.

-- 
	Bart.


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

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


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