Would you suggest which one is better, or any well suggested practice?@arr = qw/Foo Bar Blaz/; foreach ( @arr ) { my $ele = $_; $ele =~ s/^(.)/x$1/; } # or this while ( my $ele = <@arr> ) { $ele =~ s/^(.)/x$1/; } print "@arr"; # still 'Foo Bar Blaz'
In reply to Re^2: Array got modified!
by exilepanda
in thread Array got modified!
by exilepanda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |