in reply to Re^3: Array got modified!
in thread Array got modified!
I add up this code :
Is this work out properly by accident? This is what I want though...@x = qw/Foo Bar Blaz/; #@x = qw//; print "Before: @x$/"; while ( my $ele = <@x> ) { next unless $ele; print "$ele becomes "; $ele =~ s/^(.)/x$1/; print $ele . $/; } print "$/After: @x"; __END__ Then I have : Before: Foo Bar Blaz Foo becomes xFoo Bar becomes xBar Blaz becomes xBlaz After: Foo Bar Blaz
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Array got modified!
by Anonymous Monk on Oct 10, 2011 at 13:00 UTC | |
by exilepanda (Friar) on Oct 10, 2011 at 13:19 UTC | |
by Anonymous Monk on Oct 10, 2011 at 13:21 UTC | |
Re^5: Array got modified!
by choroba (Cardinal) on Oct 10, 2011 at 13:44 UTC | |
by exilepanda (Friar) on Oct 10, 2011 at 16:03 UTC |