[19355] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1550 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 17 11:05:32 2001

Date: Fri, 17 Aug 2001 08:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <998060708-v10-i1550@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 17 Aug 2001     Volume: 10 Number: 1550

Today's topics:
    Re: capitalisation/DBD/mysql (Tad McClellan)
    Re: capitalisation/DBD/mysql <paul@net366.com>
        Deleting Files from a DIR (Pete Sohi)
    Re: Deleting Files from a DIR <Tassilo.Parseval@post.rwth-aachen.de>
    Re: Deleting Files from a DIR <bart.lateur@skynet.be>
    Re: Deleting Files from a DIR <Tassilo.Parseval@post.rwth-aachen.de>
    Re: Deleting Files from a DIR <bart.lateur@skynet.be>
    Re: Deleting Files from a DIR <Tassilo.Parseval@post.rwth-aachen.de>
    Re: Help!  Multiple line extract from file based on use <davidhilseenews@yahoo.com>
    Re: Help!  Multiple line extract from file based on use (Lyle)
    Re: Help!  Multiple line extract from file based on use (Eric Bohlman)
    Re: Help!  Multiple line extract from file based on use (Eric Bohlman)
    Re: Is $! a number or a string? <dan@tuatha.sidhe.org>
    Re: Looking for Script (T Mesbah)
        POD bug in 5.6.0? <foth@informatik.uni-hamburg.de>
    Re: Processing a scalar in the same way of a filehandle (Tad McClellan)
    Re: Processing a scalar in the same way of a filehandle <bart.lateur@skynet.be>
        regexp question with no answer yet <lbrtchx@hotmail.com>
    Re: Search string how <paul@net366.com>
    Re: Search string how (Tassilo v. Parseval)
    Re: Using manpages?? (Tad McClellan)
    Re: Using manpages?? <mjcarman@home.com>
    Re: what does this message mean? (Tad McClellan)
    Re: what does this message mean? (Anno Siegel)
    Re: what does this message mean? (Anno Siegel)
    Re: what does this message mean? <Tassilo.Parseval@post.rwth-aachen.de>
    Re: what does this message mean? (Anno Siegel)
    Re: what does this message mean? <Tassilo.Parseval@post.rwth-aachen.de>
    Re: what does this message mean? <mjcarman@home.com>
    Re: what does this message mean? <mjcarman@home.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 17 Aug 2001 07:58:40 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: capitalisation/DBD/mysql
Message-Id: <slrn9nq1ng.a9h.tadmc@tadmc26.august.net>

Paul Fortescue <paul@net366.com> wrote:

>Sadly, Windows and LINUX are different. 


Happily, Windows and Linux are different.


>I have failed to DBI->connect under
>the LINUX, but I can't get access to STDERR I think. I can only output to a
>browser.


I doubt that you can only output to a browser.

Have you _tried_ outputting to the command line?


>but if I say
>
>    print DBI::errstr . "\n<BR>";
           ^^^^^^^^^^^


That is not how you access a class variable. Variables need
a funny character (sigil) in front of them:

   print $DBI::errstr . "\n<BR>";
         ^
         ^

>I get 500 Internal Server Error which usually means I have a PERL script
>error of a major nature.


Then run your CGI program from the command line for debugging.


>Any stunning ideas what I can do? 


Run from the command line when debugging.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Fri, 17 Aug 2001 15:46:30 +0100
From: "Paul Fortescue" <paul@net366.com>
Subject: Re: capitalisation/DBD/mysql
Message-Id: <998059515.20357.0.nnrp-13.d4f094e4@news.demon.co.uk>

>
> >Sadly, Windows and LINUX are different.
>
>
> Happily, Windows and Linux are different.

Annoyingly, Windows ActivePerl and Perl for UNIX/LINUX are very different,
like mkdir in Windows doesn;t need the MOD but Linux does.
>
>
> >I have failed to DBI->connect under
> >the LINUX, but I can't get access to STDERR I think. I can only output to
a
> >browser.
>
> I doubt that you can only output to a browser.
>
> Have you _tried_ outputting to the command line?
>
I can, but I am only a poor user of the server, which is in a country not
adjacent to mine.
>
> >but if I say
> >
> >    print DBI::errstr . "\n<BR>";
>            ^^^^^^^^^^^
>
>
> That is not how you access a class variable. Variables need
> a funny character (sigil) in front of them:
>
True, thanks, I copied it from the web, what an idiot!

