[13857] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1267 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 3 15:06:05 1999

Date: Wed, 3 Nov 1999 12: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: <941659524-v9-i1267@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 3 Nov 1999     Volume: 9 Number: 1267

Today's topics:
    Re: "Argument" I don't understand <rootbeer@redcat.com>
    Re: "Argument" I don't understand (Kragen Sitaker)
    Re: -w (David H. Adler)
    Re: -w (Greg Bacon)
    Re: about perl/tk <aqumsieh@matrox.com>
        and since you seem to know your way about... <reembar@hotmail.com>
    Re: Another 'or'? was [perl double-split] <ltl@rgsun5.viasystems.com>
    Re: Can I send SMS messages from Perl script? <rootbeer@redcat.com>
    Re: comparing text with words <aqumsieh@matrox.com>
    Re: comparing text with words <uri@sysarch.com>
    Re: comparing text with words (Abigail)
    Re: comparing text with words <lr@hpl.hp.com>
        Convert Text into Table <rmaddali@us.oracle.com>
    Re: core dump - perl, me or server? (Kragen Sitaker)
    Re: Determining Open Mode <james.p.williams@usahq.unitedspacealliance.com>
        Dos box when running perl CGIs semiel@usa.net
    Re: Easy question about $FORM{'data'} variables (Tad McClellan)
    Re: Extracting just the date from a string (Kragen Sitaker)
    Re: FAQ 8.45: How do I install a module from CPAN? (Guenther)
    Re: FAQ 8.45: How do I install a module from CPAN? <rootbeer@redcat.com>
        HELP-- $otherlibdirs during install <tobiasly@my-deja.com>
    Re: How can I set reg. expresion to anchor at the end o (Craig Berry)
    Re: How do I create a library file of subroutines? (Salem Lee Ganzhorn)
    Re: How to execute pattern match command at Unix prompt (Tad McClellan)
    Re: Is there a *wildcard that I can use to match text? (Kragen Sitaker)
    Re: Limit of Win32::GetTickCount (Kragen Sitaker)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 3 Nov 1999 09:22:16 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: "Argument" I don't understand
Message-Id: <Pine.GSO.4.10.9911030912460.29670-100000@user2.teleport.com>

On Wed, 3 Nov 1999, Patrick Smith wrote:

> #/usr/sbin/perl5.003 -w

Hmmm. That's not a #! line. Perl isn't normally stored in the /usr/sbin
directory, but I suppose it could be. And 5.003 is an old version which
should probably be replaced for security reasons. But I'm glad to see that
you're using -w.

> use diagnostics

No semicolon? Perhaps you should cut-and-paste, rather than retype.

> #begin
> 
> #opens test data
> open(IN, "/usr2/people/patrick/test4result.dat")
>      or die "Cannot open input: $!\n";
> 
> #applys data file to array
> @data=<IN>;
> close IN;
> 
> #sorts array of test data
> @srtedarray = sort{(split/''/,$a)[0]<=>(split/''/,$b)[0]}@data;

I'd probably call the variable @sorted_array (or something better). And
you may benefit from the Schwartzian Transform here. Also, that's an
unusual pattern to split upon, but it may be what you want.

> #opens out file
> open(OUT, ">/usr2/people/patrick/sorted_test4data.dat")
>      or die "Cannot open OUT: $!\n";
> 
> #prints sorted test array to file
> print OUT "@sortedarray";

You don't normally want quote marks around an array whose elements contain
newlines. 

> Argument "260.056 09-17-99 01:20:00 ..." isn't numeric in ncmp at line
> ...etc.

Yes, you're using a numeric comparison. But that's a pretty funny-looking
"number", isn't it? Maybe you meant to use a string comparison, or to
split your data differently. In fact, you may want a multi-level sort. Of
course, comparing dates and times is generally better done with the help
of a module; some good ones are available from CPAN.

> Oh, one other thing, in my output file using my real data set the
> first line is all the way to the left margin, however the following
> lines are indented by one space.
>  Why would this be happening?

