Hello,

 I have a wish for Perl 6. I would like if the open-funktion
 opens only a file if it doesn't exist.
 Of course, I can first test if the file exist.

  if (-e $filename)
  { print "file already exists!"; }
  else
  { open (FH, ">$filename") }

 My suggestion is to have a character for the open-mode-character that
 indicate that the file should not already exist.

 For example:

  open (FH, "?>$filename") || die "can't open $filename: $!";  

   Gerd

Reply via email to