>    print $DBI::errstr . "\n<BR>";
>          ^
>          ^
>
> >I get 500 Internal Server Error which usually means I have a PERL script
> >error of a major nature.
>
>
> Then run your CGI program from the command line for debugging.
>
I can't. It works in Windows. Actually thanks to you guys it works now, what
had happened is that my esteemed administrator had changed the password on
root to NULL, and he has subsequently been shot.
>
> >Any stunning ideas what I can do?
>
>
> Run from the command line when debugging.
>
I can't. See above, but thanks anyway!
>
> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas




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

Date: 17 Aug 2001 06:08:39 -0700
From: amanpreet.sohi@sbs.siemens.co.uk (Pete Sohi)
Subject: Deleting Files from a DIR
Message-Id: <1ab8c4be.0108170508.3d7c1253@posting.google.com>

Hello code warriors:

First one to answer this question gets a jolly good drink on me. (Just
send me your address and Ill send you the miniature bottle of Absynth
ASAP! :-))

How do you delete files from a dir? (preferrably in a platform
independent way)

The methods COPY and MOVE are available from the FILE:: package but I
cant seem to find an associated DELETE function (or have I overlooked
something altogether?)...

Cheers folks!

Pete.


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

Date: Fri, 17 Aug 2001 15:14:48 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Deleting Files from a DIR
Message-Id: <3B7D18C8.5090802@post.rwth-aachen.de>

Pete Sohi wrote:
> Hello code warriors:
> 
> First one to answer this question gets a jolly good drink on me. (Just
> send me your address and Ill send you the miniature bottle of Absynth
> ASAP! :-))
> 
> How do you delete files from a dir? (preferrably in a platform
> independent way)
> 
> The methods COPY and MOVE are available from the FILE:: package but I
> cant seem to find an associated DELETE function (or have I overlooked
> something altogether?)...

You can't find one because it has a different name.

'perldoc -f unlink'

Read that in case you also want to delete directories since unlink() 
then no longer is your friend.


Tassilo--
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: Fri, 17 Aug 2001 13:24:40 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Deleting Files from a DIR
Message-Id: <0r6qntsbvf1mcbod367p3gk6mknrpp60pt@4ax.com>

Tassilo von Parseval wrote:

>'perldoc -f unlink'
>
>Read that in case you also want to delete directories since unlink() 
>then no longer is your friend.

No. In that case you need "rmdir". The directory should be empty, or it
will fail (and that is a feature!).

-- 
	Bart.


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

Date: Fri, 17 Aug 2001 16:18:09 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Deleting Files from a DIR
Message-Id: <3B7D27A1.6000702@post.rwth-aachen.de>

Bart Lateur wrote:
> Tassilo von Parseval wrote:
> 
> 
>>'perldoc -f unlink'
>>
>>Read that in case you also want to delete directories since unlink() 
>>then no longer is your friend.
>>
> 
> No. In that case you need "rmdir". The directory should be empty, or it
> will fail (and that is a feature!).

Read again what I had written. ;-)

I recommended reading it _if_ he also wants to delete directories since 
the docs explicitely say that one needs to use rmdir for that....or 
being superuser using the -U switch.

Tassilo--
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: Fri, 17 Aug 2001 14:28:37 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Deleting Files from a DIR
Message-Id: <vgaqntggdrir07p7irl3cbjt8gf8gh28cl@4ax.com>

Tassilo von Parseval wrote:

>>>'perldoc -f unlink'
>>>
>>>Read that in case you also want to delete directories since unlink() 
>>>then no longer is your friend.
>>>
>> 
>> No. In that case you need "rmdir". The directory should be empty, or it
>> will fail (and that is a feature!).
>
>Read again what I had written. ;-)

Read again what *I* have written. Despite the "no", I am agreeing with
you. I just gave some additional info.

-- 
	Bart.


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

