summaryrefslogtreecommitdiffstats
path: root/MDK/Common/String.pm
diff options
context:
space:
mode:
Diffstat (limited to 'MDK/Common/String.pm')
-rw-r--r--MDK/Common/String.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/MDK/Common/String.pm b/MDK/Common/String.pm
index 6a4b451..2894c2b 100644
--- a/MDK/Common/String.pm
+++ b/MDK/Common/String.pm
@@ -43,6 +43,7 @@ an empty line
=item warp_text(STRING, INT)
return a list of lines which do not exceed INT characters
+(or a string in scalar context)
=item warp_text(STRING)
@@ -147,7 +148,7 @@ sub warp_text {
}
push @l, "$beg$t";
}
- @l;
+ wantarray ? @l : join("\n", @l);
}
1;