With error handling:
var file = File(__FILE__) file.open_w(\var fh, \var err) || die "Can't open #{file}: #{err}" fh.print("Hello world!") || die "Can't write to #{file}: #{$!}"
Without error handling:
File(__FILE__).open_w.print("Hello world!")
Last updated 1 year ago