diff --git a/src/fatpack.pl b/src/fatpack.pl index 93be3b9..48f1617 100755 --- a/src/fatpack.pl +++ b/src/fatpack.pl @@ -106,10 +106,10 @@ do local _ENV = _ENV EOF - while(my ($module, $content) = each %{$modules}) { + foreach my $module (sort keys %{$modules}) { next if ($module eq $mainmodule); - my $effcontent = $content; + my $effcontent = %{$modules}{$module}; # Strip the shebang $effcontent =~ s/^#!.*\n//g;