[22844] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5065 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 2 21:05:50 2003

Date: Mon, 2 Jun 2003 18:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 2 Jun 2003     Volume: 10 Number: 5065

Today's topics:
        Adding to @INC <thepotplants@yahoo.com>
    Re: Adding to @INC <noreply@gunnar.cc>
    Re: Comparing Arrays <jkeen@concentric.net>
    Re: Help: How do I make this code into a 'Undirected' D ctcgag@hotmail.com
        Help: Sort HOH by value? (entropy123)
    Re: Help: Sort HOH by value? <noreply@gunnar.cc>
    Re: Is there a bail() function? <michael.p.broida@boeing.com>
    Re: regexp to negate 2 chars at once <jidanni@jidanni.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 3 Jun 2003 12:10:02 +1200
From: "ThePotPlants" <thepotplants@yahoo.com>
Subject: Adding to @INC
Message-Id: <BHRCa.6594$JA5.116639@news.xtra.co.nz>

I've just tried running a basic script and it's getting ugly at me, because
it can't find a required package.

Can't locate DBI.pm in @INC (@INC contains: C:\oracle\ora81\Apa
lib/MSWin32-x86 C:\oracle\ora81\Apache\Perl\5.00503\lib C:\orac
erl\site\5.00503\lib/MSWin32-x86 C:\oracle\ora81\Apache\Perl\si
 at test_connect.txt line 3.
BEGIN failed--compilation aborted at test_connect.txt line 3.

I'm assuming @INC is the perl equivalent of a PATH.
How do I add locations/directories to @INC so It finds the required package,
and/or where is it described in the docs (I couldn't find it.)

Thanks

Pete




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

Date: Tue, 03 Jun 2003 02:27:21 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Adding to @INC
Message-Id: <bbgqgd$937lb$1@ID-184292.news.dfncis.de>

ThePotPlants wrote:
> How do I add locations/directories to @INC so It finds the required
> package, and/or where is it described in the docs (I couldn't find
> it.)

     http://www.perldoc.com/perl5.8.0/lib/lib.html

/ Gunnar

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: 03 Jun 2003 00:00:38 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: Comparing Arrays
Message-Id: <bbgof6$7ro@dispatch.concentric.net>


"Jday" <dayjp@yahoo.com> wrote in message
news:827501f5.0306021444.6c1e6eb1@posting.google.com...
> Would anybody have any idea how to compare two arrays (@array1 and
> @array2) and pull out the data from @array2 that is not contained in
> @array1?  I am a perl newbie and have managed to hit my knowledge
> threshold and need ideas.  Please help!!!  It is MUCH appreciated.
> Thank you.

See FAQ (listed in prior post) or, if you prefer/need an object-oriented
context, my List::Compare module, available from CPAN, has method
get_complement() to accomplish this.




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

Date: 02 Jun 2003 23:04:42 GMT
From: ctcgag@hotmail.com
Subject: Re: Help: How do I make this code into a 'Undirected' Depth First Search?
Message-Id: <20030602190442.648$m4@newsreader.com>

email_entropy123@yahoo.com (entropy123) wrote:
> Hey all,
>
> Below is a code Sam Holden posted a while back -> Helping me out in a
> big way. I'm working with it and starting to understand it...however
> I'm trying to 'mark' previously traveled edges -> The code is intended
> to detect cycles but, if you run it, you will see it detects C1 - C2 -
> C1 (And all variations on the theme) as well as the complete cycle. It
> looks like the code backtracks and I'm trying to tell it 'no' by
> creating a 'mark' hash which tells it not to look at the previously
> traversed edge....only problem is I can't seem to make it work.

Aside from the graph-theory problems, you will also have problems
introduced by your refusal to use strict.  Please take care of those first.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service              New Rate! $9.95/Month 50GB


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

Date: 2 Jun 2003 17:09:16 -0700
From: email_entropy123@yahoo.com (entropy123)
Subject: Help: Sort HOH by value?
Message-Id: <90cdce37.0306021609.4ee7f618@posting.google.com>

Hey all

I have a %HoH with $HoH{$key1}{$key2}=$value is there any way to sort
this according to $value? I'm pulling out $key2 as part of a foreach
statement and would like to be sure that $HoH is equal to a specific
$value for the very first key pulled by the foreach...

Thanks!

entropy


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

Date: Tue, 03 Jun 2003 02:21:50 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Help: Sort HOH by value?
Message-Id: <bbgq5v$9cnoo$1@ID-184292.news.dfncis.de>

entropy123 wrote:
> I have a %HoH with $HoH{$key1}{$key2}=$value is there any way to
> sort this according to $value?

Yes.

How about letting us know which efforts you made to find out yourself
before you posted here?

/ Gunnar

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Mon, 2 Jun 2003 23:21:12 GMT
From: "Michael P. Broida" <michael.p.broida@boeing.com>
Subject: Re: Is there a bail() function?
Message-Id: <3EDBDBE8.6A6F0432@boeing.com>

Unknown Poster wrote:
> 
> I can't find it in Programming Perl 3E, but it's used like die() in
> Learning Perl 2E, as in the following:
> 
> open(CHANDLE, "+< $CHATNAME") || bail ("cannot open $CHATNAME: $!");

	There's a library module called "Carp" that has "carp", "croak",
	and "confess" functions in it.  The Camel book says these are
	used to report line numbers in the CALLER of the caller of
	carp/etc, rather than in the caller of carp/etc itself.

		carp     is like  warn
		croak    is like  die
		confess  is like  die with a backtrace printed out

	"bail" may have been someone else's attempt to extend the
	die/warn functionality in similar ways.  Or maybe they just
	didn't like the name "die".  :)

		Mike


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

Date: Tue, 03 Jun 2003 06:15:26 +0800
From: Dan Jacobson <jidanni@jidanni.org>
Subject: Re: regexp to negate 2 chars at once
Message-Id: <87of1g9ldt.fsf@jidanni.org>

> Look for the (?! ) operator in perldoc perlre

I did. Now what?
-- 
http://jidanni.org/ Taiwan(04)25854780


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

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


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