programming-examples/perl/File/Print message in case of file open failure.pl
2019-11-15 12:59:38 +01:00

4 lines
114 B
Perl

open (FILEHANDLE, ">hello.txt") or die "Cannot open hello.txt";
print FILEHANDLE "Hello!";
close (FILEHANDLE);