Perl read line by line

后端 未结 5 1972
Happy的楠姐
Happy的楠姐 2020-11-29 00:10

I have a simple Perl script to read a file line by line. Code is below. I want to display two lines and break the loop. But it doesn\'t work. Where is the bug?



        
5条回答
  •  无人及你
    2020-11-29 00:55

    In bash foo is the name of the variable, and $ is an operator which means 'get the value of'.

    In perl $foo is the name of the variable.

提交回复
热议问题