Re: Adding to @INC

2009-01-07 Thread Igor Sutton
Or you can use local::lib and be happy. You can find a recipe here:

http://www.izut.com/articles/files/7156ee84b1fa9ad28f2a4ab0b94f0a0a-0.html

The recipe says to put something into your  ~/.bashrc, which works perfectly.

Igor.

2009/1/7 Chas. Owens :
> On Wed, Jan 7, 2009 at 11:21, Adam Witney  wrote:
>>
>> On 7 Jan 2009, at 16:19, Chas. Owens wrote:
>>
>>> On Wed, Jan 7, 2009 at 11:13, Adam Witney  wrote:
>>>>>>
>>>>>> Try adding this to your ~/.profile
>>>>>>
>>>>>> export PERL5LIB=${PERL5LIB}:/opt/local/lib/perl5/site_perl/5.8.8
>>>>>
>>>>> OS X 10.5 (or at least my version of 10.5) uses ~/.bash_profile not
>>>>> ~/.profile for user overrides to the default profile (/etc/bashrc).
>>>>> If this is a multiuser machine and you want the other users to see the
>>>>> modules as well you can set it in the default profile instead of your
>>>>> own.
>>>>
>>>> I think either ~/.profile or ~/.bash_profile will work. My ~/.profile was
>>>> created by a previous fink installation if i remember correctly.
>>>
>>> Check .bash_profile, there is probably a line like
>>>
>>> . ~/.profile
>>>
>>> in it.  I don't think it was Fink that added that, Fink has always just
>>> added
>>>
>>> test -r /sw/bin/init.sh && . /sw/bin/init.sh
>>>
>>> to my ~/.bash_profile.
>>
>> I don't have a ~/.bash_profile :-)
>>
>
> Interesting, I just created a new user to see what it would create and
> it appears as if there is no ~/.profile or ~/.bash_profile for new
> users.  So if you have either one, then you must have created it for
> yourself.  Very odd, I would have expected OS X to create one of the
> two by default (even if it was just a skeleton).
>
> --
> Chas. Owens
> wonkden.net
> The most important skill a programmer can have is the ability to read.
>



-- 
Igor Sutton Lopes 


Re: HTML tables

2008-09-14 Thread Igor Sutton

Bianca Shibuya <[EMAIL PROTECTED]> writes:

> [long snip...]

Hi Bianca,

Perhaps another thing you could check is HTML::TreeBuilder::XPath[1],
which help you a lot.

Good luck!

Footnotes:
[1]  
http://search.cpan.org/~mirod/HTML-TreeBuilder-XPath-0.09/lib/HTML/TreeBuilder/XPath.pm

Igor.



Re: How to run Perl script at Mac OS (Darwin) Release?

2008-03-09 Thread Igor Sutton



On Mar 9, 2008, at 12:31 PM, [EMAIL PROTECTED] wrote:


On Mar 7, 2008, at 7:48 PM, Larry Prall wrote:


Change the she-bang (#!) line to read:

#!/usr/bin/perl -w

That's the location of the default perl installation on OS X.


That _may_ be the problem, but it is not necessarily the problem. I  
believe that if there was no perl interpreter in the path that the  
OP specified, bash would say -


"bash: ./test1i.pl: #!/usr/local/ActivePerl-5.10/bin/perl: bad  
interpreter: No such file or directory"


But instead bash is saying "Command not found." So the OP may in  
fact have a perl interpreter in the path specified on the command  
line, but he is not calling the script correctly. So advising the  
OP to change the shebang may be premature.


The script was not called correctly from the command line, of that  
we can be certain.


I think he's missing the execution bit (where someone already  
spotted) and since bash on MacOS X doesn't have the current directory  
in PATH, one must execute the program like:


$ ./test1.pl

Instead of

$ test1.pl

In the same directory, or change the PATH to use the current working  
directory


$ PATH=$PATH:. test1.pl

Hope this helps