Date: Fri, 17 Aug 2001 16:32:04 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
To: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Deleting Files from a DIR
Message-Id: <3B7D2AE4.9050001@post.rwth-aachen.de>

Bart Lateur wrote:

>>Read again what I had written. ;-)
>>
> 
> Read again what *I* have written. Despite the "no", I am agreeing with
> you. I just gave some additional info.

Errr...first word I read was "No" and thus I sensed contradiction. :-)
All should be fine now.

Tassilo
-- 
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: Fri, 17 Aug 2001 13:40:05 GMT
From: "David Hilsee" <davidhilseenews@yahoo.com>
Subject: Re: Help!  Multiple line extract from file based on user input.
Message-Id: <V89f7.719$c81.226099@news1.rdc1.md.home.com>


"B. Caligari" <bcaligari@fireforged.com> wrote in message
news:9li89j066m@enews1.newsguy.com...
>
> "David Hilsee" <davidhilseenews@yahoo.com> wrote in message
> news:M71f7.17069$L9.5569251@news1.rdc1.md.home.com...
> >
> > "Joe Schaefer" <joe+usenet@sunstarsys.com> wrote in message
> >
> > $input = '2,6,4,90-100';
> >
> > my @command =
> >     map { s/-/../ or $_ .= "..$_"; "print if $_;" }
> > split /,/, $input;
> >
> > eval "while ( <> ) { @command }";
> >
> > die $@ if $@;
> >
> > David Hilsee
> >
>
> Cool, but the order of the 'print list' is not preserved.
>
> B.
>
>

Ah, I somehow missed that part. I was a little confused by his wording.
FWIW:

my $input = "1-3,6,4,15,9-12";

my @inputs = split /,/, $input;
my ($tmp,%hash) = ();
my @command =
    map {
        ($tmp = $_) =~ s/-/../ or $tmp = "$_..$_";
        "push \@{ \$hash{'$_'} }, \$_ if $tmp;"
    }
@inputs;

eval "while ( <> ) { @command }";
die $@ if $@;

foreach ( @inputs ) { print @{$hash{$_}}; }


David Hilsee




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

Date: 17 Aug 2001 07:09:12 -0700
From: lbeckm3@hotmail.com (Lyle)
Subject: Re: Help!  Multiple line extract from file based on user input.
Message-Id: <d3e3ca54.0108170609.74c9d33e@posting.google.com>

Perfect!!!  Thanks a lot all, I have the code working like a champ
thanks to you guys/gals!!

-Lyle


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

Date: 17 Aug 2001 14:30:57 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Help!  Multiple line extract from file based on user input.
Message-Id: <9lj9r1$c6i$2@bob.news.rcn.net>

Bart Lateur <bart.lateur@skynet.be> wrote:
> But this slurps in the whole file. I would populate a hash, and include
> the record if $. is in the hash.

> 	my %include; @include{/\d+/g} = ();
> 	while(<>) {
> 	     print if exists $include{$.}
> 	}

How about using Set::IntSpan?



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

Date: 17 Aug 2001 14:58:46 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Help!  Multiple line extract from file based on user input.
Message-Id: <9ljbf6$rhq$1@bob.news.rcn.net>

Eric Bohlman <ebohlman@omsdev.com> wrote:
> Bart Lateur <bart.lateur@skynet.be> wrote:
>> But this slurps in the whole file. I would populate a hash, and include
>> the record if $. is in the hash.

>> 	my %include; @include{/\d+/g} = ();
>> 	while(<>) {
>> 	     print if exists $include{$.}
>> 	}

> How about using Set::IntSpan?

On second thought, that won't be helpful because it won't preserve the 
order of the print list.



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

Date: Fri, 17 Aug 2001 14:28:56 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Is $! a number or a string?
Message-Id: <IS9f7.257553$v5.26593195@news1.rdc1.ct.home.com>

John Lin <johnlin@chttl.com.tw> wrote:
> Can I make this magic of my own?  (I believe the answer is "Yes".)
> Thus, I can create an "iterator" to walk through my message table.

Yes you can, and it really is magic. Check out the sections of
perlguts on magic variables, and grovel through the magic source
in mg.c. You'll need XS, and don't expect much documentation,
as there really isn't much.

				Dan


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

