in reply to Re: split and print
in thread split and print

A little golf?
print"$_\n"for split/~/,'abc~123~def'

Replies are listed 'Best First'.
Re^3: split and print (fore!)
by ikegami (Patriarch) on Sep 04, 2009 at 20:22 UTC
    I see your
    perl -e'print"$_\n"for split/~/,"abc~123~def"' 41
    And give you
    perl -le'print for split/~/,"abc~123~def"' 37 perl -E'say for split/~/,"abc~123~def"' 34 perl -E'$_="abc~123~def";s/~/\n/g;say' 33
    I guess the following is cheating
    perl -E'say for abc,123,def' 23