in reply to Writing to a packaged file with PerlApp
Your PATH and @INC are irrelevant. open relies only on the path information you pass to it. However, since you're using PerlApp, you need to use a utility function to extract the file from the EXE. Something like this:
I'm not sure why you're writing to the file, though, because it's really only a temporary file. You may want to rethink that. Files bundled into the EXE are designed for reading - changes you make won't end up back in the EXE. Instead, the temporary file will be changed.my $filename = PerlApp::extract_bound_file($datafile); open my $fh, ">$filename";
There's more information here.
Are you sure it was a book? Are you sure it wasn't.....nothing?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Writing to a packaged file with PerlApp
by perl_seeker (Scribe) on Nov 14, 2003 at 09:18 UTC |
In Section
Seekers of Perl Wisdom