in reply to Re: Writing to a packaged file with PerlApp
in thread Writing to a packaged file with PerlApp
>you need to use a utility function to extract the file from the EXEc:\windows\temp\pdk-username--(what process-id to write here?)\mytextf +ile.txt
When I create the .exe using PerlApp and run it , the exe cannot open myfile.txt. I keep getting this error:sub chfile { ....... my $datafile = "myfile.txt"; my $filename = PerlApp::extract_bound_file($datafile); die "$datafile not bound to application\n" unless defined $filename; my $fh="LEX"; open($fh,'$filename') or die "Can't open $datafile $filename)\n"; while(<LEX>){ ...... } }
What am I doing wrong here?Tk:Error:Can't open myfile.txt <c:\test\pdk-myname--121077199/myfile.t +xt>[\&main::chfile]
|
|---|