The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

#!/usr/bin/env perl
# [[[ PREPROCESSOR ]]]
# <<< PARSE_ERROR: 'ERROR ECOPARP00' >>>
# <<< PARSE_ERROR: 'Unexpected Token: <<< NO TOKEN FOUND >>>' >>>
# [[[ HEADER ]]]
use RPerl;
use strict;
our $VERSION = 0.001_000;
# [[[ CONSTANTS ]]]
## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls) # USER DEFAULT 1: allow numeric values & print operator
## no critic qw(ProhibitConstantPragma ProhibitMagicNumbers) # USER DEFAULT 3: allow constants
use constant PI => my number $TYPED_PI = 3.141_59;
use constant PIE => my string $TYPED_PIE = 'pecan';
# [[[ OPERATIONS ]]]
my number $pi_over_2 = PI() / 2;
print 'pi / 2 = ', $pi_over_2, "\n"