Date: 17 Aug 2001 07:05:46 -0700
From: tmesbah@hotmail.com (T Mesbah)
Subject: Re: Looking for Script
Message-Id: <6e9d9699.0108170605.2eddec74@posting.google.com>

The reason of using a static route is that we use encryptor on front
of the router and these encryptor block all routing protocols and the
only way to make it working is to use static route. I am looking for
script to remove the static route and use an another path without
caming in at the office and remove them manually.

Thanks


"Ian M" <ian.mulvihill.no.spam@computer.org> wrote in message news:<3b7bc173$0$227$cc9e4d1f@news.dial.pipex.com>...
> "Dennis H" <dennis@noreplies.com> wrote in message
> news:KGOe7.42984$rV6.2110903@e420r-atl2.usenetserver.com...
> >
> >
> > Uhhhh... why?
> >
> >
> > "T Mesbah" <tmesbah@hotmail.com> wrote in message
> > news:6e9d9699.0108151340.4493cafd@posting.google.com...
> > > Hi,
> > >
> > > 1) I have two Cisco router routerA and routerB.
> > > 2) In routerA I have static route "ip route X.X.X.X Y.Y.Y.Y Z.Z.Z.Z"
> > > to access routerB.
> > >
> > > I am looking for script that ping routerB each 5 minutes and if
> > > routerB is down then the script need to telnet to routerA and remove
> > > these static route.
> > >
> > > Many Thanks
> >
> >
> 
> That's what routing protocols are for.  Is this too easy and efficient?
> 
> Either you have a more complicated and unsual reason to do it this way, or
> misunderstand the (preferable) options.  Do you want clarify what you're
> trying to solve, and we could make some suggestions?
> 
> 
> Cheers,
> Ian


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

Date: 17 Aug 2001 13:56:54 GMT
From: "Kilian A. Foth" <foth@informatik.uni-hamburg.de>
Subject: POD bug in 5.6.0?
Message-Id: <9lj7r6$1d0$1@rzsun03.rrz.uni-hamburg.de>

The man pages in my Solaris perl 5.6.0 have numerous lines in the
wrong order, such as 


   files.
        Break-out the reusable code into one or more separate module


where the pod source correctly has


   =item Break-out the reusable code into one or more separate module files.


Am I doing something wrong? I thought I had done the most standard
install conceivable.

-- 
``*Man*, that was annoying!''
                                                   -- Princess Fiona





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

Date: Fri, 17 Aug 2001 08:03:39 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Processing a scalar in the same way of a filehandle
Message-Id: <slrn9nq20r.a9h.tadmc@tadmc26.august.net>

Miguel Manso <mmanso@baco.prodigio.pt> wrote:
>
>I've a scalar with a bunch of text. I'd like to process it on the
>"paragraph" way. It I has a filehandle, I would do this:
>
>$/ = "";
>while(<FH>) {
>  my $p = $_;
>}

   while ( my $p = <FH> ) {

If you want it in $p, then put it in $p from the start. No need
to copy it around.


>perl is wonderful :)


Well, yes.


>Now, I've $cnt and I'd like to be able to do the same thing. Is it possible?


Sure:

   while ( my $cnt = <FH> ) {

But I expect you wanted to ask a different question...


>I've tried some things but none worked :(


We cannot help fix unseen code (hint).


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Fri, 17 Aug 2001 13:35:02 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Processing a scalar in the same way of a filehandle
Message-Id: <ld7qntkbg6enc2irt3g6egubp3amv9j0fh@4ax.com>

Miguel Manso wrote:

>I've a scalar with a bunch of text. I'd like to process it on the
>"paragraph" way. It I has a filehandle, I would do this:
>
>$/ = "";
>while(<FH>) {
>  my $p = $_;
>}
>
>perl is wonderful :)
>
>Now, I've $cnt and I'd like to be able to do the same thing. Is it possible?

In principle, yes. The TIEHANDLE mechanism allows you to do this. And
you don't even have to roll your own, as IO::Scalar (see IO::Stringy on
CPAN) provides several interfaces.

But it looks like a hard module to use, I couldn't make this work right
in under a few minutes.

-- 
	Bart.


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

