[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: realperl
Theoretically, yes. I don't think safe let's you use the open command, but
global tags and subroutines in the minivend.cfg do not run under safe. Also,
the return $@ if $@; (if I didn't miswrite it) should return the error message
from your die statment. Though you could also just "or return $!". You could
also write a global sub and call that from perl to solve your problem.
I don't use cybercash :)
> I've been struggling with something now for a few days... and it seems
> that the [realperl] tag can take care of it... or maybe not?! What I am
> attempting to do is:
>
> $recnum = $_[0];
> open(FILE, "/home/username/data/$recnum") || die "Cannot open $recnum:
> $!";
> while(<FILE>) {
> chop;
> do neat stuff here...
> }
> close(FILE);
>
> Simple in perl land right?! But every time I go to use this, it
> doesn't work at all... it give me an error saying that it cannot open
> the file. I **know** that the $recnum var, is expanding out (i tested
> this in a die statement). Minivend is running under a different user
> than what the files are own as. I have even moded the files to 777 for
> the time being to see whats going on... The directory is accessable
> from everyones point. As a little test, I also logged in as mvend, and
> wrote a test harness - which worked!? So, the question is, whats
> Minivend doing behind the scenes to not allow me to open files? Any
> ideas?
>
> thanks,
>
> jason.
>
> ps> once this ones done, I'm gonna have another questions about cyber
> cash... be prepared! :-)
--
Anthony Ball ant@maine.com
MaineStreet Communications, Inc 208 Portland Road, Gray, ME 04039
tel:1.207.657.5078 fax:1.207.657.5048 http://www.maine.com/