in reply to Re: File content written by script and a called script
in thread File content written by script and a called script

Adding seek doesn't solve it.
#!/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"); seek (FIRSTFH, 0, SEEK_END); print FIRSTFH "This is second print in first script\n"; ~
Now output is
$ cat xyz.log
This is second print in first script
m second script

Note that some part of print message in second script is not printed

Replies are listed 'Best First'.
Re^3: File content written by script and a called script
by chilukuri_perl (Novice) on Sep 23, 2009 at 11:25 UTC
    Adding seek in second script solved it. Thanks...