Re: enhanced open-funktion

2004-07-15 Thread Michele Dondi
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

Re: scalar subscripting

2004-07-15 Thread James Mastros
Larry Wall wrote: I suppose another approach is simply to declare that dot is always a metacharacter in double quotes, and you have to use \. for a literal dot, just as in regexen. That approach would let us interpolate things like .foo without a variable on the left. That could cause a great

Re: enhanced open-funktion

2004-07-15 Thread Greg Boug
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

Re: enhanced open-funktion

2004-07-15 Thread H.Merijn Brand
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

Re: enhanced open-funktion

2004-07-15 Thread Juerd
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

Re: push with lazy lists

2004-07-15 Thread Andrew Rodland
On Wednesday 14 July 2004 12:58 pm, Brent 'Dax' Royal-Gordon wrote: Andrew Rodland wrote: So if we have @x = [1, 3, 5, 6 .. 9, 10 .. Inf, 42]; ... 42 is just one number, so questions of indexing it are moot, but its distance from the left is Inf. So, there's no way to access the 42 by

Re: enhanced open-funktion

2004-07-15 Thread Smylers
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

Re: enhanced open-funktion

2004-07-15 Thread Austin Hastings
--- 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

Re: enhanced open-funktion

2004-07-15 Thread Brent 'Dax' Royal-Gordon
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

Re: enhanced open-funktion

2004-07-15 Thread Juerd
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$

Re: enhanced open-funktion

2004-07-15 Thread Smylers
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