ios - Getting syntax error in perl script -


i trying run script see in answer:

best way add license section ios settings bundle

and getting syntax error in xcode.

missing right curly or square bracket @ ./acknowledgements.pl line 57, @ end of line syntax error @ ./acknowledgements.pl line 57, @ eof execution of ./acknowledgements.pl aborted due compilation errors. command /bin/sh failed exit code 255 

not sure why happening.

here script machine:

#!/usr/bin/perl -w  use strict;  $out = "../settings.bundle/en.lproj/acknowledgements.strings"; $plistout =  "../settings.bundle/acknowledgements.plist";  unlink $out;  open(my $outfh, '>', $out) or die $!; open(my $plistfh, '>', $plistout) or die $!;  print $plistfh <<'eod'; <?xml version="1.0" encoding="utf-8"?> <!doctype plist public "-//apple//dtd plist 1.0//en" "http://www.apple.com/dtds/propertylist-1.0.dtd"> <plist version="1.0"> <dict> <key>stringstable</key> <string>acknowledgements</string> <key>preferencespecifiers</key> <array> eod  $i (sort glob("*.license")){      $value=`cat $i`;     $value =~ s/\r//g;     $value =~ s/\n/\r/g;     $value =~ s/[ \t]+\r/\r/g;     $value =~ s/\"/\'/g;     $key=$i;     $key =~ s/\.license$//;      $cnt = 1;     $keynum = $key;     $str (split /\r\r/, $value){          print $plistfh <<"eod";         <dict>         <key>type</key>         <string>psgroupspecifier</string>         <key>footertext</key>         <string>$keynum</string>         </dict>         eod          print $outfh "\"$keynum\" = \"$str\";\n";         $keynum = $key.(++$cnt);      } }  print $plistfh <<'eod'; </array> </dict> </plist> eod close($outfh); close($plistfh); 

i believe heredoc terminator (eod) cannot preceded whitespace. remove indentation , try again.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -