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;
In reply to A question on BEGIN{} by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |