> > perl -ne'print if $.==2 || $& && !$x++; $.=0 if /^--+$/' > > The $.==2 tests if the current line number is 2. If $. is 2 then the > current line is printed and the program goes on to the next statement. > If $. is not 2 then $& is tested and if $& is false then the current > line is printed and the program goes on to the next statement. If $& is > true then $x is negated and tested and incremented (in that order) and > if $x is true then the program goes on to the next statement else if $x > is false then the current line is printed. > > John > --
Thanks John and Erez for the expanation. I understand it now -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/