Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Angry Unanswered: problem concatination of files..

    Here I'm trying to use pipe to concatinate files using cat process. It doesn't work. I doesn't complain either. It just writes the list of file to the output file.

    Any advise is much appreciated.
    KJR.

    #!/usr/bin/perl -wl

    my $path = "/home/comsc/mc/";
    my @lsdat = `ls $path/*.dat`;
    my $newfile = "/home/comsc/mc/new.org";
    print $newfile;


    #open(NCAT, "|cat >>$newfile");

    foreach $file (@lsdat){
    print NCAT $file;
    }

  2. #2
    Join Date
    Nov 2003
    Posts
    65
    Hmm is it because you have that one line commented out?

  3. #3
    Join Date
    Nov 2003
    Posts
    65

    Smile

    by line i mean the following line:
    Code:
    #open(NCAT, "|cat >>$newfile");
    #Should be
    open(NCAT, "|cat >>$newfile");
    Quote Originally Posted by llccoo
    Hmm is it because you have that one line commented out?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •