Possible unintended interpolation of @$ in string

Discussion in 'Perl Misc' started by jidanni@jidanni.org, Apr 29, 2009.

  1. Guest

    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.
     
    , Apr 29, 2009
    #1
    1. Advertising

  2. Guest

    On Apr 28, 7:38 pm, wrote:
    > Perl warns here,
    > $ echo o|perl -plwe 's/./@@@@$&/'

    ^^^^^
    -Mdiagnostics -plwe

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


    --
    Charles DeRykus
     
    , Apr 29, 2009
    #2
    1. Advertising

  3. smallpond Guest

    On Apr 28, 10:38 pm, 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
     
    smallpond, Apr 29, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sotec
    Replies:
    1
    Views:
    8,189
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Dec 30, 2005
  2. Kay Schluehr

    Unintended inheritance

    Kay Schluehr, Feb 20, 2006, in forum: Python
    Replies:
    2
    Views:
    478
    Kay Schluehr
    Feb 24, 2006
  3. Andreas Griesmayer

    GCC-Bug ? (Unintended "overloading")

    Andreas Griesmayer, Jul 31, 2006, in forum: C Programming
    Replies:
    20
    Views:
    608
    Ike Naar
    Aug 2, 2006
  4. Michael Sparks

    Nested Scopes unintended behaviour ?

    Michael Sparks, Mar 17, 2010, in forum: Python
    Replies:
    4
    Views:
    288
    Terry Reedy
    Mar 18, 2010
  5. Martin DeMello

    unintended consequence: string.sort

    Martin DeMello, Jul 5, 2007, in forum: Ruby
    Replies:
    2
    Views:
    111
    Martin DeMello
    Jul 5, 2007
Loading...

Share This Page