[16014] in Perl-Users-Digest
Perl-Users Digest, Issue: 3427 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 20 11:19:09 2000
Date: Tue, 20 Jun 2000 03:05:19 -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: <961495518-v9-i3427@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 20 Jun 2000 Volume: 9 Number: 3427
Today's topics:
Re: [ Regexp ] Curious Behaviour of " last if /(match)/ <stephen@twocats.dont-spam.demon.co.uk>
Re: [Q] Perl implemented in Java? moc.cnioro@sfd.strip.this.and.reverse
Re: A Computer Programmers Profile <gellyfish@gellyfish.com>
Re: accessing other servers using Perlscript & ASP <gellyfish@gellyfish.com>
anyone interested? <alexk@typhoon.xnet.com>
Re: anyone interested? (brian d foy)
Re: Anyone use ActivePerl on Win95 or Win98 <gellyfish@gellyfish.com>
Blessing a reference in an XSUB <vikas@navya.com>
Re: concerned about flock() - Win9X issues <gellyfish@gellyfish.com>
Re: Crazy enough that it might just work... <gellyfish@gellyfish.com>
Re: curious databse of webhosting like geocities <gellyfish@gellyfish.com>
Re: Dir Listing <gellyfish@gellyfish.com>
Re: Dir Listsing <gellyfish@gellyfish.com>
Re: Dir Listsing <gellyfish@gellyfish.com>
Re: Filtering out certain types of files... <gellyfish@gellyfish.com>
fortran modules <daniel.heiserer@bmw.de>
Re: GD-1.27 install problems <gellyfish@gellyfish.com>
Re: Getting current working directory in perl script nobull@mail.com
glob function and dot files <dp@ii.net>
Re: glob function and dot files (Villy Kruse)
How to find perl/tk useful modules? Example: process mo <kingwang98@yahoo.com>
Re: I need help to get headlines on my site <gellyfish@gellyfish.com>
Re: IDE for perl? <gellyfish@gellyfish.com>
Re: Messagebox in Win32 <gellyfish@gellyfish.com>
Re: Monitor a process like Unix top But should be Perl/ <gellyfish@gellyfish.com>
Re: Name/Value pair for a hyperlink? <gellyfish@gellyfish.com>
Re: Net::NNTP question. <gellyfish@gellyfish.com>
Re: NT or Unix at runtime <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 20 Jun 2000 10:13:14 +0100
From: "Stephen Collyer" <stephen@twocats.dont-spam.demon.co.uk>
Subject: Re: [ Regexp ] Curious Behaviour of " last if /(match)/ "
Message-Id: <961492508.17546.0.nnrp-09.9e98901a@news.demon.co.uk>
> You have effectively explained what Perl does of its $<DIGIT> >variables.
But not my actual question : "WHY?" :(
Tom Phoenix already answered that bit, but what the heck...
>
> Why does Perl act likewise? Why doesn't $1 always have the value of > >the
last matched pattern, inside or outside a block? Normal variables
>($variable) are always the same inside or outside a block as long as you >
don't say "local($variable)" so why should $<DIGIT> variables act > >
>otherwise? Why should Perl assume "local($<DIGIT>)"? It nothing
>but obfuscating ...
Consider the following code:
if (/(blah)/) { # sets $1
process_match($1);
if ($1 =~ /yack/) { # has $1 changed here ?
do_funky_stuff();
}
}
sub process_match {
...
if (/(yack yack)/) { # sets $1 again
...
}
}
The first if sets $1 and calls process_match. process_match sets
$1. process_match returns, and the if uses $1 in the nested if.
Perl arranges that $1 is implicitly local to the closest enclosing
block, so inside process_match, $1 can be set or changed as
often as required, but its original value will be restored when
the block terminates (i.e. when the sub returns). This means
that you can call subroutines with wild abandon, and they can
modify $1, $2 etc and *you don't have to know or care about it*
- when they've done their work, your values of $1 etc are
restored.
The answer to the question posed in the comment above is no.
>
> Well I guess it is just a choice, which is not very wise in my opinion ...
I hope I've changed your mind on that point. If subroutines could
change the value of $1 behind your back, things could get
pretty hairy, debugging wise. Remember that $1 is a global
variable, so if it wasn't implicitly local, you'd have to read all
of the code that your program calls to see if it gets altered anywhere.
Steve Collyer.
------------------------------
Date: 20 Jun 2000 04:08:55 -0400
From: moc.cnioro@sfd.strip.this.and.reverse
Subject: Re: [Q] Perl implemented in Java?
Message-Id: <8in8qn$al$1@chewie.savarese.org>
> >>>>> "Brian" == Brian Landers <brian@bluecoat93.org> writes:
> Brian> A perhaps better choice would be OROmatcher,
> Brian> http://www.savarese.org, which *claims* 100% Perl RE
> Brian> compatibility. While I doubt it faithfully reproduces every
> Brian> nuance of perl RE's (the /x modifier comes immediately to
> Brian> mind), I've used it quite a bit and it is excellent.
Randal L. Schwartz writes <merlyn@stonehenge.com>
> In order to be 100% compatible with Perl's regex in 5.6, it'd have
> to include a full Perl installation. :) Perl's regex in 5.6 include Perl
> code in the match side.
I just wanted to clarify a few quick things for any Java programmers
happening upon this part of this now dead thread on a search engine.
Please pardon the irrelevance to Perl programmers who don't dabble in
Java.
OROMatcher is currently only compatible with Perl 5.003 regular
expressions, and yes it does implement the /x modifier. It has been
donated to the Apache Jakarta project (jakarta.apache.org) where
we'll work to catch up to Perl 5.6 regular expressions, a rather
daunting task given all of the changes. Of course, things that
don't make sense in Java, such as Randal's comment, will not be
implemented. The idea is to be compatible with Perl regular
expressions, not to be a Perl interpreter (that's what Perl is for!).
POSIX aside, Perl regular expressions are the de facto standard for
regular expressions. And rightly so because they are so powerful and
Perl is so popular making them what most programmers are familiar with.
Text processing support in the Java core APIs is very poor, which is why
OROMatcher was written in the first place. If you want to help bring
Perl 5.6 regexes to Java, we could use your help at the Jakarta project.
Mailing lists, CVS repository, and the latest stable OROMatcher source
should be available sometime this week.
daniel
------------------------------
Date: 20 Jun 2000 09:09:25 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: A Computer Programmers Profile
Message-Id: <8in8rl$7d7$1@orpheus.gellyfish.com>
On Thu, 15 Jun 2000 19:53:35 -0400 Tad McClellan wrote:
> On Thu, 15 Jun 2000 18:24:26 -0700, Ferk Da Jerk <shawnball@uswest.net> wrote:
>>
>>Drew Simonis <care227@attglobal.net> wrote in message
>>news:3948E11C.42BA9477@attglobal.net...
>>> Ferk Da Jerk wrote:
>>> >
>>> > If your looking for a great worker I can do it and I need much money.
>>At
>>> > least $15 per hour.
>>>
>>>
>>> Boy I'd love to be 14 again.
>>
>>Yeah 14 is a great age. All you do is think how to rule the world, become
>>rich, and about the opposite sex.
>
>
> Hmmm. Sounds the same as 43 then.
>
Strange that ;-}
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Tue, 20 Jun 2000 09:58:47 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: accessing other servers using Perlscript & ASP
Message-Id: <rfH35.376$My4.38473@news.dircon.co.uk>
On Tue, 20 Jun 2000 00:30:33 GMT, Bert Maher Wrote:
> Hi, I've been trying to use Active Server Pages in conjunction with
> perl script, and I've been running into a problem when trying to
> access the filesystem of other (non-web) servers on my network. The
> open() function can't seem to access anything outside of the internet
> directory structure. Can anyone help?]
Probably the administrator of your system can - the IUSR_<whatever> user
must be granted the appropriate rights. If you are the administrator or
you have further questions you would probably be be better off asking in
comp.infosystems.www.servers.ms-windows as this would apply to server-side
code written in any language.
/J\
------------------------------
Date: 20 Jun 2000 07:54:46 GMT
From: Alexander Kilimnik <alexk@typhoon.xnet.com>
Subject: anyone interested?
Message-Id: <8in806$sbj$1@flood.xnet.com>
Hi Everyone,
I recently registered perlhowto.com. I was curious if anyone out there
was interested in writing FAQs and code examples for the site. I am
beginning to write up some code examples and collecting PERL resources to
publish, but to make the site really good, I don't think I can do this
alone. If anyone is interested, please email me at alexk@xnet.com.
Thanks,
Alex
------------------------------
Date: Tue, 20 Jun 2000 04:38:41 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: anyone interested?
Message-Id: <brian-ya02408000R2006000438410001@news.panix.com>
In article <8in806$sbj$1@flood.xnet.com>, Alexander Kilimnik <alexk@typhoon.xnet.com> posted:
> Hi Everyone,
>
> I recently registered perlhowto.com. I was curious if anyone out there
> was interested in writing FAQs and code examples for the site.
why not just help out with www.perlfaq.org?
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>
------------------------------
Date: 18 Jun 2000 12:29:30 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Anyone use ActivePerl on Win95 or Win98
Message-Id: <8iibqq$36n$1@orpheus.gellyfish.com>
On Sat, 17 Jun 2000 11:31:15 -0700 Ferk Da Jerk wrote:
> Ferk Da Jerk <shawnball@uswest.net> wrote in message
> news:FgM25.222$4k6.1780@news.uswest.net...
>> I downloaded ActivePerl. All the stuff was installed in the folder
>> C:\Perl\. When you work on a Unix system the heading would be
>> #!/usr/local/bin/perl but not on Windows. What am I supposed to replace it
>> with?
>>
>>
> I found out I just had to name it whatever.pl. So I have my script. When I
> try to upload it on the browser it finds the local file and opens up PERL
> and PERL runs it. What do I do so the browser runs it?
>
You dont want the browser to run it - you want a web server to run it on
behalf of the browser - you will want to ask in the group
comp.infosystems.www.servers.ms-windows about the choice of and configuration
of a web server.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Tue, 20 Jun 2000 03:25:34 -0400
From: Vikas Aggarwal <vikas@navya.com>
Subject: Blessing a reference in an XSUB
Message-Id: <394F1C6E.8BB0619C@navya.com>
I have tried every possible reasonable combination I can think of in trying
to bless a reference to a new scalar in an XSUB, but not having any luck.
I am trying to write a TIESCALAR routine in an XSUB so that I can do a:
tie $debug, 'MY_globals', 'debug';
In my XSUB (.xs) file, i have tried all combinations possible:
SV *
TIESCALAR (class, var)
char *class;
SV *var;
CODE:
char *s = SvPV(var, PL_na);
RETVAL= sv_bless(newRV_noinc(newSVpv(s, 0)), gv_stashpv(class, FALSE));
and
RETVAL= sv_bless(newRV_noinc(newSVpv(s, 0)), gv_stashpv(class, TRUE));
and
RETVAL= newSVrv(var, class);
and
RETVAL= newSVrv(newSVpv(s), class)
and
etc. etc.
I cannot seem to get a 'blessed' reference back which I can use in the
corresponding STORE and FETCH functions.
According to the perlguts doc this should work, but I am lost as to when do
I allocate a new SV and when do I use the one in the cmd line. Any
pointers would help. I have grepped thru all existing .xs files on the
system...
-vikas
------------------------------
Date: 18 Jun 2000 15:25:26 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: concerned about flock() - Win9X issues
Message-Id: <8iim4m$3dt$1@orpheus.gellyfish.com>
On Sat, 17 Jun 2000 13:57:16 +1000 Peter Hill wrote:
> Larry Rosler wrote:
>>
>> In article <3949ABD1.3423@modulus.com.au> on Fri, 16 Jun 2000 14:23:45
>> +1000, Peter Hill <phill@modulus.com.au> says...
>> > Clinton A. Pierce wrote:
>>
>> ...
>>
>> > > I've used flock() on a variety of Unix and Windows systems. Where
>> > > it works (Unix with local filesystems, NT with local filesystems) it
>> > > works OK. Where it's not supported (Win9x) it's not needed. Where it
>> >
>> > Win9x is a single-user multi-tasking OS - the lack of flock on Win9x is
>> > unfortunate, as it is needed where multiple tasks might conflict.
>>
>> But on Win9x one task cannot open a file that is already opened by
>> another task, so there can be no conflict, so no need for file locking.
>> In essence, the operating system imposes mandatory locking.
>
> Larry, Bart, Clinton, japhs in general:
> I'm *way* confused, and out of my depth to tackle this at a discussion
> level, so as a substitute wrote the snippet below in the hope that you
> could lighten my confusion.
>
> As you can see from the appended results:
> 1. It appears (to me at least) that the OS (Win95) is not imposing any
> sort of locking
No it will perform a mandatory lock on any files open for writing at the
system level and any attempts to open that file while it is still open
will fail with $! set to a value that indicates the file is in use.
> 2. It appears (to me at least) that such absence of locking is resulting
> in a predictable (not necessarily desirable) outcome for an OS without
> that locking.
Well one wouldnt generally be using Win9[58] as a server anyhow so this is
moot but given the mandatory locking no ill effects will occur to your files.
> 3. It appears (to me at least) that it would be possible to write a sub
> which prevent this predictable behaviour and result in outcomes
> consistent with a better OS (usual caveats of all processes cooperating
> in the locking process etc.)
If one is to write a program that must run on Win[98] as well as more
capable OS then one should wrap all calls to flock() in eval blocks to
trap the fatal error where the function isnt supported and amend the
error checking on open() so that it wont die on a 'file in use error' but
will retry after perhaps a suitable wait.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 20 Jun 2000 08:42:40 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Crazy enough that it might just work...
Message-Id: <8in79g$7ac$1@orpheus.gellyfish.com>
On Mon, 19 Jun 2000 09:25:39 -0700 Agentkhaki wrote:
> Gee, that was mature. "HTML Programming is impossible..."
> Blah, Blah, Blah... I think my point was made. Fine, maybe
> the world doesn't think of sitting down and writing out an
> extensive HTML document, trying to find the best, most
> efficient way to get it working, making the Javascript and
> whatever else you're using work properly (sounds a lot like
> "programming" to me...).
HTML programming is impossible because HTML is not a programming
language, playing with a bit of HTML does not make you a programmer.
If I typed in RTF or troff or , heaven forfend, whatever format
a microsoft word document might be in that wouldnt make *me* a
programmer either. Javascript is not HTML so that is a red herring.
> Whatever, at least if you think
> you're such a hot shot you could show some maturity. Guess
> not... And I'm sorry about this flame. I'm sure it's not
> too mature in and of itself, but stupidity begets, well,
> stupidity.
And thus is begat a killfile entry ...
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 18 Jun 2000 14:42:05 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: curious databse of webhosting like geocities
Message-Id: <8iijjd$rkd$1@orpheus.gellyfish.com>
On Fri, 16 Jun 2000 19:40:15 GMT Antonio Gonzalez wrote:
> On Thu, 15 Jun 2000 16:13:13 GMT, "Daniel van den Oord"
> <danielxx@bart.nl> wrote:
>
>>I'm curious what kind of database geocities uses to store the info of their
>>users
>>I know they are using CGI scripts for form proccesing but if they are using
>>ODBC or SQL or whatever I don't know. Does anybody have some more
>>information.. If not what would be the best database to maintain when
>>frequently used and getting kinda huge ?!? at the moment I'm working with
>
>
> The best, of course, is MySQL running on Red Hat 6.1+
>
In what way best ? Is it going to be faster or more robust than Oracle
or Informix running under Solaris on a Sun E10000 ?
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 18 Jun 2000 14:15:38 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Dir Listing
Message-Id: <8iii1q$n33$1@orpheus.gellyfish.com>
On Sun, 18 Jun 2000 01:43:52 -0700 psycho wrote:
> hey, ok I need a way to get a Dir info. from a dir i want, so
> far i have it displaying(listing) the contents of the dir. but
> my probelm is is geting the rest of the information.. ok like on
> the servers default dir listing it have the filename, size, date
> and des. and how would i do this and get this information?
>
look at the stat() entry in the perlfunc manpage.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Tue, 20 Jun 2000 08:57:00 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Dir Listsing
Message-Id: <wlG35.367$My4.38272@news.dircon.co.uk>
On Mon, 19 Jun 2000 15:12:37 -0700, psycho Wrote:
> hye, markus.. where would i get this doc.?
>
type
perldoc perlfunc
at some command prompt
/J\
------------------------------
Date: Tue, 20 Jun 2000 09:03:27 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Dir Listsing
Message-Id: <zrG35.368$My4.38272@news.dircon.co.uk>
On Mon, 19 Jun 2000 15:08:16 -0700, psycho Wrote:
> sorrym i can't send the source code to any one b/c my firend im
> dong this for, own's a co. sorry.
>
Huh ? Oh I cant show you any code because I know someone who owns a company ?
OK here is a random example that I have posted here in the past :
#!/usr/bin/perl -w
use strict;
my $base_dir = shift;
my %filedate;
opendir(DIR, $base_dir) || die "Can't open $base_dir\n";
my @files = map { $base_dir . '/' . $_ } grep !/^.{1,2}$/, readdir(DIR);
foreach my $file (@files)
{
my $mtime = (stat($file))[9];
$filedate{$file} = $mtime;
}
my @sorted = sort { $a->[1] <=> $b->[1] }
map { [ $_, $filedate{$_} ] }
keys %filedate;
foreach (@sorted)
{
print $_->[0],"\t",scalar localtime($_->[1]),"\n";
}
You will need to read the documentation if you dont understand what it is
doing.
/J\
------------------------------
Date: 20 Jun 2000 08:27:21 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Filtering out certain types of files...
Message-Id: <8in6cp$79d$1@orpheus.gellyfish.com>
On Sun, 18 Jun 2000 14:48:53 -0400 "ßarry" wrote:
> Hopefully this is the right group, if not, I apologize. I'm trying to make a
> script filter out files of a certain type, such as if I wanted to filter out
> cgi files so other users can't install CGI on my site (just an example). I
> would like to know what the filter would be to check the last 3 letters of a
> filename (the extension mainly) and see if they match a certain 3, and
> return an error page if they match (saying that they can't upload that type
> of file). Hope I explained it well enough - basicaly I don't want people
> installing CGI files and running them. Thanks.
>
You may want to use a regular expression - please see the perlre manpage.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Tue, 20 Jun 2000 09:40:10 +0200
From: Daniel Heiserer <daniel.heiserer@bmw.de>
Subject: fortran modules
Message-Id: <394F1FDA.188A3693@bmw.de>
Hi,
I want to integrate existing fortran code into perl by
making modules out of it.
I have seen swig which looks extremely nice but supports
only C/C++. I also have seen some phyton/fortran
connection.
Did anybody ever sucessfully compile and fortran
api and used that as a shard object from within perl?
The only things I could think of would be
to to write foreach fortran function a C wrapper
which contains only a call to the fortran routine
and a data pass through and then use these
C functions to swig them into a shared object.
Unfortunately I am not the IT expert to know if this
is enough or if it also would be enough to just
take the shared object or what the different
between a fortran shard object and a c shared
object is. The main difference I have seen that
the fortran functions get a '_' appended in
the .so.
So if somebody can help me here and give me some
hints I would really appreciate it.
Thanks daniel
------------------------------
Date: 20 Jun 2000 08:12:24 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: GD-1.27 install problems
Message-Id: <8in5go$789$1@orpheus.gellyfish.com>
On 19 Jun 2000 07:29:52 -0400 Jason Goodrow wrote:
> I'm trying to intall GD-1.27 in my shell. On make I get a lot of
>
> .....(errors edited)
>
> GD.xs:453: for each function it appears in.)
> GD.xs:453: warning: assignment makes pointer from integer without a cast
> GD.xs: In function `XS_GD__Image_stringTTF':
> GD.xs:1062: warning: assignment makes pointer from integer without a cast
> *** Error code 1
>
> ...(more of these)
>
> all basically
>
> assignment makes pointer from integer without a cast
>
These are warnings and not fatal errors - unless it fails the 'make test'
I wouldnt worry about it. This is due to gcc being more picky than some
other compilers on these matters.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 20 Jun 2000 10:32:03 +0100
From: nobull@mail.com
Subject: Re: Getting current working directory in perl script
Message-Id: <u93dm88zqk.fsf@wcl-l.bham.ac.uk>
glchy <glchyNOglSPAM@cc21.com.sg.invalid> writes:
> this is a simple question. I would like to get the current
> working directory in my perl script and unshift it in my @INC.
> Was thrown those codes:
>
> eval {
> ($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1");
> }
>
> Which does NOT seem to work as $0 contains only the name of the
> file.
Other people have answered the question you actually asked.
The question you probably intended to ask is (to quote the FAQ): "How
do I add the directory my program lives in to the module/library
search path?"
Note "directory my program lives in" ne "current working directory".
> Got questions? Get answers over the phone at Keen.com.
Got questions? Get answers locally by reading FAQs.
> Up to 100 minutes free!
As many minutes as you like free!
> http://www.keen.com
http://www.cpan.org/doc/manual/html/pod/perlfaq.html
perldoc perlfaq
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Tue, 20 Jun 2000 07:33:02 GMT
From: David Pascoe <dp@ii.net>
Subject: glob function and dot files
Message-Id: <8in6ne$q66$1@nnrp1.deja.com>
I have a line in a perl script
@some = glob( $fullname . "/*,v" );
can anyone help me use glob so that it will match file starting with . as in
.cshrc,v .login,v as well as file,v - the obvious [.]*,v doesn't work,
neither do any of the usual permutations I have tried.
thanks,
davidp.
--
David J. Pascoe, incognito, dp@ii.net
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 20 Jun 2000 08:06:21 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: glob function and dot files
Message-Id: <slrn8ku9ft.2oe.vek@pharmnl.ohout.pharmapartners.nl>
On Tue, 20 Jun 2000 07:33:02 GMT, David Pascoe <dp@ii.net> wrote:
>I have a line in a perl script
>
>@some = glob( $fullname . "/*,v" );
>
>can anyone help me use glob so that it will match file starting with . as in
>.cshrc,v .login,v as well as file,v - the obvious [.]*,v doesn't work,
>neither do any of the usual permutations I have tried.
>
and how about the also obvious .*,v ? Of course that won't get the
names that does not start with a dot, but it should not be too difficult
to combine the <*,v> and <.*,v> globs together.
$ cd /var/tmp
$ touch /var/tmp/.abc,v
$ touch /var/tmp/abc,v
$ perl -e 'my @glob = (<.*,v>, <*,v>); print "@glob\n";'
.abc,v abc,v
If that is not good enough, then opendir and readdir might be the way ahead.
Villy
------------------------------
Date: Tue, 20 Jun 2000 09:52:54 +0200
From: CWW <kingwang98@yahoo.com>
Subject: How to find perl/tk useful modules? Example: process monitor(progress bar)
Message-Id: <394F22D6.F3B53DEB@yahoo.com>
------------------------------
Date: 18 Jun 2000 13:13:22 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I need help to get headlines on my site
Message-Id: <8iied2$bnr$1@orpheus.gellyfish.com>
On Sun, 18 Jun 2000 09:46:41 +0200 Johan Bünger wrote:
> Tina Mueller wrote:
>>
>> Johan Bünger <phuket@phuket-guide.com> wrote:
>> > I have been trying to get hold on a simple way to include headlines that
>> > is updated every day. I would like to collect the information from a
>> > site:
>>
>> > http://www.phuketgazette.net/feedme/index.asp
>> > [...]
>>
>> what was wrong with the answers of tad and dave to your posting
>> 14 hours ago?
>>
>
> The problem with their answer is its not working!
>
Then perhaps you should have followed up in that thread rather than
starting new one.
You would also be better off if you posted a little more information as
to how its not working manifests itself.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 19 Jun 2000 23:44:12 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: IDE for perl?
Message-Id: <8im7ns$uim$1@orpheus.gellyfish.com>
On Mon, 19 Jun 2000 16:08:43 +0200 Alvin Stroyny wrote:
> Hi
>
> Can anyone recommend me a good integrated development environment (i.e.
> editor+debugger)
> for perl? I am interested in both commercial and shereware products.
>
I tend to find Linux a very good environment with both an editor and
a Perl debugger. If you have vim you have an editor which integrates
the systems help as well ...
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Tue, 20 Jun 2000 09:24:53 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Messagebox in Win32
Message-Id: <FLG35.372$My4.38272@news.dircon.co.uk>
On Tue, 20 Jun 2000 00:59:39 -0400, Rob - Rock13.com Wrote:
> Jan van Mansum wrote:
>>
>> Where do I get that module?
>
> Probably here:
> http://search.cpan.org/
>
Well probably via
ppm install Win32::API
unless he has the wherwithal to compile the module himself.
/J\
------------------------------
Date: 20 Jun 2000 08:09:28 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Monitor a process like Unix top But should be Perl/tk How?
Message-Id: <8in5b8$77s$1@orpheus.gellyfish.com>
On Mon, 19 Jun 2000 05:40:06 +0200 Charles W.W. wrote:
> Thank you.
>
> It is not a homework. It is a project I have to finish in 2 weeks. I
> need to monitor the several user and display in a perfect GUI window(
> some graphic diagram maybe necessary) to show whether the process is
> running or not and some details. I need to parse the string I got from
> top and dispaly them in my GUI so that user will be able to monitor the
> every process running( for example a table with time an situation of
> running process).
>
What have you tried and what have you had difficulty with. I knocked this
together in a few seconds based on the Gtk sample code :
#!/usr/bin/perl -w
use strict;
use Gnome;
init Gnome "ztop.pl";
my $NAME = 'ZTop';
my $fontname = '-misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1';
my $w = new Gtk::Window -toplevel;
$w->set_title($NAME);
$w->set_policy(0, 1, 1);
$w->signal_connect( destroy => sub {exit} );
my $table = new Gtk::Table 1, 2, 0;
my $term = new Gnome::ZvtTerm;
$term->signal_connect(child_died => sub { exit });
$term->set_font_name($fontname);
$w->add($table);
$table->attach($term, 1,2, 0,1, [-expand, -shrink, -fill],
[-expand, -shrink, -fill], 0, 0);
show $term;
show $table;
show $w;
if ($term->forkpty(0) == 0) {
exec "/usr/bin/top";
kill "KILL", $$;
}
main Gtk;
You will of course need Gtk installed.
>
> JAPH
Sure - JALB I would say.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 20 Jun 2000 08:51:43 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Name/Value pair for a hyperlink?
Message-Id: <8in7qf$7c2$1@orpheus.gellyfish.com>
On 19 Jun 2000 11:54:11 +0100 Piers Cawley wrote:
>
> I've managed to exchange contacts data with a Psion 5 over IR.
> Apparently they both use vCards for beaming such info back and forth.
>
Theres also something called Obex ...
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 19 Jun 2000 23:32:53 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Net::NNTP question.
Message-Id: <8im72l$sde$1@orpheus.gellyfish.com>
On Mon, 19 Jun 2000 10:08:21 -0700 Tom Phoenix wrote:
>
> Odd. My real address is on my postings, but I spend more time each week
> dealing with _paper_ junk mail.
>
I'd concur with that and paper junk mail is far more costly as well ...
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 20 Jun 2000 08:17:26 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: NT or Unix at runtime
Message-Id: <8in5q6$78l$1@orpheus.gellyfish.com>
On Mon, 19 Jun 2000 03:29:05 PDT Larry R. Waibel wrote:
> I've got some scripts that I want to be able to run on either NT or HP-UX.
> What's the general/accepted/best way for a Perl script to determine at run time
> which OS it's running under? I'm using 'ccperl' that comes with Rational
> ClearCase and it doesn't set the $OSNAME/$^O variable (which is just an
> indication of which system it was compiled on, not the run-time anyway).
>
Well if the Perl you have doesnt set $^O then it is broken and you should
upgrade - who knows what else might be wrong with it. Also it is hardly
likely that a Perl was compiled on HP-UX and run on NT (and if it is under
some kind of emulation then it doesnt matter).
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
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 3427
**************************************