nysus has asked for the wisdom of the Perl Monks concerning the following question:
What I expected to happen was that the BEGIN part of the script would execute immediately. Instead, when the script is run in my browser, the browser hangs for 5 seconds and then the "Please wait" message appears. Obviously, my understanding of BEGIN is lacking. What am I missing?#!/usr/bin/perl -w use strict; BEGIN{ use CGI qw(:standard); print header; print start_html; print "Please wait"; print end_html; } sleep 5;
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot";
$nysus = $PM . $MCF;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A question on BEGIN{}
by bikeNomad (Priest) on Jun 16, 2001 at 20:20 UTC | |
|
Re: A question on BEGIN{}
by srawls (Friar) on Jun 16, 2001 at 20:21 UTC | |
by nysus (Parson) on Jun 16, 2001 at 20:24 UTC | |
by shotgunefx (Parson) on Jun 16, 2001 at 23:57 UTC |