Quote marks around an array whose elements include newlines, as above.

Good luck with it!

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



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

Date: Wed, 03 Nov 1999 18:21:57 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: "Argument" I don't understand
Message-Id: <93%T3.25192$23.1296575@typ11.nn.bcandid.com>

In article <38205C28.31DF@ocg6.marine.usf.edu>,
Patrick Smith  <patrick@ocg6.marine.usf.edu> wrote:
>I am using this little script to sort an array. I have included
>a sample data set.

Thank you very much for reposting without MIME.

Good -w and diagnostics; you could use strict with a few minor changes.

>open(IN, "/usr2/people/patrick/test4result.dat")
>     or die "Cannot open input: $!\n";

Good!

>#sorts array of test data
>@srtedarray = sort{(split/''/,$a)[0]<=>(split/''/,$b)[0]}@data;

Here you're using a pattern consisting of two apostrophes for your
field delimiter.  My guess is that you didn't mean to do that, because
there are no apostrophes in your input data.

If you want to split on whitespace, use /\s+/ instead.

If this turns out to be too slow after you get it working, come back
and we can show you how to make it much faster.

>print OUT "@sortedarray";

Note that "@sortedarray" expands to a string consisting of the elements
of @sortedarray with one space separating adjacent elements.  This
means there is a space between the first and second line, between the
second and third line, etc.

>It works just fine with the exception of the following argument for each
>line of data.
>
>Argument "260.056 09-17-99 01:20:00 ..." isn't numeric in ncmp at line
>...etc.
>
>This array as you can see has nothing but numbers in it. Any ideas as to
>why I am getting this Argument?

An argument is something you're applying a function to.  In this case,
the function is numeric compare, <=>, and the arguments are the results
of your calls to split.  Since split doesn't find any occurrences of
its delimiter in the input data, it returns the whole line as a single
element, so the whole line is the argument.

The numeric compare operator will happily convert the lines to numbers
for comparison by parsing the first number, which is why it works at
all, but it is warning you that it couldn't parse the whole thing as a
number.  This behavior masks the failure of split mentioned above.

So if you fix your split, this warning will go away.

>Oh, one other thing, in my output file using my real data set the
>first   line is all the way to the left margin, however the following
>lines are  indented by one space.
> Why would this be happening?

See explanation above about @sortedarray.

Hope this helps.  Good luck!
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: 3 Nov 1999 13:06:01 -0500
From: dha@panix.com (David H. Adler)
Subject: Re: -w
Message-Id: <slrn820uc8.hlc.dha@panix.com>

On 3 Nov 1999 11:24:04 GMT, Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>David H. Adler <dha@panix.com> wrote:
>> 
>> *I* was lucky enough to be of legal drinking age at 18... for about 3
>> months.  Then they changed the law on me.  Scum.  :-/
>> 
>
>Born in the wrong continent ....

Nah, just went to university in the wrong continent... :-)

Mind you, I was talking about being of legal drinking age.  I said
nothing about the actual *drinking*.  :-)

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
* Nathan_Roberts screams out loud, "IS THIS ENTIRE CHANNEL COMPOSED
   OF BOTS?!?!?"
<TheProf> Kill the human.         - from the #drwhochat Quotefile
                         <http://www.crl.com/~nathanr/quote.html>


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

Date: 3 Nov 1999 20:00:26 GMT
From: gbacon@ruby.itsc.uah.edu (Greg Bacon)
Subject: Re: -w
Message-Id: <7vq48q$d6l$2@info2.uah.edu>

In article <MPG.1287a5dc7c6f70af98a171@nntp.hpl.hp.com>,
	Larry Rosler <lr@hpl.hp.com> writes:

: 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.

Anyone who may legally possess firearms and anyone who might be
compelled to go fight a war certainly deserves the occasional beer or
seven.  Don't you know that half (nay, three-quarters) of the fun of
Perl people gatherings is getting sloshed together? :-)

Greg
-- 
If my children will live a better life than I did by my getting brain damage,
by my being brain dead then let it be.
    -- Mike Tyson


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

