Thanks. The cat command worked.

Can I add a line break at the end of the content of each file? 

I did post my script in my answer to another person who helped.

Akbar Ehsan
Internet Services Coordinator
Central Office
Ivy Tech Community College
9301 E. 59th St.
Indianapolis, IN 46216
Phone: 1 317 921-4872


-----Original Message-----
From: Dennis McFall [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 02, 2007 1:17 AM
To: Akbar Ehsan; [email protected]
Subject: Re: Merging Files in Perl

At 08:22 PM 2/1/2007, Akbar Ehsan wrote:
>Hello Everyone,
>
>Is there something in Perl, a procedure, a method, a command, anything,
>that would enable me to merge several tiny text files into one big text
>files. I was searching on perldoc.org unsuccessfully.
>


The cat command in a *nix shell.  (Can also be called by a Perl 
script, if the script is necessary for some other reason):

cat file1 file2 file3 > one_big_file

or

cat file* > one_big_file

  Perl:

#!/usr/bin/perl

system("cat  somefile* > one_big_file") ==0  or die "cat failed: $?\n";

./dm


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to