Re: current record number with if statement

2010-09-20 Thread Shlomi Fish
On Monday 20 September 2010 12:30:55 Raj wrote: > Hi, > > I am a newbie for perl. > > It would be fine if some explain how the following code prints first > 10 lines of the file. > My question here is, how/what if condition match happens? Is there > anything related to current record number ($.

current record number with if statement

2010-09-20 Thread Raj
Hi, I am a newbie for perl. It would be fine if some explain how the following code prints first 10 lines of the file. My question here is, how/what if condition match happens? Is there anything related to current record number ($.) variable? while () { print if 1 .. 10; } Regards, Raj