in reply to Re: split and print
in thread split and print
print join("\n",split(/\~/,$var1))."\n";
Rather than concatenating a newline why not place an empty string at the end of the things to be joined.
$ perl -e ' > $var1 = q{abc~123~def}; > print join qq{\n}, split( m{~}, $var1 ), q{};' abc 123 def $
I hope this is of interest.
Cheers,
JohnGG
|
|---|