in reply to Re^4: File Manipulation - Need Advise!
in thread File Manipulation - Need Advise!

Bart, Its working now!!! How can open file2.txt and print to file1.txt WITHIN THE SCRIPT? Is this possible with your solution???

Replies are listed 'Best First'.
Re^6: File Manipulation - Need Advise!
by blue_cowdawg (Monsignor) on Jan 03, 2008 at 19:03 UTC
        How can open file2.txt and print to file1.txt WITHIN THE SCRIPT? I

    Consider:

    | | Hand waving.... | | # be sure to close the files before re-opening them if they have been +opened in the script # prior to this point open(F1,"> file1.txt") or die "file1.txt: $!"; open(F2,"< file2.txt") or die "file2.txt: $1"; | | More hand waving.... $line=<F2>; # read a line from file2.txt print F1 $line; #write that line to file1.txt


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg