> > How 'bout:
> >
> > $foo = 'def';
> > $bar = 'ghi';
> > $y = 'abc$foo$bar';
> > $z = eval qq{"$y"};
> >
> > Of course, for security and correctness reasons, you'd probably want
to:
> >
> > $y =~ s/\\//g;
> > $y =~ s/"!/\\"/g;
>
> Why would "\\t" not double-interpolate to a tab? Also, why w
On 4 Apr 2002, Aaron Sherman wrote:
> On Thu, 2002-04-04 at 11:09, Luke Palmer wrote:
> > On Thu, 4 Apr 2002, James Ryley wrote:
>
> > How 'bout:
> >
> > $foo = 'def';
> > $bar = 'ghi';
> > $y = 'abc$foo$bar';
> > $z = eval qq{"$y"};
> >
> > Of course, for security and correctness reasons, you
> Just some thoughts in case you assumed people would only us Perl "for
> good".
$_='opcpez/xsjuft/qzax/,kvtu/gps/hppe!'
;s&zax&fsm&&&y&b-z,/!&a-y" "&&&!-print;
At 4:22 PM -0800 4/4/02, Larry Wall wrote:
>Dan Sugalski writes:
>: At 3:11 PM -0800 4/3/02, Larry Wall wrote:
>: >Piers Cawley writes:
>: >: Jonathan Scott Duff <[EMAIL PROTECTED]> writes:
>: >:
>: >: > On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote:
>: >: >> They are assumed to be de
At 07:12 AM 4/5/2002 +1000, Damian Conway wrote:
>Melvin Smith wrote:
>More generally, it also depends whether you think of out-of-band properties as
>nouns or adjectives. For example:
>
> class Toaster is silver is shiny is hot is little {...}
>
>vs:
After rereading the example, this one
Dan Sugalski writes:
: >Strict, but doesn't really matter. Nobody sane will use anything other
: >than $^a and $^b.
:
: Well Are we allowing non-latin characters in identifiers? There
: may be potential interesting ramifications with those. Kanji
: specifically, though I don't have details
On Fri, 2002-04-05 at 09:30, Luke Palmer wrote:
> On 4 Apr 2002, Aaron Sherman wrote:
> > $z = interpolate interpolate $y;
> >
> > Then you have ultimate control.
>
> Uhm, I disagree. I think you really get ultimate control _without_
> interpolate. Some people might want to make \\t inter
> By ultimate control, I meant that if you have an interpolate command,
> you can then do whatever you want at each stage. You could do:
>
> $z = interpolate interpolate $y;
Good point. Well, we were brainstorming macros for a reason ;). But an
efficient version would be nice, I suppose.
Melvin Smith writes:
: At 07:12 AM 4/5/2002 +1000, Damian Conway wrote:
: >Melvin Smith wrote:
: >More generally, it also depends whether you think of out-of-band properties as
: >nouns or adjectives. For example:
: >
: > class Toaster is silver is shiny is hot is little {...}
: >
: >vs:
:
At a recent talk, Larry showed a line of code that was something like:
(@a; @b; @c) := (@x; @y; 1,2,3);
I'm curious about the mapping of @c to a list of constants; if I write
@c[0]++;
am I bumping the value of 1? As it happens, this used to be the case
on some old Fortrans that used lit
Larry Wall <[EMAIL PROTECTED]> writes:
> Dan Sugalski writes:
> : >Strict, but doesn't really matter. Nobody sane will use anything other
> : >than $^a and $^b.
> :
> : Well Are we allowing non-latin characters in identifiers? There
> : may be potential interesting ramifications with those
Piers Cawley writes:
: Larry Wall <[EMAIL PROTECTED]> writes:
:
: > Dan Sugalski writes:
: > : >Strict, but doesn't really matter. Nobody sane will use anything other
: > : >than $^a and $^b.
: > :
: > : Well Are we allowing non-latin characters in identifiers? There
: > : may be potential
Larry Wall <[EMAIL PROTECTED]> writes:
> Piers Cawley writes:
> : Larry Wall <[EMAIL PROTECTED]> writes:
> :
> : > Dan Sugalski writes:
> : > : >Strict, but doesn't really matter. Nobody sane will use anything other
> : > : >than $^a and $^b.
> : > :
> : > : Well Are we allowing non-latin
> At a recent talk, Larry showed a line of code that was something like:
>
>(@a; @b; @c) := (@x; @y; 1,2,3);
>
> I'm curious about the mapping of @c to a list of constants; if I write
>
>@c[0]++;
>
> am I bumping the value of 1?
No. We've learnt that lesson, at least :-)
My understan
Larry wrote:
> Yes, you can use anything with the letter or number property in
> identifiers, plus you can use ideographs. As it happens, the Kanji
> for "one" and "two" come in the right order, but don't try to extend
> that to "three".
Of course, exactly the same thing is true for the English
> You can do anything you like if you mess with the parser. Changing
> the rules for recognizing an identifier would be trivial.
Does this refer to messing with the parser... compile time (that is, when
Perl compiles, not when Perl is compiled)? Or are you actually talking
about screwing with
Does one of these items not belong?
>From Exegesis 4:
This new turbo-charged 'smart match' operator will also work on arrays, hashes and
lists:
if @array =~ $elem {...}# true if @array contains $elem
if $key =~ %hash {...} # true if %hash{$key}
if $value
So, here I am working on a Scheme interpreter in Perl 6, and I'm
trying to write it in a (for want of a better description)
'Scheme-like' fashion with lots of recursion.
The trouble is, unless Perl6 is going to be guaranteed to do
optimization of tail calls, this is going to lead to horribly slo
On Fri, 5 Apr 2002 [EMAIL PROTECTED] wrote:
> Does one of these items not belong?
>
> >From Exegesis 4:
>
> This new turbo-charged 'smart match' operator will also work on arrays, hashes and
>lists:
>
>
> if @array =~ $elem {...}# true if @array contains $elem
>
> if $ke
Piers Cawley writes:
: So, here I am working on a Scheme interpreter in Perl 6, and I'm
: trying to write it in a (for want of a better description)
: 'Scheme-like' fashion with lots of recursion.
:
: The trouble is, unless Perl6 is going to be guaranteed to do
: optimization of tail calls, this
Luke Palmer writes:
: > You can do anything you like if you mess with the parser. Changing
: > the rules for recognizing an identifier would be trivial.
:
: Does this refer to messing with the parser... compile time (that is, when
: Perl compiles, not when Perl is compiled)? Or are you actually
I just read Exegesis 4, and I have a few questions about private
variables. First, is it possible to have 2 private variables of the same
name in different functions? For instance, what would happen in the
following code?
sub func1() {
our $varname is private \\= 1;
return $varname
Joe Gottman wrote:
>
>I just read Exegesis 4, and I have a few questions about private
> variables. First, is it possible to have 2 private variables of the same
> name in different functions?
No. At least, not in different functions belonging to the same
namespace (i.e. module, class, or p
Damian Conway <[EMAIL PROTECTED]> writes:
> Joe Gottman wrote:
>> For instance, what would happen in the
>> following code?
>>
>> sub func1() {
>> our $varname is private \\= 1;
>> return $varname;
>> }
>>
>> sub func2() {
>> our $varname is private \\= 2;
>
> Fatal error: "Private v
24 matches
Mail list logo