in reply to Re^2: Meaning of 'use constant USAGEMSG = > ...'
in thread Meaning of 'use constant USAGEMSG = > ...'

#!/usr/bin/perl use strict; use warnings; my $c; BEGIN { $c = <<USAGE; What do you mean, too late? USAGE } use constant USAGEMSG => $c; print +USAGEMSG; __END__ What do you mean, too late?

Replies are listed 'Best First'.
Re^4: Meaning of 'use constant USAGEMSG = > ...'
by ikegami (Patriarch) on Feb 09, 2005 at 16:49 UTC

    hum, I had tested

    BEGIN { $c = <<USAGE; What do you mean, too late? USAGE use constant USAGEMSG => $c; }

    and

    BEGIN { $c = <<USAGE; What do you mean, too late? USAGE } use constant USAGEMSG => $c;

    and both gave me the same error. Maybe the file wasn't properly saved for the second test?

    Thanks for verifying; it puzzled me.