Date: Wed, 3 Nov 1999 13:42:07 -0500 
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: about perl/tk
Message-Id: <x3y4sf3to1t.fsf@tigre.matrox.com>


chao98@my-deja.com writes:

>   I have heard about Perl/Tk. It is said can be
> used for GUI programming like Tcl/Tk. When I look
> it up in www.perl.com/CPAN, I can't find the
> module with exactly the same name. Could any one
> tell me which module should I download?

The module is called 'Tk' only. The latest version can be found at:

http://cpan.valueclick.com/authors/id/NI-S/

HTH,
--Ala



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

Date: Wed, 03 Nov 1999 20:01:21 +0200
From: Re'em Bar <reembar@hotmail.com>
To: rootbeer@redcat.com
Subject: and since you seem to know your way about...
Message-Id: <38207871.75F333EC@hotmail.com>

would you consider answering two more questions:

I want my program to create a new file on the server and then read/write
it. should it be a problem on Unix/Linux because of the permission
business? is it simpler on NT?
also,
I am doing miniature web-search engine, and want to read files from the
net to make an index. but the lines:

open(FILE,"http://www.snark.co.il/index.shtml");
@html=<FILE>;
close(FILE);

don't seem to do the trick.
have I done wrong?

I used my hotmail account to avoid the adds, but feel free to e-mail me
directly from my site, if you wish.
-- 
Re'em
http://snark.co.il


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

Date: 3 Nov 1999 18:16:51 GMT
From: lt lindley <ltl@rgsun5.viasystems.com>
Subject: Re: Another 'or'? was [perl double-split]
Message-Id: <7vpu6j$mfh$1@rguxd.viasystems.com>

Bart Lateur <bart.lateur@skynet.be> wrote:
:>Abigail wrote:

:>>Eh, no. You would get "0" back.

:>Maybe I mistyped something, or the message was lost in all the rethoric.
:>Here's a working example:

:>	$^W = 1;
:>	$caption = "0";
:>	undef $text;
:>	print $caption || $text;
:>-->
:>	Use of uninitialized value at ...

I have found it best to start with the assumption that Abigail is
right and work backwards from there.  :-)  Unless of course it has
something to do with "..."  Even then somebody (Randal?) assumed
(probably ficitiously) that it must have been a broken perl and not
an Abigail mistake.  ;-)

You snipped your original statement where you had reversed the
wings of the ||.

@@      $_ = $data{text} || $data{caption};



-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: Wed, 3 Nov 1999 09:11:56 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Can I send SMS messages from Perl script?
Message-Id: <Pine.GSO.4.10.9911030909520.29670-100000@user2.teleport.com>

On Wed, 3 Nov 1999, Marc Lambrichs wrote:

> Is it possible to send SMS messages to my cellphone from a Perl script? 

If it's possible from (pretty-much) any other programming language running
on your hardware, it's possible from Perl.

> Any examples?

Probably there are some in the documentation for the protocols used for
sending SMS messages to your cellphone. But that really doesn't have
anything to do with Perl specifically. Still, if there's a module which
does what you want, it should be listed in the module list on CPAN. If you
don't find one to your liking, you're welcome and encouraged to submit
one! :-)  

    http://www.cpan.org/

Hope this helps!

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



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

Date: Wed, 3 Nov 1999 10:56:37 -0500 
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: comparing text with words
Message-Id: <x3y66zjtvpm.fsf@tigre.matrox.com>


abigail@delanet.com (Abigail) writes:

> Ala Qumsieh (aqumsieh@matrox.com) wrote on MMCCLIV September MCMXCIII in
> <URL:news:x3yaeowucyo.fsf@tigre.matrox.com>:
> "" 
> "" I rarely see the use of y/// instead of tr/// for translation (or
> "" transliteration, but let's not start another thread about that).
> "" 
> "" I wonder why? Unix?
> 
> 
> RTFM.

heh. Finally, I got flamed by Abigail :-)

