chilukuri_perl has asked for the wisdom of the Perl Monks concerning the following question:
Running above script1.pl will result with following file.Script1.pl ---------- #!/usr/local/bin/perl $logFl = "xyz.log"; open (FIRSTFH, "> $logFl") || die "couldn't open file...$!\n"; print FIRSTFH "This is from first script\n"; system("script2.pl $logFl"); #print FIRSTFH "This is second print in first script\n"; Script2.pl ---------- #!/usr/local/bin/perl $logFl2 = "xyz.log"; open (FIRSTFH, ">> $logFl2") || die "couldn't open file in script2...$ +!\n"; print FIRSTFH "This is from second script\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File content written by script and a called script
by moritz (Cardinal) on Sep 23, 2009 at 11:05 UTC | |
by chilukuri_perl (Novice) on Sep 23, 2009 at 11:21 UTC | |
by chilukuri_perl (Novice) on Sep 23, 2009 at 11:25 UTC | |
|
Re: File content written by script and a called script
by vitoco (Hermit) on Sep 23, 2009 at 13:35 UTC | |
by BioLion (Curate) on Sep 23, 2009 at 13:53 UTC |