Saving a compiled source file with the "require"d files

R

Ray Muforosky

Help.


If I have file1 that loads (require file2 and files), is it possible
save the content of file file after the load.


example:
file1
#!perl
$a =12;
require file2;
$b = $z;
require file3;
$c = $y;
print $a;


file2
$z = 200;
1;


file3
$y = "foo";
1;


So, is it possible to save file1 after loading file2 and file3
file1 becomes:
#!perl
$a =12;
$z = 200;
$b = $z;
$y = "foo";
$c = $y;
print $a;


Thanks
Ray
 
A

Anno Siegel

Ray Muforosky said:
Help.


If I have file1 that loads (require file2 and files), is it possible
save the content of file file after the load.


example:
file1
#!perl
$a =12;
require file2;
$b = $z;
require file3;
$c = $y;
print $a;


file2
$z = 200;
1;


file3
$y = "foo";
1;


So, is it possible to save file1 after loading file2 and file3
file1 becomes:
#!perl
$a =12;
$z = 200;
$b = $z;
$y = "foo";
$c = $y;
print $a;

You can use Perl to print the text above, and you can overwrite
file1 with it, but you'll have to write the code yourself. I would
not call that "saving file1 after loading", it's a completely
different file.

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top