adding a filename into a data file

Matt Croft matt.croft at bridgeporth.com
Mon Nov 5 06:13:03 PST 2012


Hello,
We have several text files with different file names and we want to combine them and have the file names appear in the resulting combined file at the start of every record.
Is this possible in perl?

We would want the output file to contain the file name plus the original data
i.e. Original data file looks like this:
123456789
123456789
123456789
123456789

We want it to look like:
file001 123456789
file001 123456789
file001 123456789
file001 123456789

Where the file name is file001.txt.


Thanks and regards

Matt Croft

matt.croft at bridgeporth.com<mailto:matt.croft at bridgeporth.com>
www.bridgeporth.com<http://www.bridgeporth.com/>

[Description: Description: Description: Description: Description: C:\BridgePorth\Templates\Logos\Bridgeporth Logo on Black (2).jpg]


The information in this message is confidential and intended for the addressee only. If you have received this message in error please delete and notify the sender, any other action may be unlawful.

The views expressed in this message are personal and not necessarily those of Bridgeporth Ltd. unless explicitly stated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/miltonkeynes-pm/attachments/20121105/3ad1e516/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2606 bytes
Desc: image001.jpg
URL: <http://mail.pm.org/pipermail/miltonkeynes-pm/attachments/20121105/3ad1e516/attachment.jpg>


More information about the MiltonKeynes-pm mailing list