Just another Perl shrine | |
PerlMonks |
perlapp, die, and __DATA__by joker0927 (Novice) |
on Apr 25, 2003 at 04:18 UTC ( [id://253065]=perlquestion: print w/replies, xml ) | Need Help?? |
joker0927 has asked for the wisdom of the Perl Monks concerning the following question:
OK, I'm a newbie; so please don't laugh too loud or flame me here, but this one is driving me crazy. The goal here is to be able to pass /? to my perl app as a command line arg and have it return the text that follows __DATA__. To save space, I've only listed the pertinent code. And yes, I've tested this portion only with the same results. The following code works: When ran as c:>test.pl /? It returns: testing 1 testing 2 testing 3 as expected. However, after turning it into an exe with perlapp it no longer works. Running c:>test.exe /? will return "Died at test.pl line 8." unless I wrap the @help array in quotes, then it just returns a few blank lines and goes back to the prompt. I've tried including the package (i.e. SAR::DATA) thinking it might have something to do with the fact that perlapp is adding a lot of other modules and maybe it's getting confused about which module to pull DATA from, but that didn't work. It gives the same results. I promise I've done my homework. I searched this website, activestates documentation, perldoc, and several books on perl. I just can't find an answer anywhere. Any insight here would be greatly appreciated.
Back to
Seekers of Perl Wisdom
|
|