Perhaps I wasn't clear, but almost all examples in the perldocs
exclusively use the tr/// form of the transliteration operator. I know
that this is borrowed from the Unix tr() function. I also know that
the y/// form is just a synonym, and was borrowed from sed.

My question is why do people usually prefer tr/// over y///? I don't
see an answer to this in TFM. And I did RTFM .. several times.

--Ala



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

Date: 03 Nov 1999 13:03:23 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: comparing text with words
Message-Id: <x7eme78nbo.fsf@home.sysarch.com>

>>>>> "AQ" == Ala Qumsieh <aqumsieh@matrox.com> writes:

  AQ> My question is why do people usually prefer tr/// over y///? I don't
  AQ> see an answer to this in TFM. And I did RTFM .. several times.

other than for golf or obsfucation reasons, i (and i bet most others)
find tr more mnemonic than y. 

and its name is translation (regardless of what the current docs say).

as a minor perl trivia question, it is the only func with 2 different
names. i wonder if any other major language has done something like that
as a nod/concession to its ancestors and their users?

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: 3 Nov 1999 13:42:16 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: comparing text with words
Message-Id: <slrn82147r.dk.abigail@alexandra.delanet.com>

Uri Guttman (uri@sysarch.com) wrote on MMCCLV September MCMXCIII in
<URL:news:x7eme78nbo.fsf@home.sysarch.com>:
,, 
,, other than for golf or obsfucation reasons, i (and i bet most others)
,, find tr more mnemonic than y. 
,, 
,, and its name is translation (regardless of what the current docs say).
,, 
,, as a minor perl trivia question, it is the only func with 2 different
,, names. i wonder if any other major language has done something like that
,, as a nod/concession to its ancestors and their users?


Well...... not quite. It's a little known fact that certain comparison
operators can be written in all caps as well.

And there's for/foreach.



Abigail
-- 
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
          for (s;s;s;s;s;s;s;s;s;s;s;s)
              {s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Wed, 3 Nov 1999 11:51:06 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: comparing text with words
Message-Id: <MPG.128a3207e0d6c75798a19b@nntp.hpl.hp.com>

In article <x7eme78nbo.fsf@home.sysarch.com> on 03 Nov 1999 13:03:23 -
0500, Uri Guttman <uri@sysarch.com> says...
> >>>>> "AQ" == Ala Qumsieh <aqumsieh@matrox.com> writes:
>   AQ> My question is why do people usually prefer tr/// over y///? I don't
>   AQ> see an answer to this in TFM. And I did RTFM .. several times.
> 
> other than for golf or obsfucation reasons, i (and i bet most others)
> find tr more mnemonic than y. 

Exactly.

> and its name is translation (regardless of what the current docs say).

Indeed.

> as a minor perl trivia question, it is the only func with 2 different
> names. i wonder if any other major language has done something like that
> as a nod/concession to its ancestors and their users?

C:  strchr (Sys V => ANSI/ISO) and index (BSD); strrchr, rindex

Note where the Perl function names came from.  :-)

In the other direction, how about Perl having two different functions, 
each named 'select'?

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


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

Date: Wed, 03 Nov 1999 09:22:44 -0800
From: Ramesh Maddali <rmaddali@us.oracle.com>
Subject: Convert Text into Table
Message-Id: <38206F64.61378F9E@us.oracle.com>

Hi,
I am looking for a Perl WebApp Class which has a method Table or similar
that takes the data generated from a SQL statement and creates a table
with all the column headers as links so that if any column header is
clicked then the entire table should be sorted as per that column; if
clicked again on the same column it should reverse the order.

Does any one have any clue???

Thanks
Ramesh


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

Date: Wed, 03 Nov 1999 18:10:50 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: core dump - perl, me or server?
Message-Id: <KU_T3.25179$23.1295531@typ11.nn.bcandid.com>

In article <38205B2C.DCA22713@mail.ford.com>,
Richard H  <rhardicr@mail.ford.com> wrote:
>I am unfamiliar with the reasons for core dumps but the following causes
>one on our Solaris box, the eval is used other places in my code and
>works fine, what am I missing? is it a Perl problem or a server issue?

