Dear Paul, Thanks for exactly pointing out where I am going wrong. Your solution works like a champ.
Sincerely, Shaji ------------------------------------------------------------------------------- Your talent is God's gift to you. What you do with it is your gift back to God. ------------------------------------------------------------------------------- On Thursday, 7 November 2013 3:04 PM, Paul Johnson <p...@pjcj.net> wrote: 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 - p...@pjcj.net http://www.pjcj.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/