Just for fun, I did it with some abuse of the default grep output and a bit of sed.<div><br></div><div>grep '.' * | sed 's/^\([^.]*\)\.[a-z]*:/\1 /'<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 5 November 2012 14:37, Tony Edwardson <span dir="ltr"><<a href="mailto:Tony.Edwardson@lchclearnet.com" target="_blank">Tony.Edwardson@lchclearnet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
or just<br>
while  (<>) {<br>
            print "$ARGV $_";<br>
<div><div class="h5">}<br>
<br>
-----Original Message-----<br>
From: MiltonKeynes-pm [mailto:<a href="mailto:miltonkeynes-pm-bounces%2Btony.edwardson">miltonkeynes-pm-bounces+tony.edwardson</a>=<a href="mailto:lchclearnet.com@pm.org">lchclearnet.com@pm.org</a>] On Behalf Of Benjamin Martin<br>

Sent: 05 November 2012 14:33<br>
To: <a href="mailto:miltonkeynes-pm@pm.org">miltonkeynes-pm@pm.org</a><br>
Subject: Re: adding a filename into a data file<br>
<br>
On 05/11/12 14:13, Matt Croft wrote:<br>
> Is this possible in perl?<br>
<br>
Something like this:<br>
<br>
#!/usr/bin/env perl<br>
<br>
use strict;<br>
use warnings;<br>
use autodie;<br>
<br>
my $base_dir = "/home/person";   # as base dir to read/write file to/from<br>
my @files = qw/file1.txt file2.txt/;  # the files to read and combine<br>
<br>
open $new_fh, ">", "$base_dir/NEWFILE.txt"; # open the master file to<br>
receive all files content<br>
foreach my $f (@files) {<br>
<br>
   my $fh<br>
   open $fh, "<", "$base_dir/$f";<br>
   while(<$fh>) {<br>
     print $new_fh "$f $_";<br>
   }<br>
   close $fh;<br>
<br>
}<br>
close $fh2;<br>
<br>
<br>
This email, its content and any files transmitted with it are intended solely for the addressee(s) and may be legally privileged and/or confidential. If you are not the intended recipient, you may not divulge any of its contents to anyone and should delete the email and contact the sender on the telephone number shown above or via return email. Messages sent via this medium may be subject to delays, non-delivery and unauthorised alteration.  This email has been prepared using information believed by the author to be reliable and accurate, but neither TwentyCi Limited, nor any of its subsidiaries or associates makes any warranty as to its accuracy or completeness.  Any opinions or recommendations expressed herein are solely those of the author. TwentyCi Limited is a company registered in England, No.06943607. The registered office address is: 6 Whittle Court Knowlhill Milton Keynes MK5 8FT<br>

_______________________________________________<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>
<br>
<br>
</div></div>A copy of the LCH.Clearnet e-mail disclaimer can be found at: <a href="http://www.lchclearnet.com/disclaimer/email" target="_blank">www.lchclearnet.com/disclaimer/email</a>  <br>
<br>
LCH.Clearnet Limited, Registered Office: Aldgate House, 33 Aldgate High Street, London EC3N 1EA.<br>
Recognised as a Clearing House under the Financial Services & Markets Act 2000. Reg in England No.25932.<br>
LCH.Clearnet SA, Siège Social, 18 rue du Quatre Septembre, 75002 Paris, Chambre de Compensation conformément au Code Monétaire et Financier.<br>
<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>