luckysummer has asked for the wisdom of the Perl Monks concerning the following question:
http://www.perlmonks.com/?node=perlman%3Aperlform
It only tell us how to add header.
Please help answer.
#!/usr/bin/perl use strict; use warnings; my ($name,$login,$office,$uid,$gid, $home); open FD,"</etc/passwd" or die "$?"; while(<FD>){ ($name,$login,$office,$uid,$gid, $home) = split (":",$_); $^ = 'STDOUT_TOP'; $~ = 'STDOUT'; ###$ = 'STDOUT_BOTTOM'; (dont know how to work) $= = 20; write; } format STDOUT_TOP = @>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> "Page $%" Passwd File Name Login Office Uid Gid Home ------------------------------------------------------------------ . format STDOUT_BOTTOM = End of Page @< $% . format STDOUT = @<<<<<<<<<<<<<<<<<< @||||||| @<<<<<<@>>>> @>>>> @<<<<<<<<<<<<<<<<< $name, $login, $office,$uid,$gid, $home .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: format - set up footer(bottom)
by Athanasius (Archbishop) on Dec 28, 2016 at 02:39 UTC | |
by luckysummer (Novice) on Dec 28, 2016 at 06:06 UTC | |
|
Re: format - set up footer(bottom)
by Anonymous Monk on Dec 28, 2016 at 02:45 UTC | |
by luckysummer (Novice) on Dec 28, 2016 at 06:43 UTC |