On Fri, 11 Oct 2002, david wrote: > Sudarshan Raghavan wrote: > > > > >> $ perl -Mstrict -wle'@+ = qw/b c d/;(my $name = q/a b c d efg@@@@/) =~ > >> s/@+//; print $name' a b c d efg > > > > When I run this on 5.8.0 it gives out a 'Modification of a read only > > attempted...' Same with 5.6.1 as well, but not the case with 5.6.0 > > which distribution of Perl you have? ActiveState? the Mac side? be specific. > your statement is far reaching. did you try what you just said? do you mean > you have to use s/\@+/xxx/ instead of just s/@+/xxx/ in 5.6.1?
No, you don't have to escape '@' in 5.6.1. > try it before you post: I did try it out before I posted. In the example you have given below, you are not trying to modify @+. Try that and you will get the fatal message on 5.6.1 too. sraghav@nt1488 ~>$ /usr/bin/perl -v This is perl, v5.6.1 built for i386-linux > > #!/usr/bin/perl -w > use strict; > use 5.6.1; > > my $i = 'abcd@@@@1234'; > $i =~ s/@+/__hahaha__/; > print "$i\n"; #-- guess what that prints > > __END__ > > prints: > > abcd__hahaha___1234 > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]