my $WanIpFileName = 'foo';
my &FileExists = *.IO.e;
if FileExists( $WanIpFileName ) { die 'file exists' }
if not FileExists( $WanIpFileName ) { say 'file does not exist' }
if not FileExists( $WanIpFileName ) {
$WanIpFileName.IO.open(:w);
spurt "$WanIpFileName", "New File Opened";
}
#if not FileExists( $WanIpFileName ) {
# my $handle = open :w, $WanIpFileName;
# $handle.spurt: "New File Opened";
#}
say slurp $WanIpFileName; # New File Opened
say $*DISTRO; # linux (gnulinux)