On Thu, Nov 07, 2013 at 11:44:27AM +0800, Shaji Kalidasan wrote:
> Dear Perlers,
>
> I am facing problems while setting the $= special variable. Even
> though I set it to 10 it takes the default value which is 60. In line
> number 31, I set the variable to a value of 10. It is not printing the
> page number for every 10 lines
>
> Please guide me where I am going wrong.
The problem is that you need to have your format selected when you
assign to $= so perl knows to which format you are referring:
my $fh = select REPORT;
$= = 10;
select $fh;
Alternatively, you could call a method on the FileHandle:
REPORT->format_lines_per_page(10);
--
Paul Johnson - [email protected]
http://www.pjcj.net
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/