rjsaulakh has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl #use strict; use warnings ; opendir(DIR, "/home/rjs/perl/perlnut/") or die "cant open the specfied + directory $!"; my @file = readdir(DIR); #my $book = final.htm; open(OUT, ">book") or die "Can't create book: $! \n "; + foreach (sort @file) { local(*IN); open( IN, $_) or die "cant raman open $_ : $!\n "; print OUT while <IN>; close (IN); + }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: combining multiple files into one file
by jwkrahn (Abbot) on Jun 23, 2006 at 11:38 UTC | |
|
Re: combining multiple files into one file
by GrandFather (Saint) on Jun 23, 2006 at 11:20 UTC | |
|
Re: combining multiple files into one file
by rev_1318 (Chaplain) on Jun 23, 2006 at 13:36 UTC | |
|
Re: combining multiple files into one file
by leocharre (Priest) on Jun 23, 2006 at 14:14 UTC |