 <pre><code>perl -ne 'print [ split /\(/ ]-&gt;[0]' 8-8TRI.txt ^__ backslash for '(' </code></pre> <p>You don't need array reference, so</p> <pre><code>perl -ne 'print( (split /\(/ )[0] )' 8-8TRI.txt </code></pre>