Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Possible unintended interpolation of @$ in string

Reply
Thread Tools

Possible unintended interpolation of @$ in string

 
 
jidanni@jidanni.org
Guest
Posts: n/a
 
      04-29-2009
Perl warns here,
$ echo o|perl -plwe 's/./@@@@$&/'
Possible unintended interpolation of @$ in string at -e line 1.
@@@&
Perhaps it should also warn here:
$ echo o|perl -plwe 's/(.)/@@@@$1/'
@@@

If so please submit a bug for me, because my address is blocked from
perl.org.
 
Reply With Quote
 
 
 
 
derykus@gmail.com
Guest
Posts: n/a
 
      04-29-2009
On Apr 28, 7:38*pm, jida...@jidanni.org wrote:
> Perl warns here,
> $ echo o|perl -plwe 's/./@@@@$&/'

^^^^^
-Mdiagnostics -plwe

> Possible unintended interpolation of @$ in string at -e line 1.
> @@@&


--
Charles DeRykus

 
Reply With Quote
 
 
 
 
smallpond
Guest
Posts: n/a
 
      04-29-2009
On Apr 28, 10:38 pm, jida...@jidanni.org wrote:
> Perl warns here,
> $ echo o|perl -plwe 's/./@@@@$&/'
> Possible unintended interpolation of @$ in string at -e line 1.
> @@@&
> Perhaps it should also warn here:
> $ echo o|perl -plwe 's/(.)/@@@@$1/'
> @@@
>
> If so please submit a bug for me, because my address is blocked from
> perl.org.


I don't know how perl could be expected to know what was intended.
@$ seems to be cromulent.

perl -we '$$[0]="That is"; $$[1]="messed up"; print join " ",@$'
That is messed up
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unintended consequence: string.sort Martin DeMello Ruby 2 07-05-2007 02:52 PM
GCC-Bug ? (Unintended "overloading") Andreas Griesmayer C Programming 20 08-02-2006 01:20 AM
Unintended inheritance Kay Schluehr Python 2 02-24-2006 04:56 PM
Possible unintended reference comparison sotec ASP .Net 1 12-30-2005 09:02 PM
Spyware and unintended consequences Governor Swill Computer Support 4 01-11-2005 07:24 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57