Juerd [EMAIL PROTECTED] writes:
Not a problem, assuming that these are named arguments as in:
open :r, $file;
open :w, $file;
open :rw, $file;
open :r :w, $file; # Hmm...
I like this approach. :a seems a probable replacement for $file
then; one imagines that :a would be
Luke Palmer [EMAIL PROTECTED] writes:
my $fh = open $filename :excl;
Can we please not name it with a random character generator? How
about something that communicates what it does in some fashion, at
least well enough to function as a mnemonic?
my $fh = open $filename :rw :noreplace;
Larry Wall [EMAIL PROTECTED] writes:
1 .. (some_big_hairy_expression)
^:by(3)
But we'd have to pay really close attention to how indenting is
done. Maybe we should just pass this suggestion on to Guido... :-)
Yes, please leave column-alignment tricks to Python. I don't even
On Tue, 13 Jul 2004, Juerd wrote:
open '', $foo;
open '', $foo;
is much harder to read than
open 'r', $foo;
open 'w', $foo;
Are you sure?!? I would tend to disagree... not that MHO is particularly
important, I guess, but just to stress the fact that it is by large a
On Thursday 15 July 2004 19:42, Michele Dondi wrote:
open '', $foo;
open '', $foo;
is much harder to read than
open 'r', $foo;
open 'w', $foo;
Are you sure?!? I would tend to disagree... not that MHO is particularly
important, I guess, but just to stress the fact
On Thu 15 Jul 2004 11:42, Michele Dondi [EMAIL PROTECTED] wrote:
On Tue, 13 Jul 2004, Juerd wrote:
open '', $foo;
open '', $foo;
is much harder to read than
open 'r', $foo;
open 'w', $foo;
Are you sure?!? I would tend to disagree...
So do I. , and are
H.Merijn Brand skribis 2004-07-15 11:57 (+0200):
1. They do not ambiguate with files named 'r', or 'w'
Not a problem, assuming that these are named arguments as in:
open :r, $file;
open :w, $file;
open :rw, $file;
open :r :w, $file; # Hmm...
2. They don't have to be
Greg Boug skribis 2004-07-15 20:01 (+1000):
open FH, |/usr/bin/foo;
I'd love to be rid of -| and |-. I always have to RTFM to know which
one is which.
open :r :p, '/usr/bin/foo'; # Or :read :pipe
open :rp, '/usr/bin/foo';# IIRC, rules also let you combine
Greg Boug writes:
I have always felt that keeping ['' and ''] the same as shell
scripting was a handy thing, ...
Using C:w and C:r would at least match what C:w and C:r do in
'Vi' ...
Smylers
--- Smylers [EMAIL PROTECTED] wrote:
Using C:w and C:r would at least match what C:w and C:r do in
'Vi' ...
That seems intuitive:
my $fh = open 'foo.txt', :w;
$fh.say Hello, world!;
$fh = open 'foo.txt', :e;# Ha, ha, just kidding!
$fh.say -EOF
If wifey shuns
Your fond
Greg Boug wrote:
I have always felt that keeping it the same as shell scripting was a handy
thing, especially when I have been teaching it to others. It also makes
the ol' perl5
open FH, |/usr/bin/foo;
make a lot more sense. Using something like
open p, /usr/bin/foo;
just
Brent 'Dax' Royal-Gordon skribis 2004-07-15 13:04 (-0700):
$in=open :r |/usr/bin/foo;
$out=open :w |/usr/bin/foo;
$both=open :rw |/usr/bin/foo;
No, thank you. Please let us not repeat the mistake of putting mode and filename/path
in one argument.
[EMAIL PROTECTED]:~/tmp/example$
Brent 'Dax' Royal-Gordon writes:
My personal preference is for:
$in=open :r |/usr/bin/foo;
The pipe would be legal on either side of the string. This would
still allow the often-useful type a pipe command at a prompt for a
file,
And it still allows for all those security holes in
On Tue, Jul 13, 2004 at 03:44:11PM -0600, John Williams wrote:
: On Tue, 13 Jul 2004, Larry Wall wrote:
: On Tue, Jul 13, 2004 at 07:24:55AM -0600, Luke Palmer wrote:
: : But in Perl 6, you don't have to specify things like that through the
: : mode string: you can specify them through named
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
[EMAIL PROTECTED] writes:
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
On Tue, 13 Jul 2004 [EMAIL PROTECTED] wrote:
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.
I rather have a much bigger wish for an open-like operator that to be
fair I would like to see
On Tue, 13 Jul 2004, Michele Dondi wrote:
I rather have a much bigger wish for an open-like operator that to be
Of course that should be function.
I'm thinking of an operator that returns a magical FH working like the
On Tue, Jul 13, 2004 at 03:41:54PM +0200, Michele Dondi wrote:
On Tue, 13 Jul 2004 [EMAIL PROTECTED] wrote:
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.
I rather have a much bigger
On Tue, 13 Jul 2004, Jonathan Scott Duff wrote:
I rather have a much bigger wish for an open-like operator that to be
fair I would like to see *also* in Perl5: nothing that one can do in well
more than one way in any case (also including creating a module that will
^
--- Larry Wall [EMAIL PROTECTED] wrote:
While that probably works, I think better style would be to use a
comma:
my $fh = open $filename, :excl;
That explicitly passes :excl to open as a term in a list rather
than relying on the magical properties of :foo to find the preceding
On Tue, Jul 13, 2004 at 10:41:32AM -0700, Austin Hastings wrote:
: --- Larry Wall [EMAIL PROTECTED] wrote:
: While that probably works, I think better style would be to use a
: comma:
:
: my $fh = open $filename, :excl;
:
: That explicitly passes :excl to open as a term in a list
Luke Palmer skribis 2004-07-13 7:24 (-0600):
But in Perl 6, you don't have to specify things like that through the
mode string: you can specify them through named parameters:
my $fh = open $filename :excl;
I was hoping we could finally get rid of mode characters, and especially
combined
On Tue, Jul 13, 2004 at 09:25:52PM +0200, Juerd wrote:
: Luke Palmer skribis 2004-07-13 7:24 (-0600):
: But in Perl 6, you don't have to specify things like that through the
: mode string: you can specify them through named parameters:
: my $fh = open $filename :excl;
:
: I was hoping we
Larry Wall skribis 2004-07-13 14:04 (-0700):
The combined form is definitely problematic in various ways, and we haven't
really redesigned open yet, since we haven't got to A29 yet. :-)
Well, open being much like IO::All::io would really make me happy.
That is:
my $fh = open 'foo.txt';
On Tue, 13 Jul 2004, Larry Wall wrote:
On Tue, Jul 13, 2004 at 07:24:55AM -0600, Luke Palmer wrote:
: But in Perl 6, you don't have to specify things like that through the
: mode string: you can specify them through named parameters:
:
: my $fh = open $filename :excl;
While that
26 matches
Mail list logo