M
moonhkt
Hi All
How to format output ? I want output format in io2.txt file.
$fn="io.txt"; # Input file
$fout = ">io2.txt"; # Write to file
$abc="String";
open ( OUTFILE, $fout);
open( IN, $fn) or die (" cannot open in.txt for reading: $!");
format HEADER=
@<<<<<<<<<@<<@<<
$abc$so_type$code
..
while (my $line = <IN>) {
print "$line";
}
print (OUTFILE "Output to file\n");
close ( IN ) or die("Cannot close file: $!");
close (OUTFILE) or die ("Can not close io2.txt");
How to format output ? I want output format in io2.txt file.
$fn="io.txt"; # Input file
$fout = ">io2.txt"; # Write to file
$abc="String";
open ( OUTFILE, $fout);
open( IN, $fn) or die (" cannot open in.txt for reading: $!");
format HEADER=
@<<<<<<<<<@<<@<<
$abc$so_type$code
..
while (my $line = <IN>) {
print "$line";
}
print (OUTFILE "Output to file\n");
close ( IN ) or die("Cannot close file: $!");
close (OUTFILE) or die ("Can not close io2.txt");