Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Combine File Request

by qball (Beadle)
on Apr 18, 2001 at 20:30 UTC ( [id://73652]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

qball has asked for the wisdom of the Perl Monks concerning the following question:

Hello ..

How can I combine the following code to print to FR.DOC? I'm sort of confused. In addition, I'll be adding two more code sections to print other "reports" appended to FR.DOC.
sub docFullReport(){ ##################################################### # # Limited Section # ################## open(PB_BODY_LIMITED, "> tmp/FR.DOC") or die "Can't $!\n"; #Lock File flock(PB_BODY_LIMITED, 2); $sql = <<END_SQL; SQL CODE(didn't post it here) END_SQL $query = &execsql($sql); $~ = PB_TOP_LIMITED; write PB_TOP_LIMITED; $~ = PB_BODY_LIMITED; write PB_BODY_LIMITED while( @data = $query->fetchrow ); ##################################################### # # Detailed Section # ################## $sql = <<END_SQL; SQL CODE(didn't post it here) END_SQL $query = &execsql($sql); $~ = PB_TOP_DETAILED; write PB_TOP_DETAILED; $~ = PB_BODY_DETAILED; write PB_BODY_DETAILED while( @data = $query->fetchrow ); }

The code is somewhat incomplete. I'll happily answer any questions to make sense of what I'm trying to do.

Thanks.

qball~"I have node idea?!"

Replies are listed 'Best First'.
Re: Combine File Request
by tadman (Prior) on Apr 18, 2001 at 21:30 UTC
    I'm not exactly sure what you're saying, but if you want to write several different things to the same file, you might open it with the append option:
    open(PB_BODY_LIMITED, ">> tmp/FR.DOC") or die "Can't $!\n"; ^^

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://73652]
Approved by root
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.