Steve Tolkin wrote:
{ $appendline =~ s/in_marker//;
I think this needs a backslash in front of the symbol, and a space
after in_marker, i.e. it should be:
{ $appendline =~ s/in_marker/\sp/;
Isn't the replacement part of a substitution is still a string?
Having the replacement
Larry Wall wrote:
On 20 Sep 2002, Aaron Sherman wrote:
: Does that mean that I can't
:
: for $x - $_ {
: for $y - $z {
: print $_, $z\n;
: }
: }
:
: And expect to get different values?
That's correct. Name the outer
Luke Palmer wrote:
my v = $( func() );
Would provide scalar context. But then assign it to a list...
In the course of reading that I developed a concern about memory usage
when trying to find the size of arrays. As I understand it the Perl 5
syntax for discovering the number of
Tanton Gibbs wrote:
(7) == 7
why? Otherwise, we couldn't use parens for mathematical expressions
Evil But as Luke Palmer pointed about above, this syntax would make
square brackets redundant, so we could now use those unambiguously for
overriding mathematical precedence ... /Evil
(Sorry
On Fri, Sep 20, 2002 at 09:46:58PM -0600, John Williams wrote:
On Fri, 20 Sep 2002, Jonathan Scott Duff wrote:
But I cannot tell whether (7) is list context or numeric context,
Nope, you can't tell without the surrounding context:
(7) + 0;# numeric
$a = (7); #
On Sat, 21 Sep 2002, Jonathan Scott Duff wrote:
I can't tell whether (7).length is asking for the length
of 7 or the length of a list, but I would be badly surprised if
(3+4).pow(2) returned 1 instead of 49.
So, you expect 7.pow(2) to work? I'd expect it to be an error (this
isn't
On Sat, Sep 21, 2002 at 10:05:50AM -, Smylers wrote:
Larry Wall wrote:
On 20 Sep 2002, Aaron Sherman wrote:
: Does that mean that I can't
:
: for $x - $_ {
: for $y - $z {
: print $_, $z\n;
: }
: }
:
: And
On Sat, Sep 21, 2002 at 11:36:49AM -0600, John Williams wrote:
On Sat, 21 Sep 2002, Jonathan Scott Duff wrote:
I can't tell whether (7).length is asking for the length
of 7 or the length of a list, but I would be badly surprised if
(3+4).pow(2) returned 1 instead of 49.
So, you
On Mon, Sep 16, 2002 at 10:32:17AM +0300, Markus Laire wrote:
On 15 Sep 2002 at 22:41, Steve Fink wrote:
Your code seems to backtrack to the beginning at every failure. First
code only backtracks one char at time.
Huh? What implementation is that? I think my naive implementation
gives
On 21 Sep 2002, Smylers wrote:
Larry Wall wrote:
On 20 Sep 2002, Aaron Sherman wrote:
: Does that mean that I can't
:
: for $x - $_ {
: for $y - $z {
: print $_, $z\n;
: }
: }
:
: And expect to get different
On 21 Sep 2002, Smylers wrote:
Luke Palmer wrote:
my v = $( func() );
Would provide scalar context. But then assign it to a list...
In the course of reading that I developed a concern about memory usage
when trying to find the size of arrays. As I understand it the Perl 5
On Wed, Sep 18, 2002 at 05:01:35PM +0200, Damian Conway wrote:
Steve Fink wrote:
What possible outputs are legal for this:
aaa =~ /( a { print 1 } | a { print 2 })* { print \n } x/
Unless Larry specifies a required semantics, there are potentially very
many acceptable outputs from
On Sat, Sep 21, 2002 at 11:36:49AM -0600, John Williams wrote:
On Sat, 21 Sep 2002, Jonathan Scott Duff wrote:
Anyway, (7) or (3+4) should yield a number, not a list, because
otherwise every math expression will break.
Why can't perl be smart enough to figure out what we mean?
On Sun, 22 Sep 2002, Markus Laire wrote:
On Sat, Sep 21, 2002 at 11:36:49AM -0600, John Williams wrote:
On Sat, 21 Sep 2002, Jonathan Scott Duff wrote:
Anyway, (7) or (3+4) should yield a number, not a list, because
otherwise every math expression will break.
Why can't perl
Luke Palmer wrote:
On Sun, 22 Sep 2002, Markus Laire wrote:
You know, the idea that square brackets are the only things that can make
lists is starting to really appeal to me. Similar for squiggles and
snip
So parens really do provide grouping, not list constructing. Thus, this
can stay:
15 matches
Mail list logo