in reply to Size of @+

Just a quick side note. @+ does not interpolate inside double quotes. Printing it inside double quotes results in @+, not its contents. Printing it outside double quotes results in its contents. Feature or bug?

Replies are listed 'Best First'.
Re: Re: Size of @+
by Chmrr (Vicar) on Oct 04, 2002 at 03:26 UTC

    Bug. This is fixed between 5.6.1 and 5.8.0: Compare:

    $ perl -e '"foo" =~ /(o)/; print @+,$/' 22 $ perl -e '"foo" =~ /(o)/; print "@+",$/' @+ $ perl -v This is perl, v5.6.1 built for i686-linux

    ..to:

    $ perl -e '"foo" =~ /(o)/; print @+,$/' 22 $ perl -e '"foo" =~ /(o)/; print "@+",$/' 2 2 $ perl -v This is perl, v5.8.0 built for i386-linux-thread-multi

    perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'