Re: Path problem

2003-12-16 Thread David Wheeler
On Dec 16, 2003, at 6:38 AM, Vic Norton wrote: Thanks for the tip, Ken. I was not aware of FindBin. The combination use FindBin($Bin); use lib "$Bin/../ThisProjectLib; is a particularly nice idea. For maximum portability, I use: use File::Spec::Functions qw(catdir updir); use FindBin qw($B

Re: Path problem

2003-12-16 Thread Vic Norton
Thanks for the tip, Ken. I was not aware of FindBin. The combination use FindBin($Bin); use lib "$Bin/../ThisProjectLib; is a particularly nice idea. Regards, Vic At 10:21 PM -0600 12/15/03, Ken Williams wrote: Yeah, that's a BBEdit-specific quirk. For a more general solution you might w

Re: Path problem

2003-12-15 Thread Ken Williams
Yeah, that's a BBEdit-specific quirk. For a more general solution you might want to use the FindBin module. -Ken On Monday, December 15, 2003, at 06:56 PM, Vic Norton wrote: I'm no expert, Tim, but I have discovered that $INC[0] is where you are, at least from BBEdit's standpoint. Regards,

Re: Path problem

2003-12-15 Thread Vic Norton
I'm no expert, Tim, but I have discovered that $INC[0] is where you are, at least from BBEdit's standpoint. Regards, Vic At 3:02 PM -0800 12/15/03, Tim Warner wrote: Thanks, Vic. That worked. My books don't say what is supposed to be placed in INC[0], though. Is that a standard location for th

Re: Path problem

2003-12-15 Thread Tim Warner
Thanks, Vic. That worked. My books don't say what is supposed to be placed in INC[0], though. Is that a standard location for the path to the current script? I figured the chomps did nothing, but I put them in the script after having some earlier problems, which they solved. I left them in fig

Re: Path problem

2003-12-15 Thread Vic Norton
Try $path = "$INC[0]/sourcefile.txt"; $resultpath = "$INC[0]/results.txt"; I'm not sure what the chomps are for. Regards, Vic At 1:23 PM -0800 12/15/03, Tim Warner wrote: A very basic question, but the answer eludes me: How do I open files in the same directory as my Perl script? I'm run

Path problem

2003-12-15 Thread Tim Warner
A very basic question, but the answer eludes me: How do I open files in the same directory as my Perl script? I'm running these scripts from BBEdit and they worked fine under BBEdit 6.5 on OS 9.2. But when I run them under BBEdit 7 on OS 9 or with BBE7.1 in Mac OS X, I get an error when trying