![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple Files deletion in perl | pulkit | Shell Programming and Scripting | 1 | 02-12-2008 02:55 AM |
| Perl program to read from multiple files | jyotipg | Shell Programming and Scripting | 1 | 07-19-2006 06:26 PM |
| Combining multiple lines | DUST | Shell Programming and Scripting | 4 | 07-15-2005 07:57 AM |
| Perl - Emailing MULTIPLE files as attachment | Tonka52 | Shell Programming and Scripting | 3 | 02-11-2004 10:19 AM |
| Adding 3 Lines to Multiple c and h files with perl | Lazzar | Shell Programming and Scripting | 2 | 10-28-2003 10:30 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Combining Multiple files in one in a perl script
All,
I want to combine multiple files in one file. Something like what we do on the commad line as follows -> cat file1 file2 file3 > Main_File. Can something like this be done in a perl script very efficiently? Thanks, Rahul. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
If the OS is *nix, the easiest way I think is to call the same command from inside perl script.
print `cat file1 file2 file3 > Main_File`; Otherwise read the file in array and write them to one file. |
|||
| Google The UNIX and Linux Forums |