[10694] in Perl-Users-Digest
Perl-Users Digest, Issue: 4286 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 24 14:07:26 1998
Date: Tue, 24 Nov 98 11:04:45 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 24 Nov 1998 Volume: 8 Number: 4286
Today's topics:
Re: perl mods <gellyfish@btinternet.com>
Re: perl mods (Ronald J Kimball)
Perl performance on VMS <youngej@magpage.com>
Perl/Linux/DynaLoader Problem <jones@matisse.cs.albany.edu>
Re: Perl/Linux/DynaLoader Problem <dan@clockwork.net>
Please help me locate Perl Style Guide <kosan@slip.net>
Re: Please help me locate Perl Style Guide <due@murray.fordham.edu>
Please Help where can i download perl - <nic_azzuri@compuserve.com>
Re: Please Help where can i download perl - (Alastair)
problem connecting to database <stacy_maddocks@hotmail.com>
programming challenge: reference quandry <ichbin@physik.unizh.ch>
Re: programming challenge: reference quandry <pkg@studbox.uni-stuttgart.de>
Re: programming challenge: reference quandry (Andrew M. Langmead)
Re: programming challenge: reference quandry (David Huggins)
Re: programming challenge: reference quandry (Larry Rosler)
Re: Q: Parents and childs (Mike Stok)
Re: Question from a mega-geek <gellyfish@btinternet.com>
Re: Question from a mega-geek <uri@sysarch.com>
Re: Question from a mega-geek (Ronald J Kimball)
Re: Question from a mega-geek <stevenjm@olywa.net>
question on inode number to file name <leeky@ucalgary.ca>
Re: question on inode number to file name (Tad McClellan)
question <blu@mtu.edu>
Re: question (Alastair)
Re: question (Craig Berry)
Re: question (Martien Verbruggen)
Re: question (David Alan Black)
Re: question (Erik)
Re: Receiving and Responding to Cookies from a Server p (Martien Verbruggen)
regexp on multiple lines, etc. (John Joergensen)
Re: regexp on multiple lines, etc. <uri@fastengines.com>
Re: regexp on multiple lines, etc. (Tad McClellan)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 23 Nov 1998 23:04:23 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: perl mods
Message-Id: <73cpln$j1$1@gellyfish.btinternet.com>
On Sun, 22 Nov 1998 05:14:28 -0800 Frank <fdm@internethomeschool.com> wrote:
> what is a perl mod? I thought they only came from oysters?
>
Someone who wears Tonic Suits, Chelsea boots, Parkas and rides to work on a
Lambretta. As opposed to the more usual Perl hacker who would probably
wear a bin bag if it was the first thing to hand when they got up in the
afternoon ;-b And then you have the London Perl M[ou]ngers...
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Mon, 23 Nov 1998 23:40:49 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: perl mods
Message-Id: <1diyydg.1588vg6mb0qosN@bos-ip-2-212.ziplink.net>
Joergen W. Lang <jwl@worldmusic.de> wrote:
> Frank <fdm@internethomeschool.com> wrote:
>
> > what is a perl mod? I thought they only came from oysters?
>
> A Perl module ? Mod_perl ? Someone who likes to put loads of fancy
> mirrors and decorations around the computer screen while using Perl ?
> Hard to say.
The other day, I decided to tell() my dad that I wanted to pierce my()
Perl. He warn()ed me, "Perl modification leads to sin() and
degredation. I thought I brought you up with better values() than
that."
"Come on, man! perlfunc-iness is the big thing. Everybody's do{}ing
it!", I cried. I didn't understand why he was so alarm()ed.
"if() it gets infected, you could die().", my father observed, as
close(MINDED) as ever.
"Oh, you know that's not true. I feel like I'm living in a crypt(). I
just wantarray of sunshine in my drab life."
"Look here. As long as you're sleep()ing under my roof, paying $0 for
room and board, you'll do what I require. First you get your Perl
pierced; next THING you know, you'll be chop()ping up your whole
body..." (He went on at s ome length().) "...And you can forget about
getting the keys() to the car! Now, don't you have some study()ing to
do?"
"goto HELL", I muttered, hoping to get the last WORD.
"And stop using those exp()letives!", my pop() said, send()ing me to my
room.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 24 Nov 1998 04:19:07 GMT
From: Ed Young <youngej@magpage.com>
Subject: Perl performance on VMS
Message-Id: <73dc3r$plq$0@208.236.238.131>
------- Forwarded by Ed Young for Jan van der Weele
Request for Assistance - Perl VMS performance and tuning.
We use an unattended file transfer facility written in Perl on UNIX, NT,
and VMS. The implementations on UNIX and NT run at acceptable speeds.
Virtually the same code on VMS takes significantly longer (orders of
magnitude).
A simple benchmark program to measure some key Perl performance numbers
shows that operations which are crucial in our application are
significantly less efficient on VMS than on the other platforms:
HP-UX AIX W95 VMS
Times/Second: max index max index max index max
index
Increment Variable 8643 1.0 48166 1.0 4431 1.0
12601 1.0
Write disk record 4431 2.0 19353 2.5 3074 1.4
444 28.5
Open/close File 1731 5.0 3987 12.1 749 5.9 24
525.0
Open/close Direct 2092 4.1 2464 19.5 204 21.7
405 31.1
ReadDirectory 130 66.5 1087 44.3 204 21.7 14
900.1
File Test (-f) 4105 2.1 11242 4.3 1706 2.6 50
252.0
Subroutine Call/Return 1738 5.0 6031 8.0 1454 3.0 47
268.1
The Column 'Index' indicates the effort to perform the corresponding
action
relative to the time to increment a variable. For example, on HP-UX
calling
a subroutine takes 5 times as much effort than to increment a variable.
On
AIX, it takes 8 times, on W95 3 times, and on VMS 268 times as much
effort.
>From the table, it is clear that under VMS every action takes a lot more
resources that on the other platforms. The VMS Perl implementation was
compiled with DEC/C. Has anybody else experienced the same relative
performance penalty when using Perl on VMS? Are there any suggestions
how
we can improve its performance (e.g. other compiler, VMS quota
settings)?
Looking forward to any reactions...
------------------------------
Date: Sat, 21 Nov 1998 16:23:00 -0500
From: Richard Jones <jones@matisse.cs.albany.edu>
Subject: Perl/Linux/DynaLoader Problem
Message-Id: <Pine.SUN.3.95.981121161734.15853A-100000@matisse.cs.albany.edu>
Hi,
Using a stock Linux install (one of the Slackware versions, I
think) I'm trying to use the Socket.pm module with Perl 5.003. However,
it bails with the error:
Can't load '/usr/lib/perl5/i586-linux/5.003/auto/Socket/Socket.so' for
module Socket: Not an ELF file at /usr/lib/perl5/DynaLoader.pm line 140.
Doing file on the Socket.so file gives:
.../Socket.so: ELF 32-bit LSB dynamic lib i386 (386 and up) Version 1
I have no idea what could be wrong. I'd like to avoid a perl rebuild.
Any ideas are greatly appreciated.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard W. Jones jones@cs.albany.edu
University at Albany Computer Science Department
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
------------------------------
Date: Tue, 24 Nov 1998 10:56:50 -0600
From: Dan Brian <dan@clockwork.net>
Subject: Re: Perl/Linux/DynaLoader Problem
Message-Id: <365AE552.ADEA6636@clockwork.net>
A perl rebuild is strongly advised, especially if your install is a precompiled
distribution. The build is very easy, and very robust. Download 5.005 from CPAN.
Richard Jones wrote:
> Hi,
> Using a stock Linux install (one of the Slackware versions, I
> think) I'm trying to use the Socket.pm module with Perl 5.003. However,
> it bails with the error:
>
> Can't load '/usr/lib/perl5/i586-linux/5.003/auto/Socket/Socket.so' for
> module Socket: Not an ELF file at /usr/lib/perl5/DynaLoader.pm line 140.
>
> Doing file on the Socket.so file gives:
>
> .../Socket.so: ELF 32-bit LSB dynamic lib i386 (386 and up) Version 1
>
> I have no idea what could be wrong. I'd like to avoid a perl rebuild.
> Any ideas are greatly appreciated.
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Richard W. Jones jones@cs.albany.edu
> University at Albany Computer Science Department
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
------------------------------
Date: Mon, 23 Nov 1998 22:47:23 -0800
From: Kosan Koh <kosan@slip.net>
Subject: Please help me locate Perl Style Guide
Message-Id: <365A567B.EA4DEC60@slip.net>
Hi all,
I read the Perl Style Guide couple of months ago and thought it was very
well written. Today, I am trying to locate the Perl Style Guide again
listed on the page generated by
http://reference.perl.com/query.cgi?style
but the following link to the document is broken
http://www.cpan.org/doc/manual/html/pod/perlstyle.html
I am trying to get my team in my organization to adhere to a common
style when programming in Perl and would very much like to use that
document as a guide.
I would greatly appreciate it if anyone who knows the whereabouts of
this Perl Style Guide could kindly inform me.
Thanx a million. And of course use perl || die;
--
Regards,
Kosan
------------------------------
Date: 24 Nov 1998 11:42:43 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: Please help me locate Perl Style Guide
Message-Id: <73e63j$fc6$0@206.165.167.197>
Kosan Koh wrote in message <365A567B.EA4DEC60@slip.net>...
>Hi all,
>
>I read the Perl Style Guide couple of months ago and thought it was very
>well written. Today, I am trying to locate the Perl Style Guide again
>listed on the page generated by
>http://reference.perl.com/query.cgi?style
>
>but the following link to the document is broken
>
>http://www.cpan.org/doc/manual/html/pod/perlstyle.html
>I am trying to get my team in my organization to adhere to a common
>style when programming in Perl and would very much like to use that
>document as a guide.
>I would greatly appreciate it if anyone who knows the whereabouts of
>this Perl Style Guide could kindly inform me.
Um, it should be on your system. To the best of my knowledge it comes with
the Perl distribution. In the latest activestate version the default
location is in the
\Perl\5.00502\html\lib\pod\perlstyle.html subdirectory of the drive where
Perl is installed. If you have the Pod but not the HTML just use pod2html.
Lastly, a quick search using any search engine produces tons of hits.
For the Unix man page you might try the /usr/local/man/ directory.
AmD
------------------------------
Date: Tue, 24 Nov 1998 00:42:01 -0000
From: "MarcoPolo" <nic_azzuri@compuserve.com>
Subject: Please Help where can i download perl -
Message-Id: <ObXGRP0F#GA.252@nih2naac.prod2.compuserve.com>
I am new to perl and am trying to locate it to install onto a sparc 10
any answers would be excellent
Please Help where can i download perl
cheers nic
nic_azzuri@compuserve.com
------------------------------
Date: Tue, 24 Nov 1998 01:19:20 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Please Help where can i download perl -
Message-Id: <slrn75k2bl.au.alastair@calliope.demon.co.uk>
MarcoPolo <nic_azzuri@compuserve.com> wrote:
>I am new to perl and am trying to locate it to install onto a sparc 10
>any answers would be excellent
>
>Please Help where can i download perl
Many years of internet experience have honed my search skills to a remarkable
level and I suggest trying ;
http://www.perl.com
or
http://www.perl.org
Who'd have thought?
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Tue, 24 Nov 1998 04:21:27 GMT
From: Stacy Maddocks <stacy_maddocks@hotmail.com>
Subject: problem connecting to database
Message-Id: <365A260C.826864CA@hotmail.com>
All,
I'm trying to see if Bugzilla will do what we want it to do, but I'm
having trouble getting perl to connect to MySQL. I think the problem is
actually with DBI, since I wrote an incredibly simple perl script that
also could not connect to MySQL:
#!/usr/local/perl
use DBI;
my $dbh = DBI->connect('DBI:mysql:bugs:localhost','root','')
or die $DBI::errstr;
my $SQL = <<"EOT";
SELECT * FROM BUGS
EOT
my $cursor = $dbh->prepare($SQL);
$cursor->execute;
I get the following error in apache's error_log when I run bugzilla:
[Sun Nov 22 23:51:57 1998] query.cgi: Can't create data/params.14488 at
defparams.pl line 38.
Can't locate object method "Connect" via package "Mysql" at globals.pl
line 39 (#1)
(F) You called a method correctly, and it correctly indicated a
package
functioning as a class, but that package doesn't define that
particular
method, nor does any of its base classes.
system: Linux 2.0.35, 686, apache 2.x. I think I have the latest
modules. Any help is appreciated.
------------------------------
Date: Tue, 24 Nov 1998 17:18:56 +0100
From: David Wright <ichbin@physik.unizh.ch>
Subject: programming challenge: reference quandry
Message-Id: <365ADC52.79C51DA2@physik.unizh.ch>
Here's a reference quandry I have myself in:
I have a lot of foos, and some of them have an associated array. I
want to store references to the arrays in a hash, so
@$hash{'fooname'}
returns the array for foo fooname. So far so good. Here's the problem:
I construct this hash in a loop that looks, schematically, like
while ( <condition> ) {
$fooname = <read from file>;
@array = <read from file>
if ( <condition> ) {
$hash{'fooname'} = \@array;
}
}
What happens? All the pointers in the hash point to the same array!
Perl, quite reasonably, sees no reason to make a new @array each time
it runs over the loop.
What I think I need is to replace the conitional with some code like
if ( <condition> ) {
$hash{'fooname'} = \@array;
unname(@array);
}
unname(@array) shouldn't dispose of @array (after all, I want the
array to stay in memory, referenced by @$hash{'fooname'}) but it
should remove the association of the word "@array" from the array, so
that the next time the program encounters the word "@array", it makes
a new and different array.
I know how to get around this by using an array or arrays and storing
the first array index in the hash instead of reference, but that is an
ugly hack, and I would like to know the elegant solution.
------------------------------
Date: Tue, 24 Nov 1998 18:39:32 +0100
From: pete gilbert <pkg@studbox.uni-stuttgart.de>
Subject: Re: programming challenge: reference quandry
Message-Id: <365AEF54.52A184B9@studbox.uni-stuttgart.de>
David Wright wrote:
>
> Here's a reference quandry I have myself in:
>
> I have a lot of foos, and some of them have an associated array. I
> want to store references to the arrays in a hash, so
> @$hash{'fooname'}
> returns the array for foo fooname. So far so good. Here's the problem:
>
> I construct this hash in a loop that looks, schematically, like
> while ( <condition> ) {
> $fooname = <read from file>;
> @array = <read from file>
> if ( <condition> ) {
> $hash{'fooname'} = \@array;
> }
> }
> What happens? All the pointers in the hash point to the same array!
> Perl, quite reasonably, sees no reason to make a new @array each time
> it runs over the loop.
>
...
$hash{'fooname'} = [@array];
...
------------------------------
Date: Tue, 24 Nov 1998 18:07:29 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: programming challenge: reference quandry
Message-Id: <F2xuCH.Ist@world.std.com>
David Wright <ichbin@physik.unizh.ch> writes:
> @array = <read from file>
> if ( <condition> ) {
> $hash{'fooname'} = \@array;
> }
> }
>What happens? All the pointers in the hash point to the same array!
>Perl, quite reasonably, sees no reason to make a new @array each time
>it runs over the loop.
There is some information abou this in the perldsc man page, in the
section labled "COMMON MISTAKES".
One option is to use the anonymous array constructor operator:
$hash{'fooname'} = [ @array ];
To create a reference to a new array that has a copy of the contents
of the variables @array.
Another option is to make the variable @array lexically local to the
loop, so each iteration through the loop creates a new copy of @array.
while ( <condition> ) {
$fooname = <read from file>;
my @array = <read from file>; # new copy of array each iter.
if ( <condition> ) {
$hash{'fooname'} = \@array; # save this copy
}
}
The second method is slightly more efficient (it doesn't need to
create a copy of @array right before it deletes the original) but you
have to make sure that anyone maintaining the code is aware of the
subtle significance of where the declaration is placed.
--
Andrew Langmead
------------------------------
Date: 24 Nov 1998 13:03:23 -0500
From: bn711@freenet.carleton.ca (David Huggins)
Subject: Re: programming challenge: reference quandry
Message-Id: <87pvadq87o.fsf@freenet.carleton.ca>
David Wright <ichbin@physik.unizh.ch> writes:
> I construct this hash in a loop that looks, schematically, like
> while ( <condition> ) {
> $fooname = <read from file>;
> @array = <read from file>;
Alarm bells ringing! These should be lexically scoped, i.e. 'my'
variables. Just because Perl *has* dynamic scoping doesn't mean that
you should use it. 'use strict' will generally point this out to you.
> unname(@array) shouldn't dispose of @array (after all, I want the
> array to stay in memory, referenced by @$hash{'fooname'}) but it
> should remove the association of the word "@array" from the array, so
> that the next time the program encounters the word "@array", it makes
> a new and different array.
This is exactly what happens to lexically scoped variables when their
enclosing BLOCK ends. This is a very important distinction between
lexical variables in Perl and 'auto' variables in C; Perl lexicals,
being reference-counted and heap-allocated, are unbound, but not
necessarily destroyed, when they go out of scope.
Change the above example to:
while (condition) {
my $fooname = <$fh>; # Don't put "$fooname" in parentheses!
my @array = <$fh>;
And I predict you will succeed.
--
perl -Mstrict -l0we'print&{sub{my(@q)=@_;&{sub{my($q)=@_;&$q($q,@q)}}(sub{my
($p,$q,@q,$r)=@_;$q&&(($q,$r)=@$q)&&qq@$\$q: ${\(ref$r?$/.eval q:local$\.=qq
; ;;&$p($p,\@$r)::$r)}$/@.(&$p($p,@q)||q$$);});}}([name=>"David Huggins-Dain".
q[es]],[work=>[[school=>"linguist"],[elsewhere=>"Linux hacker (for hire)"]]])'
------------------------------
Date: Tue, 24 Nov 1998 10:41:09 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: programming challenge: reference quandry
Message-Id: <MPG.10c49d9eb3796a0898988c@nntp.hpl.hp.com>
In article <365AEF54.52A184B9@studbox.uni-stuttgart.de> on Tue, 24 Nov
1998 18:39:32 +0100, pete gilbert <pkg@studbox.uni-stuttgart.de> says...
> David Wright wrote:
...
> > while ( <condition> ) {
> > $fooname = <read from file>;
> > @array = <read from file>
> > if ( <condition> ) {
> > $hash{'fooname'} = \@array;
> > }
> > }
> > What happens? All the pointers in the hash point to the same array!
> > Perl, quite reasonably, sees no reason to make a new @array each time
> > it runs over the loop.
> ...
> $hash{'fooname'} = [@array];
Another way (not benchmarked, but seems to require less copying):
my @array = <read from file>
if ( <condition> ) {
$hash{'fooname'} = \@array;
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 24 Nov 1998 00:19:15 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Q: Parents and childs
Message-Id: <73cu23$82u@news-central.tiac.net>
In article <3659BEF6.5F7A2F76@hsr.ch>, Bernd Nies <bnies@hsr.ch> wrote:
>How can I check (without blocking with wait) from
>the parent process whether the forked child is still
>running or not?
One thing worth trying might be
$is_there = kill( 0, $kid_pid );
remembering that if it fails you should inspect $! to see whether there's
no such process or whether you're not allowed to deliver signals to it.
use POSIX qw/ errno_h /;
will let you use names like ESRCH or EPERM for values to compare against
$! if you don't want to inspect it as a string.
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: 23 Nov 1998 21:31:59 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Question from a mega-geek
Message-Id: <73ck8f$i7$1@gellyfish.btinternet.com>
On 21 Nov 1998 04:28:38 GMT brian d foy <comdog@computerdog.com> wrote:
> In article <36561CF5.706D9DDB@hotmail.com>, sara starre <nospam.perl_rocks@hotmail.com> posted:
>
>> OK I admit it I'm a total geek to ask this, but does anyone know where I
>> can buy "perl-phenelia"? I'd love to get a sew-on patch of that
>> "Programming Republic of PERL" with the camel on it for my jean jacket.
>
> there is the Perl Mongers t-shirt <URL:http://www.pm.org/> with the
> O'Reilly camel on it. all proceeds support Perl user groups :)
>
> --
> brian d foy <http://computerdog.com>
> Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
> Perl Mongers <URL:http://www.pm.org>
I think that the Perl Mongers t-shirt has a bug in it - I have been wearing
one quite frequently for nearly three weeks now and no-one has come up to me
and said "Me too, I'm a Perl Programmer". Is this really a bug or have I
missed some configuration option ?
;-}
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 23 Nov 1998 20:33:27 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Question from a mega-geek
Message-Id: <x7ww4lzxg8.fsf@sysarch.com>
>>>>> "JS" == Jonathan Stowe <gellyfish@btinternet.com> writes:
JS> I think that the Perl Mongers t-shirt has a bug in it - I have
JS> been wearing one quite frequently for nearly three weeks now and
JS> no-one has come up to me and said "Me too, I'm a Perl Programmer".
JS> Is this really a bug or have I missed some configuration option ?
maybe you haven't washed it frequently enough?
:-)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Mon, 23 Nov 1998 23:40:51 -0500
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Question from a mega-geek
Message-Id: <1diyzwu.b934laskuj7xN@bos-ip-2-212.ziplink.net>
Jonathan Stowe <gellyfish@btinternet.com> wrote:
> I think that the Perl Mongers t-shirt has a bug in it - I have been wearing
> one quite frequently for nearly three weeks now and no-one has come up to me
> and said "Me too, I'm a Perl Programmer". Is this really a bug or have I
> missed some configuration option ?
You're wearing the design on the outside, right?
If not, take the shirt off, reverse() it, and put it back on.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Mon, 23 Nov 1998 23:47:11 -0800
From: Steven May <stevenjm@olywa.net>
Subject: Re: Question from a mega-geek
Message-Id: <365A647F.595FCF0E@olywa.net>
Ronald J Kimball wrote:
>
> Jonathan Stowe <gellyfish@btinternet.com> wrote:
>
> > I think that the Perl Mongers t-shirt has a bug in it - I have been wearing
> > one quite frequently for nearly three weeks now and no-one has come up to me
> > and said "Me too, I'm a Perl Programmer". Is this really a bug or have I
> > missed some configuration option ?
>
> You're wearing the design on the outside, right?
>
> If not, take the shirt off, reverse() it, and put it back on.
>
> --
> _ / ' _ / - aka - rjk@coos.dartmouth.edu
> ( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
> / http://www.ziplink.net/~rjk/
> "It's funny 'cause it's true ... and vice versa."
Or it could be a scoping issue, no one outside his block can see it.
Steve May
www.blackwater-pacific.com
------------------------------
Date: Tue, 24 Nov 1998 09:22:58 -0700
From: Kin Yee Lee <leeky@ucalgary.ca>
Subject: question on inode number to file name
Message-Id: <73emdp$mes@ds2.acs.ucalgary.ca>
Hello everyone,
Given an inode number, is it possible to find the file name from it?
I'm trying to implement a utility like the AIX's filemon using lsof; the
problem is that lsof only return the inode number of the open file. Any
better idea?
Thank You for any help in advance.
Kin Lee
leeky@ucalgary.ca
------------------------------
Date: Tue, 24 Nov 1998 13:03:33 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: question on inode number to file name
Message-Id: <5uve37.0hk.ln@flash.net>
Kin Yee Lee (leeky@ucalgary.ca) wrote:
: Given an inode number, is it possible to find the file name from it?
^^^
^^^ ??
An inode may have more than one filename.
prompt> touch file
prompt> ln file file2
that inode has *both* 'file' and 'file2' filenames...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 24 Nov 1998 01:05:22 GMT
From: Bing Lu <blu@mtu.edu>
Subject: question
Message-Id: <73d0oi$ert$1@campus1.mtu.edu>
couple questions, does any1 know where the source code for vi is under unix
and what is a good source if i want to learn abt shell scripts
thx in adv blu@mtu.edu
------------------------------
Date: Tue, 24 Nov 1998 01:33:19 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: question
Message-Id: <slrn75k35s.au.alastair@calliope.demon.co.uk>
Bing Lu <blu@mtu.edu> wrote:
>couple questions, does any1 know where the source code for vi is under unix
>and what is a good source if i want to learn abt shell scripts
>
>thx in adv blu@mtu.edu
This is a _perl_ newsgroup. Do you have a question about perl?
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: 24 Nov 1998 01:32:29 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: question
Message-Id: <73d2bd$ok0$1@marina.cinenet.net>
Bing Lu (blu@mtu.edu) wrote:
: couple questions, does any1 know where the source code for vi is under unix
: and what is a good source if i want to learn abt shell scripts
:
: thx in adv blu@mtu.edu
My only qstn: wht ths hs 2 do wth Prl?
--
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "The hills were burning, and the wind was raging; and there
was no more room in the Garden of Allah."
------------------------------
Date: Tue, 24 Nov 1998 01:57:06 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: question
Message-Id: <Sno62.75$Jo2.294@nsw.nnrp.telstra.net>
In article <73d0oi$ert$1@campus1.mtu.edu>,
Bing Lu <blu@mtu.edu> writes:
> couple questions, does any1 know where the source code for vi is under unix
> and what is a good source if i want to learn abt shell scripts
Who is any1? And why do you think we know what this person knows?
Why are you asking about source code for an editor on this group? Why
are you asking for source code for an editor for a platform that
always includes this editor? If you want to learn abt shell scripts
(whatever sort of shell that is), why are you asking in clp.misc?
I suggest you go to comp.editors or something. I also suggest you try
typing vi at your shell prompt, just to see if maybe it works.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au |
Commercial Dynamics Pty. Ltd. | Curiouser and curiouser, said Alice.
NSW, Australia |
------------------------------
Date: 23 Nov 1998 21:06:13 -0500
From: dblack@pilot.njin.net (David Alan Black)
Subject: Re: question
Message-Id: <73d4al$9n1$1@pilot.njin.net>
cberry@cinenet.net (Craig Berry) writes:
>Bing Lu (blu@mtu.edu) wrote:
>: couple questions, does any1 know where the source code for vi is under unix
>: and what is a good source if i want to learn abt shell scripts
>:
>: thx in adv blu@mtu.edu
>My only qstn: wht ths hs 2 do wth Prl?
0.
David Black
dblack@pilot.njin.net
------------------------------
Date: 24 Nov 1998 01:31:41 GMT
From: eln@cyberhighway.net (Erik)
Subject: Re: question
Message-Id: <73d29t$7k6$2@news.cyberhighway.net>
In article <73d0oi$ert$1@campus1.mtu.edu>,
Bing Lu <blu@mtu.edu> writes:
> couple questions, does any1 know where the source code for vi is under unix
> and what is a good source if i want to learn abt shell scripts
Show us your script, tell us what it does, and what you expected it to do.
Oh wait, that question has nothing at all to do with Perl.
I think you've got the wrong newsgroup, pal.
--
Erik Nielsen, Cyberhighway Internet Services NOC
It is, of course, written in Perl. Translation to C is left as an
exercise for the reader. :-) -- Larry Wall in <7448@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Mon, 23 Nov 1998 23:45:31 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Receiving and Responding to Cookies from a Server perl script
Message-Id: <vsm62.54$Jo2.204@nsw.nnrp.telstra.net>
In article <3659E65F.AD176DB9@mindspring.com>,
Tim Turner <torrid@mindspring.com> writes:
> Is it possible to have a perl program that is accessing a web
> site "on the backend" from inside the script receive that cookie info
> and store it in a way that it can offer it up to the other server so it
> can automagically move around through the forms on th eother server
> without losing the authentication.?
Use LWP, also known as libwww. Get it from CPAN
(http://www.perl.com/CPAN/). Use the LWP::UserAgent module and its
cookie_jar method.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Unix is user friendly. It's just
Commercial Dynamics Pty. Ltd. | selective about it's friends.
NSW, Australia |
------------------------------
Date: Tue, 24 Nov 98 17:45:50 GMT
From: jjoerg@crab.rutgers.edu (John Joergensen)
Subject: regexp on multiple lines, etc.
Message-Id: <73ercg$1g5$1@newsmonger.rutgers.edu>
Hi. I hope someone can help with this.
Here's the situation: I have documents where I have to do many find
operations. I will be getting multiple matches on some lines, and, there are
several instances where the expression will span two lines.
I have the regexp set to global (ie. m/regexp/g), and I set the $/ parameter
to null (so I can slurp paragraphs, but not the whole file. I also set the
expression to accept return chrarcters in all the where the expression may be
wrapped. So far, so good.
The problem is, when I set the $/ to null, I am only getting one match per
paragraph.
What am I doing wrong?
Thanks,
John Joergensen
P.S. I have been scouring Programming Perl and Mastering Regular Expressions
and have not found an answer that works.
------------------------------
Date: 24 Nov 1998 13:50:23 -0500
From: Uri Guttman <uri@fastengines.com>
Subject: Re: regexp on multiple lines, etc.
Message-Id: <sarg1b99b80.fsf@camel.fastserv.com>
>>>>> "JJ" == John Joergensen <jjoerg@crab.rutgers.edu> writes:
JJ> I have the regexp set to global (ie. m/regexp/g), and I set the $/
JJ> parameter to null (so I can slurp paragraphs, but not the whole
JJ> file. I also set the expression to accept return chrarcters in
JJ> all the where the expression may be wrapped. So far, so good.
JJ> The problem is, when I set the $/ to null, I am only getting one
JJ> match per paragraph.
$/ has nothing to do with regexes, only reading files.
JJ> What am I doing wrong?
what is wrong is you didn't post any of your broken code, so we can't
figure how to fix it. post code and example data and show the results.
hth,
uri
--
Uri Guttman Fast Engines -- The Leader in Fast CGI Technology
uri@fastengines.com http://www.fastengines.com
------------------------------
Date: Tue, 24 Nov 1998 13:46:09 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: regexp on multiple lines, etc.
Message-Id: <1e2f37.uok.ln@flash.net>
John Joergensen (jjoerg@crab.rutgers.edu) wrote:
: I have the regexp set to global (ie. m/regexp/g), and I set the $/ parameter
: to null (so I can slurp paragraphs, but not the whole file. I also set the
: expression to accept return chrarcters in all the where the expression may be
: wrapped. So far, so good.
: The problem is, when I set the $/ to null, I am only getting one match per
: paragraph.
: What am I doing wrong?
^^^^^^^^^^^^^^^^^^^^^
Not posting a small and complete program that illustrates
your problem.
We (usually) cannot troubleshoot code that we cannot see.
;-)
Something like:
---------------------------
#!/usr/bin/perl -w
$/ = ''; # paragraph mode
while (<DATA>) {
while ( m/comment:(.+\n.+)/g ) {
print "matched ==>$1<==\n";
}
}
__DATA__
comment: have a nice day
comment: have two
nice days
comment: have a
whole month of nice
days
comment: have another a nice day
---------------------------
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 4286
**************************************