8.7. heber.pl

[<<<] [>>>]

Html Embedded Basic sample preprocessor.

The souce code of the file `heber.pl' is:

# we want to read the whole file into memory
@$/ = undef;
# open the file or exit 0 telling ScriptBasic that it has failed
open(F,"<@$inputfile") or exit(0);
@$input = <F>;
close F;
@$output = '';
if( length(@$input) > 0 ){
  @$input =~ s/\"/\\\"/g;
  @$output .= 'print """' . @$input . '"""' . "\n";
  }
# open the output file or exit 0 telling ScriptBasic that it has failed
open(F,">@$outputfile") or exit(0);
print F @$output;
close F;
exit(0);


[<<<] [>>>]