Date: Fri, 17 Aug 2001 10:28:57 -0400
From: "Albretch" <lbrtchx@hotmail.com>
Subject: regexp question with no answer yet
Message-Id: <998059410.382598@zver>

 I have been searching for an answer to the following problem:

 Knowing all possible outputs given a regexp and the maximal length of the
string results.

 I am concretely thingking about a method call that would expand into an
array of possible strings of charaters.

 It could be mathematically demostrated that given the possible maximal
length of the result strings, there is a finite number of them.

 Intuition could be squarely wrong, but I have the very strong feeling that
there should be something like that. Well, maybe I am getting to these
issues from another perspective and I am wishfully thinking (and lazyly
wanting :-), for there to be something like that.

 Again, I could be basically wrong in my approach, please let me know.




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

Date: Fri, 17 Aug 2001 14:07:08 +0100
From: "Paul Fortescue" <paul@net366.com>
Subject: Re: Search string how
Message-Id: <998053637.17711.0.nnrp-13.d4f094e4@news.demon.co.uk>

>
> I need to search a string for values between 1 and 7.
> If  a value exists I have to add a certain value to another value.
> The value searched for  can look like "123457" it has to be search for
> each value, thus for 1 for 2, for 3 etc.
>
> How do I do this in perl?

have I missed the point?

m/[1-7]/

so

$string="123457";
$another+=$certain while $string=~m/[1-7]/g;

Paul





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

Date: 17 Aug 2001 13:11:32 GMT
From: Tassilo.Parseval@post.rwth-aachen.de (Tassilo v. Parseval)
Subject: Re: Search string how
Message-Id: <9lj564$mj4$1@nets3.rz.RWTH-Aachen.DE>

On Fri, 17 Aug 2001 14:51:58 +0200, Albert <nospam@nospam.nl> wrote:
> Hello,
> 
> I need to search a string for values between 1 and 7.
> If  a value exists I have to add a certain value to another value.
> The value searched for  can look like "123457" it has to be search for
> each value, thus for 1 for 2, for 3 etc.
> 
> How do I do this in perl?

Not sure what you mean with the adding-part, but here is a starting
point:

my $n = "asdkajskjk156372";
my @matched = ($n =~ m/[1234567]/g);

@matched will then contain all numbers in the range of 1 .. 7 that have
been matched. Mark this: This matches single numbers. The g-modifier
will prevent that m// bails out after the first match.

Tassilo

-- 
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: Fri, 17 Aug 2001 07:46:34 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Using manpages??
Message-Id: <slrn9nq10q.a9h.tadmc@tadmc26.august.net>

Carlos C. Gonzalez <miscellaneousemail@yahoo.com> wrote:
>In article <9liba3$2tu$2@nets3.rz.RWTH-Aachen.DE>, Tassilo v. Parseval at 
>Tassilo.Parseval@post.rwth-aachen.de says...
>
>Go to http://www.cygwin.com and download the Cygwin environment. 
>
>I have been looking at that Tassilo.  It looks like a winner and I think 
>I will install it.  The only problem for me is one of getting up to 
>speed.  I mean there is so much to learn that I am experiencing 
>information overload.  For every step I go forward I feel like I have to 
>backtrack two to have my knowledge catch up with my practice.  If you 
>know what I mean.  I can honestly see why so many programmers that start 
>on Windows seem to stay in Windows.  


It is easy to learn to drive in a Ford Escort, but once you're done
all you can do is drive to work and the supermarket.

It is harder to learn to drive in a Formula F-1 car, but once you're
done you can do lots of stuff. Like flip off Law Enforcement Officers
and get away with it.  :-)

Power has its price.

If it was easy, anyone could do it and they wouldn't have to pay us 
the big bucks  :-)


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Fri, 17 Aug 2001 08:13:48 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: Using manpages??
Message-Id: <3B7D188C.E9D5649A@home.com>

"Carlos C. Gonzalez" wrote:
> 
> In article <3B7C8F19.74FB86E@stomp.stomp.tokyo>, Godzilla! at
> godzilla@stomp.stomp.tokyo says...
> 
> > Personally, I hold an opinion both you and your
> > troll articles amount to nothing more than canned
> > mule manure.
> >
> 
> I wish you well Godzilla.  For all your success you sound like
> you have a lot of bitterness and pent up anger in you.

