$ perl -e ' > $var1 = q{abc~123~def}; > print join qq{\n}, split( m{~}, $var1 ), q{};' abc 123 def $