Module: ppl/ppl Branch: master Commit: e42c3f3d8ad1a541eb102c3b4379b624e1645f9a URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=e42c3f3d8ad1a... Author: Roberto Bagnara <bagnara@cs.unipr.it> Date: Tue Feb 21 09:15:45 2012 +0100 Simplified. --- utils/text2cxxarray.in | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/utils/text2cxxarray.in b/utils/text2cxxarray.in index b79b7b5..4b2ea23 100644 --- a/utils/text2cxxarray.in +++ b/utils/text2cxxarray.in @@ -53,12 +53,8 @@ GetOptions( 'help|h' => \&usage, ) || usage(); -@lines = <>; - -my $size = 1; -foreach (@lines) { - $size = $size+1; -} +my @lines = <>; +my $size = @lines + 1; print "extern const char* const $array_name" . "[$size]";