Carlos, you've been doing pretty well at fitting in here. Don't let
Godzilla lead you down the path of darkness. She's a troll. While there
is on rare occasions something of value in her postings, it is not
(IMHO) worth wading through the plethora of crap she produces. You would
do well to ignore her.

-mjc


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

Date: Fri, 17 Aug 2001 08:55:02 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: what does this message mean?
Message-Id: <slrn9nq516.add.tadmc@tadmc26.august.net>

Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de> wrote:
>Samneric wrote:
>> meow wrote:
>> 
>>>use lib "/path/to/my/install/module/directory/own_dir";
>>>
>>>what's wrong in this?
>> 
>> Perhaps that your path is a "this" instead of a "these"?
> >
> > The module docs say:
> > use lib LIST
> >
> > Not:
> > use lib SCALAR
>
>But this can't be the reason. 


That part is correct.


>According to the docs, print() also takes 
>a LIST as argument, yet 'print $a' works splendidly.


But the above does not support your position.

'print $a' _is_ printing a list, it is just a short list.

No DWIMery, nothing to see here, move along...


>And I am very positive that I often write:
>
>use lib "..";
>
>with no obvious misfunction.


That is not the same thing at all. Here perl is DWIMing your
scalar into a one-element list, same as if you typed:


   use lib ("..");

or

   use lib qw(..);


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 17 Aug 2001 13:46:52 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: what does this message mean?
Message-Id: <9lj78c$71t$1@mamenchi.zrz.TU-Berlin.DE>

According to Bart Lateur  <bart.lateur@skynet.be>:
> meow wrote:
> 
> >yeah, i did run the makefile and install the module at my own_dir...
> >in my script i did specified a perl seach path:
> >
> >use lib "/path/to/my/install/module/directory/own_dir";
> >
> >what's wrong in this?
> 
> It looks fine. ...

 ...but it wasn't in effect when the long-snipped error message from
the original posting was produced:

> Can't locate loadable object for module IO::Tty in @INC (@INC contains:
> /$path1 /$path2 $path3
>  .) at  /$path1/Tty.pm line 26

This looks like a misguided attempt at setting @INC.

Anno


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

Date: 17 Aug 2001 14:00:58 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: what does this message mean?
Message-Id: <9lj82q$71t$2@mamenchi.zrz.TU-Berlin.DE>

According to Tad McClellan <tadmc@augustmail.com>:
> Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de> wrote:
> >Samneric wrote:

[...]

> > > The module docs say:
> > > use lib LIST
> > >
> > > Not:
> > > use lib SCALAR
> >
> >But this can't be the reason. 
> 
> 
> That part is correct.
> 
> 
> >According to the docs, print() also takes 
> >a LIST as argument, yet 'print $a' works splendidly.
> 
> 
> But the above does not support your position.
> 
> 'print $a' _is_ printing a list, it is just a short list.
> 
> No DWIMery, nothing to see here, move along...
> 
> 
> >And I am very positive that I often write:
> >
> >use lib "..";
> >
> >with no obvious misfunction.
> 
> 
> That is not the same thing at all. Here perl is DWIMing your

I don't see why you say that.  How is "use lib $a" different from,
say, "print FILE $a"?  Both find a single scalar where LIST is
specified use the one-element list.

Anno


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

Date: Fri, 17 Aug 2001 16:13:38 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: what does this message mean?
Message-Id: <3B7D2692.9080708@post.rwth-aachen.de>

Tad McClellan wrote:

[...]

> 'print $a' _is_ printing a list, it is just a short list.

> No DWIMery, nothing to see here, move along...
      ^^^^

> That is not the same thing at all. Here perl is DWIMing your
                                                   ^^^^
> scalar into a one-element list, same as if you typed:

[...]

Hmmmh....I don't quite see the difference now. Perhaps you should tell 
me what DMWI stands for...since _this_ seems to be the differentiating 
item. Would be useful to know for me in order to understand your 
explanation. ;-)

