Skip to contentSkip to conversation

Make wordwrap.pl work with perl 5.12.1

PATCH New Jan Kara 1 participant 1 message Jan 19, 2012

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/1 Make wordwrap.pl work with perl 5.12.1

For some reason wordwrap.pl doesn't work with my perl as split doesn't store its result in $@ by default. Providing array to store output of split fixes it.

---
 wordwrap.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
wordwrap.pl +2 -2
index 646bbc3..a7a6651 100644
@@ -9,8 +9,8 @@ while (<>) {
     }
     next if (/^$/);	# skip blank lines
     $linelen = 0;
-    split;
-    while (defined($word = shift @_)) {
+    @broken = split;
+    while (defined($word = shift @broken)) {
 	$word =~ s#\$\(srcdir\)/\.\./version.h#\$\(top_srcdir\)/version.h#;
 	$word =~ s#\$\(srcdir\)/.\.\/\.\./version.h#\$\(top_srcdir\)/version.h#;
 	$word =~ s#\$\(srcdir\)/.\.\/et/com_err.h#\$\(top_srcdir\)/lib/et/com_err.h#;
Signature · 1 line
1.7.1