Your message dated Fri, 22 Apr 2016 21:15:07 +0300
with message-id <[email protected]>
and subject line Re: Bug#558148: catch `[1]=' earlier
has caused the Debian Bug report #558148,
regarding catch `[1]=' earlier
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
558148: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=558148
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: perl
Version: 5.10.1-8
Severity: wishlist

This perhaps should be caught on the first line...
$ perl -we '[1]=~tr/3//;'
$ perl -we '[1]=~tr/3//d;'
Can't modify anonymous list ([]) in transliteration (tr///) at -e line 1, near 
"tr/3//d;"
Execution of -e aborted due to compilation errors.



--- End Message ---
--- Begin Message ---
On Fri, Nov 27, 2009 at 02:37:42AM +0800, [email protected] wrote:
> Package: perl
> Version: 5.10.1-8
> Severity: wishlist
> 
> This perhaps should be caught on the first line...
> $ perl -we '[1]=~tr/3//;'
> $ perl -we '[1]=~tr/3//d;'
> Can't modify anonymous list ([]) in transliteration (tr///) at -e line 1, 
> near "tr/3//d;"
> Execution of -e aborted due to compilation errors.

The first form is counting the number of '3's in '[1]'.  The left hand
side is not modified, so the construction is legal. '[1]' ends up
getting stringified to something like ARRAY(0x1aadf30).

In the second form '[1]' would actually be modified and therefore triggers
the error.

>From the tr/// documentation:

 If the "/d" modifier is used, the REPLACEMENTLIST is always interpreted
 exactly as specified. Otherwise, if the REPLACEMENTLIST is shorter
 than the SEARCHLIST, the final character is replicated till it is
 long enough. If the REPLACEMENTLIST is empty, the SEARCHLIST is
 replicated. This latter is useful for counting characters in a class
 or for squashing character sequences in a class.

I'm closing this.
-- 
Niko Tyni   [email protected]

--- End Message ---

Reply via email to