[18391] in Perl-Users-Digest
Perl-Users Digest, Issue: 559 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 24 11:05:38 2001
Date: Sat, 24 Mar 2001 08:05:13 -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: <985449912-v10-i559@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 24 Mar 2001 Volume: 10 Number: 559
Today's topics:
ANNOUNCE: CGI::Explorer V 1.12 <ron@savage.net.au>
array vs. array question <bishop@projectmagnus.org>
Re: array vs. array question <tinamue@zedat.fu-berlin.de>
Re: array vs. array question <tinamue@zedat.fu-berlin.de>
Deleting and or appending a single line in a text file <principle@seekasonic.com>
Re: Deleting and or appending a single line in a text f <tinamue@zedat.fu-berlin.de>
Re: Deleting and or appending a single line in a text f <wuerz@yahoo.com>
Re: diag question <webmaster@webdragon.unmunge.net>
Does a Perl code generator for web databases exist ? <jmatey@sarnoff.com>
Re: every 15 seconds <bigrich318@yahoo.com>
Re: every 15 seconds (Randal L. Schwartz)
Re: fetch back STDERR outputs nobull@mail.com
Re: How adding Hours & Days to current date? (Abigail)
Re: how to close() on filehandle without wait()ing? nobull@mail.com
Re: Output replication inside of DESTROY nobull@mail.com
Re: Output replication inside of DESTROY <david@freemm.org>
Re: Question: Addressing Strings? <iltzu@sci.invalid>
Re: Script mysteriously erases file it's supposed to ap nobull@mail.com
Re: SSL Form, then writing to a file nobull@mail.com
Re: Statistics (Martien Verbruggen)
WebCT help <jane@enteng.co.uk>
Re: Wild Card Search!! nobull@mail.com
Writing a script to install Perl modules automatically <imak@imakhno.freeserve.co.uk>
Re: Writing a script to install Perl modules automatica <tinamue@zedat.fu-berlin.de>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 24 Mar 2001 22:28:48 +1100
From: "Ron Savage" <ron@savage.net.au>
Subject: ANNOUNCE: CGI::Explorer V 1.12
Message-Id: <tbpcdu2gop6h23@corp.supernews.com>
NAME
====
CGI::Explorer - A class to manage a tree of data, for use in CGI scripts
SYNOPSIS
========
See the POD in Explorer.pm, or see ce.pl.
DESCRIPTION
===========
CGI::Explorer is a support module for CGI scripts. It manages a tree of data, so
that the script can display the tree, and the user can click on a node in the tree
to open or close that node.
Opening a node reveals all children of that node, and restores their open/close state.
Closing a node hides all children of that node.
PERL
====
CGI::Explorer is a pure Perl module.
NEWS
====
V 1.12 has been uploaded to CPAN.
1.12 Sat Mar 24 17:15:00 2001
- Add constructor option css_background. It is used to set the background color
of submit buttons.
- Add constructor option css_color. It is used to set the foreground color of
submit buttons.
- Add method depth($id), which returns the depth of the node with the given id, or 0.
- Add method get($option), which returns the value of the given option, or undef.
Eg: $tree -> get('sort_by') returns 'name', by default.
- Enhance ce.pl to demonstrate these options.
1.11 Wed Mar 14 21:00:00 2001
- Add constructor option sort_by. When set to 'name' (the default), the nodes
are sorted by name. When set to 'id', the nodes are sorted by id.
Patch ce.pl to demonstrate this, by making it now sort by id.
- Add code to ce.pl to set all even ids to open the very first time the script
is run. This is simply to demonstrate how to pre-set the open/closed status
of nodes.
- Reformat part of the pod to avoid a bug in pod2hml. See note under method
B<image()>.
- Fix spelling of horizontal.
--
Cheers
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html
------------------------------
Date: Sat, 24 Mar 2001 15:17:49 GMT
From: Anthony Deaver <bishop@projectmagnus.org>
Subject: array vs. array question
Message-Id: <3ABCBA6C.F829EF3F@projectmagnus.org>
Heres me query:
I have two arrays, one small one large (over 30,000 entries) and I need
to find all the occurances of the elements in the small array in the
large one.
I used this:
@fields{ @FirstList } = ((1) x scalar( @FirstList));
@lines = map { defined( $fields{ $_ }) ? $_ : () } @SecondList;
and reversed the arrays as well... what I *need* is to know the index
of each occurance.
For instance, it the first element of @SecondArray orruces at
$FirstArray[21] I need to get back 21.
I have tried using the for[each] loops, but they can take forever, and
this has to be reasonably fast since there is the potential of the small
array growing to over 30,000 elements and the large list going over
100,000.
Any suggestions?
------------------------------
Date: 24 Mar 2001 15:38:29 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: array vs. array question
Message-Id: <99if1l$1c78b$3@fu-berlin.de>
hi,
Anthony Deaver <bishop@projectmagnus.org> wrote:
> I have two arrays, one small one large (over 30,000 entries) and I need
> to find all the occurances of the elements in the small array in the
> large one.
> I used this:
> @fields{ @FirstList } = ((1) x scalar( @FirstList));
> @lines = map { defined( $fields{ $_ }) ? $_ : () } @SecondList;
> and reversed the arrays as well... what I *need* is to know the index
> of each occurance.
> For instance, it the first element of @SecondArray orruces at
> $FirstArray[21] I need to get back 21.
> I have tried using the for[each] loops, but they can take forever, and
> this has to be reasonably fast since there is the potential of the small
> array growing to over 30,000 elements and the large list going over
> 100,000.
> Any suggestions?
04:33pm tina@linux:lcwa-1.0.0 848> perl -MData::Dumper -e'
@a=('aaaa'..'zzaa');
@b=qw(dddd ffff);
@fields{ @a } = (0..@a);
@lines = map { $fields{$_} } @b;
print " @lines \n";
'
54837 91395
regards,
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: 24 Mar 2001 15:40:11 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: array vs. array question
Message-Id: <99if4r$1c78b$4@fu-berlin.de>
Tina Mueller <tinamue@zedat.fu-berlin.de> wrote:
> @a=('aaaa'..'zzaa');
> @b=qw(dddd ffff);
> @fields{ @a } = (0..@a);
^^
that should be @a-1, of course
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: Sat, 24 Mar 2001 15:16:21 +0000
From: Principle <principle@seekasonic.com>
Subject: Deleting and or appending a single line in a text file - newbie question
Message-Id: <rndpbt4n3mj5am21c945jhvokn7qd56pfb@4ax.com>
I have a text file with multiple lines in it, looks a bit like this
dave,45 london rd,6787,a very nice chap
john,35 hardon st,4878,a not so nice chap
fred,45 london rd,6787,a very nice chap
darren,35 hardon st,4878,a not so nice chap
What I want to be able to do is delete just one of the lines so say
line 3 for instance.
Also it would be very handy if some one could explain how to append
say just one line, not add another line to the end of the file but
actually replace line 3 with some other text.
------------------------------
Date: 24 Mar 2001 15:17:40 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Deleting and or appending a single line in a text file - newbie question
Message-Id: <99idqk$1c78b$2@fu-berlin.de>
hi,
Principle <principle@seekasonic.com> wrote:
> I have a text file with multiple lines in it, looks a bit like this
> dave,45 london rd,6787,a very nice chap
> john,35 hardon st,4878,a not so nice chap
> fred,45 london rd,6787,a very nice chap
> darren,35 hardon st,4878,a not so nice chap
> What I want to be able to do is delete just one of the lines so say
> line 3 for instance.
self-answering question:
perldoc -q "delete a line"
regards,
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: Sat, 24 Mar 2001 16:21:28 +0100
From: Mona Wuerz <wuerz@yahoo.com>
Subject: Re: Deleting and or appending a single line in a text file - newbie question
Message-Id: <240320011621282544%wuerz@yahoo.com>
In article <rndpbt4n3mj5am21c945jhvokn7qd56pfb@4ax.com>, Principle
<principle@seekasonic.com> wrote:
> What I want to be able to do is delete just one of the lines so say
> line 3 for instance.
>
> Also it would be very handy if some one could explain how to append
> say just one line, not add another line to the end of the file but
> actually replace line 3 with some other text.
Note that "append a line" is synonymous to "add another line to the end
of the file."
Otherwise, it's a faq:
perlfaq5
"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?"
-mona
------------------------------
Date: 24 Mar 2001 12:01:24 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: diag question
Message-Id: <99i2ak$re3$3@216.155.32.167>
In article <3ABA44FD.8C4F0A74@sgi.com>, Dale Bohl <dbohl@sgi.com>
wrote:
| Michael Carman wrote:
| >
| > Dale Bohl wrote:
| > >
| > > Can anyone tell me which is better to use during
| > > debugging and production?
| > >
| > > #!/usr/bin/perl -w
| > >
| > > or
| > >
| > > use diagnostics;
| >
| > This isn't an either-or choice. -w enables warnings. Using
| > diagnostics (which implicitly enables -w) makes those warnings
| > more verbose.
| >
| > You should *always* use -w during production of any non-trivial
| > script. (And you really should leave it there afterwards, too.)
| > You should 'use diagnostics' if you find the standard warning
| > messages to be too cryptic.
| >
| > I think of diagnostics.pm like a set of training wheels. It's
| > helpful when your just getting started, but annoying after you've
| > learned how to ride.
| Thanks,
| Dale
There's also the additional option of
use diagnostics -verbose;
which gives you even more info on how (or what) you may have screwed up
(:
'use diagnosts' will also slow down the initial execution of your
script, so that is another reason to use it during creation/debugging
phase, but then comment out that line for production code..
--
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
# ( damn spammers. *shakes fist* take a hint. =:P )
------------------------------
Date: Sat, 24 Mar 2001 10:08:14 -0500
From: James Matey <jmatey@sarnoff.com>
Subject: Does a Perl code generator for web databases exist ?
Message-Id: <3ABCB85E.CE04F618@sarnoff.com>
I am reading
Programming the Perl DBI
There are many applications in which a simple flat file database would useful. For simple databases,
it should be possible to build a code generator that would process a table to produce a set of HTML and CGI
pages that implement a standard set of database operations based on DBI. Need a new database, write a new table
and run the code generator.
I think I can see how to do it, but suspect that someone has already done it. Can anyone provide a pointer ?
Best regards,
Jim Matey
--
James R. Matey
jmatey@sarnoff.com
------------------------------
Date: Sat, 24 Mar 2001 05:06:15 -0600
From: "Rich" <bigrich318@yahoo.com>
Subject: Re: every 15 seconds
Message-Id: <tbovsiprd14b6e@corp.supernews.com>
"Gwyn Judd" <tjla@guvfybir.qlaqaf.bet> wrote in message
news:slrn9bou5d.boo.tjla@thislove.dyndns.org...
> I was shocked! How could Rich <bigrich318@yahoo.com>
> say such a terrible thing:
<snip>
> The explanation of how to get the above method was not quite complete.
> The psuedocode should be more like:
>
> while (1) {
> # do task here
> sleep 15 - time % 15
> # print results of task here
> }
>
> If you do it that way it works. In your two examples, the first one is
> more or less a direct copy of the wrong instructions. What happens is
> that you will sleep until time is an exact multiple of 15 (time % 15 ==
> 0). Then you do the task that can take a random amount of time. Then you
> print the results, ergo, the time between printing out each set of
> results is anywhere between 0 seconds and 30 seconds.
>
> The second method performs a task which can take a random amount of time
> and then sleeps till time is a multiple of 15 above. Then it prints the
> results of the task.
I figured it out after I posted, Randal's psuedocode threw me off.
Thanks,
Rich
------------------------------
Date: 24 Mar 2001 06:42:18 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: every 15 seconds
Message-Id: <m1puf7teid.fsf@halfdome.holdit.com>
>>>>> "Rich" == Rich <bigrich318@yahoo.com> writes:
Rich> I figured it out after I posted, Randal's psuedocode threw me off.
Ahem! Perl is *not* pseudocode. Nothing false about the way I did
that.
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 24 Mar 2001 11:04:57 +0000
From: nobull@mail.com
Subject: Re: fetch back STDERR outputs
Message-Id: <u9puf7sa06.fsf@wcl-l.bham.ac.uk>
"John Lin" <johnlin@chttl.com.tw> writes:
> nobull wrote:
> >"John Lin" writes:
> >
> >> package AG;
> >> use strict;
> >> local *ERR;
> >
>
> > Get rid of the local().
>
> Hmm... I thought it was a good habbit
No using local() is not a good habit. I'm not saying that it is never
right to use local(), just that it is something you shouldn't use
habitually without deeply understanding what you are doing. Conversly
my() can safely be used with a much more shallow understanding.
> Now I know it's unnecessary within a package. Just needed in
> package main.
Nope, nothing special about main AFAIK.
> (New behavior of Perl5.6, right?)
Nope, nothing new AFAIK.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Sat, 24 Mar 2001 11:27:04 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: How adding Hours & Days to current date?
Message-Id: <slrn9bp148.apd.abigail@tsathoggua.rlyeh.net>
MAC (macv@multiweb.nl) wrote on MMDCCLXII September MCMXCIII in
<URL:news:ojTu6.2659$t9.228777@news.soneraplaza.nl>:
"" Cano someone help me with this :
""
"" I need a sub routine that adds xx number of days or xx number of hour to a
"" already existing valid date like the current time and date.
There are lots and lots and lots of modules on CPAN doing so.
Abigail
------------------------------
Date: 24 Mar 2001 11:36:06 +0000
From: nobull@mail.com
Subject: Re: how to close() on filehandle without wait()ing?
Message-Id: <u9elvns8k9.fsf@wcl-l.bham.ac.uk>
Daniel <dbohling@newsfactor.com> writes:
> Is there a way to use the perl's open() call to open a pipe to a
> process, print to it, and let it run without waiting for it to finish?
I don't think so. I think you have to do the pipe()/fork()/exec()
explicitly or maybe use IPC::Open2.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 24 Mar 2001 11:25:07 +0000
From: nobull@mail.com
Subject: Re: Output replication inside of DESTROY
Message-Id: <u9hf0js92k.fsf@wcl-l.bham.ac.uk>
"David M. Lloyd" <david@freemm.org> writes:
> Subject: Output replication inside of DESTROY
Does your code ever fork()? If your code fork()s and both the parent
and the child exit() (implicitly or explicitly) then all objects that
existed at the time of the fork() will be DESTROYed in both parent and
child.
> I have created a class that implements DESTROY to do a simple
> leak-detection thingy... it goes something like this:
Please never just post "something like".
Always try to produce a minimal, complete, strict, warning-free script
that when you run it produces the symptoms you want explianed.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Sat, 24 Mar 2001 13:53:52 GMT
From: "David M. Lloyd" <david@freemm.org>
Subject: Re: Output replication inside of DESTROY
Message-Id: <Pine.LNX.4.21.0103240748470.1294-100000@homebody.freemm.org>
On 24 Mar 2001 nobull@mail.com wrote:
> Does your code ever fork()? If your code fork()s and both the parent
> and the child exit() (implicitly or explicitly) then all objects that
> existed at the time of the fork() will be DESTROYed in both parent and
> child.
Of course... that was it. I thought to fork had something to do with it,
but I couldn't put 2 and 2 together. :-)
> Please never just post "something like".
>
> Always try to produce a minimal, complete, strict, warning-free script
> that when you run it produces the symptoms you want explianed.
I couldn't duplicate it outside of my code, and I couldn't post my code
because it's proprietary. :-) I was hoping someone had had a similar
experience... and someone did. Thanks!
- D
<david@freemm.org>
------------------------------
Date: 24 Mar 2001 13:25:39 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Question: Addressing Strings?
Message-Id: <985439813.16680@itz.pp.sci.fi>
In article <3abbe7fa$1@news.enetis.net>, Zac Hester wrote:
>
>I'm trying to use strings like character arrays.
Well, if that's what you want:
http://search.cpan.org/search?dist=Tie-CharArray
>If I can use the 'index' function to return a substring's position in a
>string, shouldn't there be an inverse of that function that returns a
>substring based on a position (or positions)?
Oh, then you don't need character arrays. You need substr(), which is a
Perl builtin. Of course, there's always more than one way to do it:
my ($substring) = $string =~ /^.{$start}(.{0,$length})/s;
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.
------------------------------
Date: 24 Mar 2001 12:10:43 +0000
From: nobull@mail.com
Subject: Re: Script mysteriously erases file it's supposed to append to
Message-Id: <u966gzs6yk.fsf@wcl-l.bham.ac.uk>
Bernie Cosell <bernie@fantasyfarm.com> writes:
> Katia Hayati <hayati@math.uiuc.edu> wrote:
>
> } On Thu, 22 Mar 2001, Peter Sundstrom wrote:
> }
> } > > open(LOG, ">>$logfile") or die "Could not open log file $logfile:
> } > $!\n";
> } > > flock(LOG, LOCK_EX);
> } > > print LOG "$who | $when | $what | $where\n";
> } > > close LOG or die "Could not close log file $logfile: $!\n";
> } > > }
> } > > print "\n";
> } >
> } > Your locking is the equivalent to breaking the door down and then putting
> } > the key in the lock.
> }
> } Ah. But why? The example in the man page for flock() is almost exactly the
> } same as what I just wrote. The difference is that they use a seek(), which
> } I don't think I need here, and unlock the file before closing. Regulars at
> } clpm seem to disapprove of this last point, so this is why I close the
> } file to release the lock. Can you please explain your comment?
>
> The problem is that if someone ELSE is holding the lock when you open the
> file, your copy of the filehandle has its file pointer set at char position
> X. Now, if the other process(es --- you might not even be next!) change
> the length of the file -- either truncating it or appending to it, *YOUR*
> filehandle is still pointing at the old byte position. What you need to do
> is:
> seek FH,2,2
Surely you mean:
seek FH,0,2
Or is there some reason you want to insert two zero bytes at the start
of your output?
> after you *get* the lock to make sure that you're really about to write at
> the end of the file.
It should be noted that what Bernie (and the flock() manapage) is
presenting here is a work-round for an OS bug. On the OP's code would
work properly because O_APPEND is properly implemented.
Arguably Perl itself when compiled on a OS with this bug should
include a work-round.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 24 Mar 2001 11:46:01 +0000
From: nobull@mail.com
Subject: Re: SSL Form, then writing to a file
Message-Id: <u9bsqrs83q.fsf@wcl-l.bham.ac.uk>
"Henry" <usequity@mindspring.com> writes:
> I post information from a secure form (https) to my script, but I can't get
> the script to write to a file or mail the information. I checked
> permissions. Also, everything works fine if I don't reference the form
> securely. Is there a special way to refer to the file under the secure
> environment?
No. Or rather if there is then it is a feature of your web server and
not Perl. Perhaps when you say "secure form" you also mean
"authenticated connection". Perhaps your seb server software is
designed/configured to use a differnt user ID for scripts run by
authenticated sessions (e.g. IIS does this).
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Sun, 25 Mar 2001 01:01:55 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Statistics
Message-Id: <slrn9bpa6j.ugg.mgjv@martien.heliotrope.home>
On Sat, 24 Mar 2001 11:26:05 +1100,
Martien Verbruggen <mgjv@tradingpost.com.au> wrote:
> On Fri, 23 Mar 2001 15:19:44 +0100,
> Jonas Nilsson <jonni@ifm.liu.se> wrote:
>> "Bernard El-Hagin" <bernard.el-hagin@lido-tech.net> wrote in message
>> news:slrn9bmccn.s3u.bernard.el-hagin@gdndev32.lido-tech...
>>> More than it used to be when?
>>
>> More than a month ago?
> The oldest article I've got in my spool is 26725, from Dec 22. The
> latest is 42346 from March 24. That could give you some avaerage over
> that whole period to compare current figures to.
A bit more detailed: Processed from the overview file in leafnode's
spool:
Start: Thu Dec 21 12:27:51 2000 GMT
End: Sat Mar 24 13:25:39 2001 GMT
Total: 15688
By Month:
2000/12 : 1361
2001/01 : 5397
2001/02 : 4719
2001/03 : 4211
By Week:
2000/51 : 521
2000/52 : 840
2001/01 : 1051
2001/02 : 1144
2001/03 : 1225
2001/04 : 1327
2001/05 : 1286
2001/06 : 1379
2001/07 : 1048
2001/08 : 1046
2001/09 : 1357
2001/10 : 1208
2001/11 : 1306
2001/12 : 950
I don't know how reliable my newsfeed has been at all times, but those
numbers should at least be indicative.
Martien
--
Martien Verbruggen |
Interactive Media Division | I'm just very selective about what I
Commercial Dynamics Pty. Ltd. | accept as reality - Calvin
NSW, Australia |
------------------------------
Date: Sat, 24 Mar 2001 13:41:51 +0900
From: "Jane Longhurst" <jane@enteng.co.uk>
Subject: WebCT help
Message-Id: <tbp8p4p3q5e795@xo.supernews.co.uk>
We are looking for programmers/scripters capable of customising elements of
WebCT. We have a customised, early version of WebCT but now need to upgrade
(to 3.1 or 3.5) but WebCT itself does not carry out customisations any
longer and without the customisation we cannot upgrade...
Is there anyone interested in this bit of work (probably a week's work)?
Please contact Andy at
andy@aspera.co.uk
------------------------------
Date: 24 Mar 2001 11:18:43 +0000
From: nobull@mail.com
Subject: Re: Wild Card Search!!
Message-Id: <u9k85fs9d8.fsf@wcl-l.bham.ac.uk>
logan@cs.utexas.edu (Logan Shaw) writes:
> In article <3ABBABCF.7AE488C3@alcatel.com>,
> Clinton Munden <clinton.munden@alcatel.com> wrote:
> >I have a search script and here is the problem. If I do a wild card
> >search ( * ) I get a server error.
> If so, "*" isn't the wildcard character. It's the "this
> pattern should match if the preceding thing occurs zero
> or more times" character, which is not the same thing.
PSI::ESP tells me that the OP wants to convert Unix (Bourne or Korn)
shell style Korn-shell (ksh) wildcarded strings (aka "fileglobs") into
Perl regular expressions.
There is a module to do this on CPAN.
Figuring out which one it is is left as an exercise for the reader.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Sat, 24 Mar 2001 14:51:35 -0000
From: "Makhno" <imak@imakhno.freeserve.co.uk>
Subject: Writing a script to install Perl modules automatically
Message-Id: <99icj9$tvi$1@news6.svr.pol.co.uk>
Hi, I'm writing a bash script to install a large set of Perl modules
automatically, and the trouble is that the Makefile.PL and all the other
stuff that's needed to install them are at different levels, eg:
I might have one module called MyModule
and another called MyModule::Somefink::Else
and yet another called MyModule::YetMore
My problem is that the hierarchical package names translate into directories
like eg:
MyModule
MyModule/Somefink/Else
MyModule/YetMore
with the Makefile.PL at the end of this chain. Is there a 'nice' way of
installing the modules separately with a script without
a) Combining all the modules into one big module (not an option)
b) Making my bash script search around the hierarchy for the Makefile.PL
(eg: is there a way to get Perl to do the hard work?)
Thank you.
------------------------------
Date: 24 Mar 2001 15:12:01 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Writing a script to install Perl modules automatically
Message-Id: <99idg1$1c78b$1@fu-berlin.de>
hi,
Makhno <imak@imakhno.freeserve.co.uk> wrote:
> Hi, I'm writing a bash script to install a large set of Perl modules
> automatically,
I don't know if CPAN.pm can handle more packages at one
time, but did you try that?
regards,
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
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 V10 Issue 559
**************************************