#!/usr/bin/perl
our
$VERSION
= 0.001_000;
my
integer
$open_success
=
open
my
filehandleref
$HOWDY
,
'>'
,
'/tmp/howdy'
;
if
( not
$open_success
) {
croak
'ERROR: Failed to open file /tmp/howdy for writing, croaking'
;
}
print
{
$HOWDY
} 2 );
(
print
{
$HOWDY
} 2, 3, 4,
"\n"
);
(
print
{
$HOWDY
} 2.31 );
(
print
{
$HOWDY
} 2.31, 3.21, 4.23,
"\n"
);
(
print
{
$HOWDY
}
'howdy'
);
(
print
{
$HOWDY
}
'howdy'
,
'doody'
,
'foobar'
,
"\n"
);
(
print
{
$HOWDY
}
'howdy'
, 2.31,
'doody'
, 3.21,
'foobar'
, 4.23,
"\n"
);
my
integer
$print_success
= (
print
{
$HOWDY
} 2 );
if
( not
$print_success
) {
croak
'ERROR: Failed to write to file /tmp/howdy, croaking'
;
}
if
(not(
print
{
$HOWDY
}
'howdy'
, 2.31,
'doody'
, 3.21,
'foobar'
, 4.23,
"\n"
) )
{
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'
;
}