Is there anyway that I can get around this with like a delay or something?

Can't tell without seeing a snippet of the code, sorry

How do I get NAMES to go to the browser/STDOUT?

Fast solution: use STDOUT instead of NAMES.

A little more elaborated solution: you could use IO::File, creating filehandle-like objects, like this:

use strict ; # please, do use IO::File ; my ($name1,$name2) ; my $fh = IO::File->new() ; $fh->fdopen(fileno(STDOUT),'w') or die "Cannot open STDOUT: $!" ; $fh->format_name('NAMES') ; # Write to STDOUT using $fh, like this foreach my $data ([qw(mama papa)],[qw(tick tock)],[qw(cip ciop)]) { ($name1,$name2) = @$data ; $fh->format_write() ; } # your format definition goes here format NAMES = @<<<<<<<< @<<<<<<<<< $name1 $name2 .

For more information see IO::File documentation, which will lead you almost immediately to IO::Handle docs.

Note that you could do this also with plain Perl, too. Anyway, I prefer the object-oriented approach, since it doesn't depend on things such select calls and $~ variables. Instead, $object->format_name('MYFORMAT') call binds MYFORMAT to the specified object, which I find so desirable :-)

Ciao!
--bronto

# Another Perl edition of a song:
# The End, by The Beatles
END {
  $you->take($love) eq $you->made($love) ;
}


In reply to Re: Two questions about CGI and format specifiers (was: Two questions) by bronto
in thread Two questions about CGI and format specifiers (was: Two questions) by whiteperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.