http://www.perlmonks.org?node_id=222720


in reply to Beyond Golf - reading between the tokens

I think much easier would be to just:

perl -MO=Concise -e'foo' | wc -l
Example:
5;0 juerd@atlas:~$ perl -MO=Concise /usr/bin/cpanp | wc -l /usr/bin/cpanp syntax OK 260
The cpanp binary has a score of 260.

5;0 juerd@atlas:~$ perl -MO=Concise -e'$t' 2> /dev/null | wc -l 5 5;0 juerd@atlas:~$ perl -MO=Concise -e'$$t' 2> /dev/null | wc -l 6 5;0 juerd@atlas:~$ perl -MO=Concise -e'$$t[0]->{x}' 2> /dev/null | wc +-l 11 5;0 juerd@atlas:~$ perl -MO=Concise -e'$$t[0]{x}' 2> /dev/null | wc -l 11 5;0 juerd@atlas:~$ perl -MO=Concise -e'print $$t[0]{x}' 2> /dev/null | + wc -l 13

- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.