How to view the code block genereated by n or p switch in perl one liner

后端 未结 2 1575
后悔当初
后悔当初 2020-12-18 11:05

I am sure I have run this before but for the life of me cant find any reference in perlrun or through Google. Hopefully some of the perl boffins here will be able to answer

2条回答
  •  情话喂你
    2020-12-18 11:35

    Try

    perl -MO=Deparse -ne 'print if /^00/'
    

    It will give you the output like this:

    LINE: while (defined($_ = )) {
        print $_ if /^00/;
    }
    -e syntax OK
    

提交回复
热议问题