<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">> perl -npe 'print "$ARGV "' *</span><br><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">That's very neat. Am I wrong to say that the -n is </span><font color="#500050" face="arial, sans-serif">superfluous because of the -p?</font></div>
<div><font color="#500050" face="arial, sans-serif"><br></font></div><div><font color="#500050" face="arial, sans-serif">Just need to add stripping of the file extension and job done.</font></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 5 November 2012 16:00, Tom Hukins <span dir="ltr"><<a href="mailto:tom@eborcom.com" target="_blank">tom@eborcom.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, Nov 05, 2012 at 03:32:11PM +0000, Ant Mitchell wrote:<br>
> perl -npe 'print "$ARGV "' *<br>
<br>
</div>Indeed.  In the spirit of "teach a man to fish", it's worth mentioning<br>
that Perl mentions the "-npe" switches in its "perlrun" documentation<br>
and the "$ARGV" variable in "perlvar".<br>
<br>
You should find this documentation installed alongside perl, although<br>
some Linux distributions like to cripple their installations and omit<br>
it.  You can also find it on the Web at <a href="http://perldoc.perl.org/" target="_blank">http://perldoc.perl.org/</a>.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tom<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
MiltonKeynes-pm mailing list<br>
<a href="mailto:MiltonKeynes-pm@pm.org">MiltonKeynes-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/miltonkeynes-pm" target="_blank">http://mail.pm.org/mailman/listinfo/miltonkeynes-pm</a><br>
</div></div></blockquote></div><br></div>