Tassilo--
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: 17 Aug 2001 14:28:53 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: what does this message mean?
Message-Id: <9lj9n5$71t$3@mamenchi.zrz.TU-Berlin.DE>

According to Tassilo von Parseval  <Tassilo.Parseval@post.rwth-aachen.de>:
> Tad McClellan wrote:
> 
> [...]
> 
> > 'print $a' _is_ printing a list, it is just a short list.
> 
> > No DWIMery, nothing to see here, move along...
>       ^^^^
> 
> > That is not the same thing at all. Here perl is DWIMing your
>                                                    ^^^^
> > scalar into a one-element list, same as if you typed:
> 
> [...]
> 
> Hmmmh....I don't quite see the difference now. Perhaps you should tell 
> me what DMWI stands for...since _this_ seems to be the differentiating 
> item. Would be useful to know for me in order to understand your 
> explanation. ;-)

DWIM is Perl's "Do What I Mean", which is the work of the DWIMmer in the
Perl core :)

As I said in a direct followup, I am likewise not sure what Tad is
kvetching about.  In my view, the same mild DWIMery takes place in both
"use lib $x" and "print $x": a single scalar works like a one-element
list.

Anno


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

Date: Fri, 17 Aug 2001 16:39:57 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: what does this message mean?
Message-Id: <3B7D2CBD.1040707@post.rwth-aachen.de>

Anno Siegel wrote:

> DWIM is Perl's "Do What I Mean", which is the work of the DWIMmer in the
> Perl core :)

Ah, thanks! Perl's doing that all the time in my scripts. :-)

> As I said in a direct followup, I am likewise not sure what Tad is
> kvetching about.  In my view, the same mild DWIMery takes place in both
> "use lib $x" and "print $x": a single scalar works like a one-element
> list.

Yes. Yet, there might be some super-subtlety on the inside of Perl that 
he was referring to. Let us what for his explanation.
Tassilo

-- 
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: Fri, 17 Aug 2001 08:35:30 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: what does this message mean?
Message-Id: <3B7D1DA2.FEF3957A@home.com>

Please put your responses *after* the suitably trimmed text you're
responding to. It makes a thread much easier to follow.

[Jeapordectomy performed.]

meow wrote:
> 
> Kevin Bartz wrote:
>>
>> meow wrote:
>>
>>> what does the below means?
>>>
>>> Can't locate loadable object for module IO::Tty in @INC (@INC
>>> contains:
>>> /$path1 /$path2 $path3 .) at  /$path1/Tty.pm line 26

Presumably the message included real paths, not a literal '$path1' etc.?

>> It means that it can't find a loadable object that was packaged
>> with the module. Did you run the makefile on this or just unzip
>> and stick it in Perl's search path? For practical purposes, the
>> makefile's a necessity in this case.
>>
> yeah, i did run the makefile and install the module at my own_dir...
> in my script i did specified a perl seach path:
> 
> use lib "/path/to/my/install/module/directory/own_dir";
> 
> what's wrong in this?

Modules with loadable objects aren't pure Perl. When you use such a
module Perl needs to know where to look for the object part. There
should be a directory named 'auto' under your root library directory,
which should contain a mirror of the directories for modules with
loadable parts, and the loadable parts themselves. Apparently this part
didn't get installed/copied into place.

Do you have a directory .../own_dir/auto/IO/Tty/ with a library file in
it (e.g. Tty.so or Tty.dll)?

-mjc


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

Date: Fri, 17 Aug 2001 08:50:37 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: what does this message mean?
Message-Id: <3B7D212D.9BA24753@home.com>

Samneric wrote:
> 
> meow wrote:
>
> > use lib "/path/to/my/install/module/directory/own_dir";
> >
> > what's wrong in this?
> 
> Perhaps that your path is a "this" instead of a "these"?
> 
> The module docs say:
> use lib LIST
> 
> Not:
> use lib SCALAR

No.

use lib 'foo';

is perfectly acceptable. At any rate, *if* this were the problem then
the error message would have been

   "Can't locate IO::Tty.pm in @INC..."

instead of

   "Can't locate loadable object for module IO::Tty in @INC..."

Getting the second message means that perl found the module but couldn't
find the XS part.

-mjc


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.  

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


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