Skip to content

Commit 72c5bca

Browse files
Scott Bakerpaulirish
authored andcommitted
Fix #114 (array shift error)
1 parent 47545cd commit 72c5bca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/header_clean/header_clean.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@
106106
}
107107

108108
sub strip_empty_first_line {
109-
my $foo = shift(); # Array passed in by reference
109+
my $array = shift(); # Array passed in by reference
110110

111111
# If the first line is just whitespace remove it
112-
if (defined($foo->[0]) && $foo->[0] =~ /^\s*$/) {
113-
shift($foo);
112+
if (defined($array->[0]) && $array->[0] =~ /^\s*$/) {
113+
shift(@$array); # Throw away the first line
114114
}
115115
}

0 commit comments

Comments
 (0)