adding a filename into a data file
hugh at hcgallagher.co.uk
Mon Nov 5 08:10:34 PST 2012
> perl -npe 'print "$ARGV "' *
That's very neat. Am I wrong to say that the -n is superfluous because of
Just need to add stripping of the file extension and job done.
On 5 November 2012 16:00, Tom Hukins <tom at eborcom.com> wrote:
> On Mon, Nov 05, 2012 at 03:32:11PM +0000, Ant Mitchell wrote:
> > perl -npe 'print "$ARGV "' *
> Indeed. In the spirit of "teach a man to fish", it's worth mentioning
> that Perl mentions the "-npe" switches in its "perlrun" documentation
> and the "$ARGV" variable in "perlvar".
> You should find this documentation installed alongside perl, although
> some Linux distributions like to cripple their installations and omit
> it. You can also find it on the Web at http://perldoc.perl.org/.
> MiltonKeynes-pm mailing list
> MiltonKeynes-pm at pm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MiltonKeynes-pm