This is a problem with your perl executable (or, less likely, your OS
or server).  The problem with the perl executable might stem from a bug
in the perl source code or a bug in the compiler that was used to build it.

It is not a problem with your script.

Consider (a) building a different version of perl, or (b) building it
with different compile-time options.

Your script, btw, runs fine on my perl.

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


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

Date: Wed, 03 Nov 1999 19:18:45 GMT
From: Jim Williams <james.p.williams@usahq.unitedspacealliance.com>
Subject: Re: Determining Open Mode
Message-Id: <7vq1qi$9d5$1@nnrp1.deja.com>

In article <Pine.GSO.4.10.9911021624120.29670-
100000@user2.teleport.com>,
  Tom Phoenix <rootbeer@redcat.com> wrote:
> On Tue, 2 Nov 1999, Jim Williams wrote:
>
> > Given a filehandle, how do I tell if it was originally opened to be
> > read from, written to, both, etc.?
>
> It's much like knowing whether you may have a chocolate from the candy
> box: You should ask whoever opened it to tell you. :-)
>
> I'm actually serious.
> ...snip...
> It may be that you should rethink your program design so as to avoid
> these mystery filehandles.

Yeah, I figured it was a silly thing to do.  I'm creating a module that
represents a particular file format we use.  Such objects can be
configured to either read or write the format, but not both.  The
constructor accepts a filehandle, so I have to add another
argument, 'r' or 'w', so I know if the object is being created for
input or output.  I want to keep using filehandles here to support both
files and pipes without having to parse the file specifier myself.  I
was looking for a way to eliminate the annoying open mode argument
since it's redundant information I'm imposing on clients of the module.

I suppose I could write two modules, one for input and the other for
output.  Thanks for the kind reply.

Jim Williams


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


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

Date: Wed, 03 Nov 1999 17:24:32 GMT
From: semiel@usa.net
Subject: Dos box when running perl CGIs
Message-Id: <7vpr4c$4o8$1@nnrp1.deja.com>

Hi...
I dont know if this is the right group to ask this question but i will
give it a try:)

When running a perl cgi script in a browser (on the PC where perl is
installed of course) there is a very brief dos box opening when running
perl.exe.

The script works alright but i just wanted to know if there was a way
to prevent a dos box from opening?

Thanks for your help,
Alain.


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


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

Date: Mon, 1 Nov 1999 04:46:10 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Easy question about $FORM{'data'} variables
Message-Id: <2hnjv7.235.ln@magna.metronet.com>

John (mjh@me.com) wrote:

: For example, I need to access $FORM{'keyword_$i'} where $i is a number.


:  $currKeywords = $FORM{'keywords_$i'};
                         ^           ^

   Single quotes do not interpolate (i.e. they do not expand variables).

   Use double quotes instead.


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


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

Date: Wed, 03 Nov 1999 18:49:53 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Extracting just the date from a string
Message-Id: <lt%T3.25228$23.1300222@typ11.nn.bcandid.com>

In article <slrn820r6l.6uc.pete@theory2.phys.cwru.edu>,
Peter J. Kernan <pete@theory2.phys.cwru.edu> wrote:
>On Tue, 2 Nov 1999 08:48:48 -0800, Larry Rosler <lr@hpl.hp.com> wrote:
>.=  my ($date) = /  (.*)/;
>you may have to just a wee bit more precise in case
>
>From xyzacc@abc.com  Mon Aug  2 17:16:24 1999
>                            ^^
>is a possible data point.

No, you don't.

#!/usr/bin/perl -w
use strict;
$_ = 'From xyzacc@abc.com  Mon Aug  2 17:16:24 1999';
print /  (.*)/, "\n";

This outputs:
Mon Aug  2 17:16:24 1999

Regexes match as early as possible.  Before the Mon is earlier than
before the 2.

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


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

Date: Wed, 03 Nov 1999 18:16:18 GMT
From: nottrue@nomail.nonet (Guenther)
Subject: Re: FAQ 8.45: How do I install a module from CPAN?
Message-Id: <382075ad.3012910@news>

