Okay, I think I understand how we're going to be mapping from an
operator to a function name in most cases. But what about the ternary
operator?
operator:??::
Or something else. I'm assuming something else, because there may be
cases in which we want to define our own ternary operators. (Wei
Excuse me for dropping this into the discussion, but
this reminds me a proposal made (by me;-) in p5p last month :
define a new prototype (") that allows to define quotelike
functions. Example :
sub rot13 (") {
my $s = shift; $s =~ tr/A-Za-z/N-ZM-An-zm-A/; return $s;
}
print ro
On Tue, Oct 16, 2001 at 08:31:31PM -0700, David Whipp wrote:
> > Is chomp? just a bad example, or is there some utility in asking if a
> > string has already been chomped?
>
> The query is asking what the string would look like, if it were chomped.
That's a weird use of a query method. In fact,
> Is chomp? just a bad example, or is there some utility in asking if a
> string has already been chomped?
The query is asking what the string would look like, if it were chomped.
Dave.
On Tue, Oct 16, 2001 at 08:53:07PM -0500, David M. Lloyd wrote:
> What about 'chomp?' for query but 'chomp' (no decoration) for operation?
Is chomp? just a bad example, or is there some utility in asking if a
string has already been chomped?
--
Michael G. Schwern <[EMAIL PROTECTED]>http
On Tue, 16 Oct 2001, David Whipp wrote:
> . I know it uses valuable characters, but adding C to
> identify a query, and C for an operation does not seem
> unreasonable.
What about 'chomp?' for query but 'chomp' (no decoration) for operation?
I think using ? on method names is kind of cute.
> Well, as discussed briefly in an earlier thread,
> http:[EMAIL PROTECTED]/msg08514.html
> if we allow ! in function names, we can distinguish between the normal
> and in-place versions of functions without proliferating the number of
> keywords.
>
> chomp! $string;
> my $chomped_string
Ask the usenet group comp.lang.perl.misc. This list is only for discussion
of the design of the upcoming Perl 6.
- Original Message -
From: "Phil Daws" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 17, 2001 1:54 AM
Subject: Berkeley Help
Hi:
I have a HASH file th
On Wed, Oct 17, 2001 at 07:56:04AM +1000, Damian Conway wrote:
>> Well, as discussed briefly in an earlier thread,
>> http:[EMAIL PROTECTED]/msg08514.html
>> if we allow ! in function names, we can distinguish between the normal
>> and in-place versions of functions without prolif
> Well, as discussed briefly in an earlier thread,
> http:[EMAIL PROTECTED]/msg08514.html
> if we allow ! in function names, we can distinguish between the normal
> and in-place versions of functions without proliferating the number of
> keywords.
>
> chomp! $string;
On Tue, Oct 16, 2001 at 12:56:16PM +0200, Bart Lateur wrote:
> Which reminds me... one of the less attractive features of here docs is
> the fact that the quoted document always has to end in a newline. That
> is annoying at times.
> If there was an easy way to chomp() that newline and return the
On Tue, Oct 16, 2001 at 09:30:44AM -0700, David Wheeler wrote:
>
> That's part of the reason that I almost never use here docs, but the
> qq{} operator, instead. No need for a closing newline.
I have not read the RFC, but I do agree that qq is the way to go for
formatted content. Or, perhaps som
On Tue, 2001-10-16 at 03:56, Bart Lateur wrote:
> Which reminds me... one of the less attractive features of here docs
is
> the fact that the quoted document always has to end in a newline. That
> is annoying at times.
That's part of the reason that I almost never use here docs, but the
qq{} ope
Hi:
I have a HASH file that contains :
domain1.co.uk ACCEPT
domain2.co.uk ACCEPT
domain3.co.uk ACCEPT
I am using the following code to check that a key exists. The problem is
that it never finds it! What am I doing wrong???
On Mon, 15 Oct 2001 20:53:24 -0400, Michael G Schwern wrote:
>Not only is it a bit faster than the s/^\s+//gm regex, but it is also
>more flexible.
>
>if( $self->feeling_snooty ) {
>print <<'POEM';
>Sometimes
>form has to follow function
>
15 matches
Mail list logo