Converting multi-line string to array

前端 未结 5 1297
醉话见心
醉话见心 2020-12-07 00:17

How do I convert a multiline string to array?

my $text= \" ads da
sda
s 
da
d
as

das
d a as dasd
\\n

\";

Note : I dont want to re

5条回答
  •  清歌不尽
    2020-12-07 00:57

    As it stands, the question could be worded more clearly.

    my @text = split "\n", $text;
    

提交回复
热议问题