From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

#!/usr/bin/perl
# [[[ PREPROCESSOR ]]]
# <<< PARSE_ERROR: 'ERROR ECOPARP00' >>>
# <<< PARSE_ERROR: 'Unexpected Token: 99' >>>
# [[[ HEADER ]]]
use RPerl;
use strict;
our $VERSION = 0.001_000;
# [[[ CRITICS ]]]
## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls) # USER DEFAULT 1: allow numeric values & print operator
# [[[ OPERATIONS ]]]
my integer $open_success = open my filehandleref $HOWDY, 99, '/tmp/howdy';
if ( not $open_success ) {
croak 'ERROR: Failed to open file /tmp/howdy for writing, croaking';
}
my integer $print_success = ( print {$HOWDY} 23, 32, 42 );
if ( not $print_success ) {
croak 'ERROR: Failed to write to file /tmp/howdy, croaking';
}
if ( not close $HOWDY ) {
croak 'ERROR: Failed to close file /tmp/howdy after writing, croaking';
}