in reply to Using regex in Map function
This way, you append the line and return it as well from map().my @orig = qw(a,b c,d e,f); my $extra = 'hi'; my @new = map { $_ .= ",$extra" } @orig; print "orig: [@orig] => new: [@new]\n"; # orig: [a,b,hi c,d,hi e,f,hi] => new: [a,b,hi c,d,hi e,f,hi]
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
|
|---|