in reply to Converting a source code

You need to open target file for writing, not reading.
open targetfile, ">source.ada" or die "Can't open: $!";
Consider using scalars for your filehandles. See open. Also, if you are not calling perl with -w, you should consider adding "use warnings;" in addition to use strict.

Replies are listed 'Best First'.
Re^2: Converting a source code
by oblate kramrdc (Acolyte) on Aug 21, 2006 at 19:10 UTC

    Thanks duckyd! one more question... how do i store the value to targetfile? This doesn't work:

    s/WORKING -STORAGE SECTION./DECLARE;/; print targetfile $line, "\n";
    It stores "WORKING -STORAGE SECTION." tnx!