Program Code:
#! /Perl/bin/perl
print("Enter a sentence\n");
open(FILE,">abhi1.txt");
select(FILE);
$~ = STDOUT1;
$^=STDOUT1_TOP;
$= =65;
$line=<STDIN>;
write;
close(FILE);
format STDOUT1_TOP=
Page @<<
$%
======================================================
.
format STDOUT1=
======================================================
Hi this is page content
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$line
======================================================
.
Output:
The file abhi1.txt
Program Code:
#! /Perl/bin/perl
$~=STDOUT1;
$^=STDOUT1_TOP;
write;
format STDOUT1_TOP=
======================================================
This is the header of the page.
Page number is @<
$%
======================================================
.
format STDOUT1=
Hi this is page content
.
Output:
#! /Perl/bin/perl
print("Enter a sentence\n");
open(FILE,">abhi1.txt");
select(FILE);
$~ = STDOUT1;
$^=STDOUT1_TOP;
$= =65;
$line=<STDIN>;
write;
close(FILE);
format STDOUT1_TOP=
Page @<<
$%
======================================================
.
format STDOUT1=
======================================================
Hi this is page content
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$line
======================================================
.
Output:
The file abhi1.txt
Program Code:
#! /Perl/bin/perl
$~=STDOUT1;
$^=STDOUT1_TOP;
write;
format STDOUT1_TOP=
======================================================
This is the header of the page.
Page number is @<
$%
======================================================
.
format STDOUT1=
Hi this is page content
.
Output:
0 comments:
Post a Comment