On 2 Nov 1999 07:04:52 -0700, Tom Christiansen
<perlfaq-suggestions@perl.com> wrote:

Hmmmmmm!
Im a totally newby on perl.
I installed ActivePerl build 522 from Activestate for win98.
Since i got an error on LWP perl module (deosnt exist in activeperl) i
d/l it on cpan and tryed to install it without success.
This is becouse there is no make.exe on the system and myby some
usefull progs to compile.
Can any say me pls how to install modules on win98 and activeperl?

Thx in advance 

>(This excerpt from perlfaq8 - System Interaction 
>    ($Revision: 1.39 $, $Date: 1999/05/23 18:37:57 $)
>part of the standard set of documentation included with every 
>valid Perl distribution, like the one on your system.
>See also http://language.perl.com/newdocs/pod/perlfaq8.html
>if your negligent system adminstrator has been remiss in his duties.)
>
>  How do I install a module from CPAN?
>
>    The easiest way is to have a module also named CPAN do it for you.
>    This module comes with perl version 5.004 and later. To manually
>    install the CPAN module, or any well-behaved CPAN module for that
>    matter, follow these steps:
>
>    1   Unpack the source into a temporary area.
>
>    2
>            perl Makefile.PL
>
>    3
>            make
>
>    4
>            make test
>
>    5
>            make install
>
>    If your version of perl is compiled without dynamic loading, then
>    you just need to replace step 3 (make) with make perl and you will
>    get a new perl binary with your extension linked in.
>
>    See the ExtUtils::MakeMaker manpage for more details on building
>    extensions. See also the next question.



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

Date: Wed, 3 Nov 1999 11:14:51 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: FAQ 8.45: How do I install a module from CPAN?
Message-Id: <Pine.GSO.4.10.9911031113310.29670-100000@user2.teleport.com>

On Wed, 3 Nov 1999, Guenther wrote:

> Can any say me pls how to install modules on win98 and activeperl?

See the Perl-for-Win32 FAQ.

    http://www.activestate.com/ActivePerl/docs/Perl-Win32/perlwin32faq.html

Cheers!

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



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

Date: Wed, 03 Nov 1999 17:29:16 GMT
From: Toby Johnson <tobiasly@my-deja.com>
Subject: HELP-- $otherlibdirs during install
Message-Id: <7vprd7$536$1@nnrp1.deja.com>

I'm trying to add some other directories to @INC during an install.
$vendorlib (set during Configure) works fine but I have several
directories and it adds only one.

The INSTALL file says that "$otherlibdirs" is a catch-all to specify a
colon-separated list of other directories to add to @INC.

But it's pretty hazy on how exactly to implement this variable. I'm
pretty new to actually building Perl; I have tried -
Aotherlibdirs='/dir1:/dir2', -Dotherlibdirs='/dir1:/dir2', and adding a
$otherlibdirs='/dir1:/dir2' line to config.sh when Configure tells me
to modify it. None of these has worked.

Any help as to how I can accomplish this?
TIA,
toby


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


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

Date: Wed, 03 Nov 1999 19:10:09 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: How can I set reg. expresion to anchor at the end of a string?
Message-Id: <s2124hq824256@corp.supernews.com>

Jong (jong@ebi.ac.uk) wrote:
: I have a string :
:   123424
: I'd like to match it to produce:
:  (12, 3424) 
: rather than (1234, 24)

#!/usr/bin/perl -w
# right4 - split string into groups of 4 chars, extras at left end.
# Craig Berry (19991103)

use strict;

my $str    = '12123412341234';
my @pieces = $str =~ /(.{1,4})(?=(?:.{4})*$)/g;

print join(':', @pieces), "\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: 3 Nov 1999 03:48:30 GMT
From: slganzho@unity.ncsu.edu (Salem Lee Ganzhorn)
Subject: Re: How do I create a library file of subroutines?
Message-Id: <7vobae$shf$2@uni00nw.unity.ncsu.edu>

