Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion enhanced open-funktion
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Unknown Sender  
View profile  
 More options Jul 13 2004, 5:06 am
Newsgroups: perl.perl6.language
From: bo...@nntp.perl.org (Unknown Sender)
Date: Tue, 13 July 2004 02:06:38 -0700
Local: Tues, Jul 13 2004 5:06 am
Subject: enhanced open-funktion

   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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.