Brett W. McCoy (bmccoy@foiservices.com) wrote:
: The safest way of doing this is to package things up in a Perl Module.
: This way you can create its own namespace so you don't clash with
: variables from other modules.  So you would do this:
: 
: package MyLib;
: 
: sub oftenUsed {
: 	my($this,$that);
:         do this;
:         do that;
:         return those;
: }
: 
: and so on.
: 
: Then you could stick your library in a common Perl directory where held in
: @INC, and do
: 
: use MyLib;
: 

This will not introduce anything into your namespace, you would have to access
this routine with the following syntax:
&MyLib::oftenUsed();

A nice way to trample on your main namespace is via the Exporter.pm package.
The package is documented inline, give it a read.
-- 
Salem Lee Ganzhorn... slganzho@unity.ncsu.edu


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

Date: Mon, 1 Nov 1999 04:50:59 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to execute pattern match command at Unix prompt ?
Message-Id: <3qnjv7.235.ln@magna.metronet.com>

Adrian Chin (Achin@inprise.com) wrote:

: Do you know how to execute a let's say

: /^1$/  <filename>

: at the prompt ??


      perl -ne 'print if /^1$/' <filename>


: Just like grep command ?


   My example is only "kinda like", not "just like".


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


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

Date: Wed, 03 Nov 1999 17:19:40 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Is there a *wildcard that I can use to match text?
Message-Id: <M8_T3.24697$23.1288960@typ11.nn.bcandid.com>

In article <38204118.933D142B@sympac.com.au>,
Scotty  <scotnet@sympac.com.au> wrote:
>I have a cgi perl script and i want to replace a section of HTML that is
>put in to a varible. I only want to change it if the value of another
>array is true..........    It's a bit complicated to explain fully but
>here is what I want to do.

You might indeed be better off with HTML::Parser.

>$middle_col_inputs =  "\<td align\=\"center\"\>\<input type\=\"text\"
>name\=\"$name\:\:CCCC\:\:$middle_colum_values[$mid_col_num]\:\:$price\"
>size\=\"3\" maxlength\=\"4\"\>\<\/td\>\r";
>
>How do I change say just everything between the <td> & </td>.
>
>Is there a wildcard that I can use ....... somthing like:
>$middle_col_inputs=~s/\<td align\=\"center\"\>*<\/td\>\r / \<td
>align\=\"center\"\><b\>X<\/td\>/g;

".*".  But be careful -- <td>.*</td> will match "foo</td><td>bar" if
you apply it to <td>foo</td><td>bar</td>.  .*? might be better.

You might want to switch your delimiters to something else when running
s/// on HTML.  s|(<td align="center">).*?(</td>)|$1X$2|g is more
readable than if you had to backslash all the slashes.

Backslashing all non-alphanumeric characters is the thing to do if
you're not sure if they're special characters or not, but it does make
your pattern harder to read, and isn't really necessary.

perldoc perlre may help you.  Skip most of the stuff about various
constructs beginning with (? the first dozen or so times you read it.

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


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

Date: Wed, 03 Nov 1999 18:03:09 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Limit of Win32::GetTickCount
Message-Id: <xN_T3.24935$23.1290402@typ11.nn.bcandid.com>

In article <3820683B.31D40917@mail.uca.edu>,
Cameron Dorey  <camerond@mail.uca.edu> wrote:
>Well, you could go to a 64-bit Window$ system...

Are there any?  I thought even NT for Alpha was 32-bit.

>50 days = 4,320,000,000 msec
>2^32-1 = 4,294,967,295
>2^64-1 = 1.844674407...*10^19
>
>You might also want to use Math::BigInt

Won't help, I don't think.

>Honestly, I think that there are going to be some/most/all readers here
>that are amazed that you could keep a Window$ system running
>continuously for 50 days. But that's another matter. ;)

I'm not amazed -- my Windows NT box at work is as stable as my
Solaris2.4 system at a previous job was.  (Neither approaches the
stability of my Linux system, but that's another matter.)
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

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


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