Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Too late for -CSD

Tags:

perl

Trying to run this little perl program from parsCit:

parsCit-client.pl e1.txt Too late for -CSD option at [filename] line 1

e1.txt is here: http://dl.dropbox.com/u/10557283/parserProj/e1.txt

I'm running the program from win7 cmd, not Cygwin.

filename is parsCit-client.pl - entire program is here:

#!/usr/bin/perl -CSD
#
# Simple SOAP client for the ParsCit web service.
#
# Isaac Councill, 07/24/07
#
use strict;
use encoding 'utf8';
use utf8;
use SOAP::Lite +trace=>'debug';
use MIME::Base64;
use FindBin;

my $textFile = $ARGV[0];
my $repositoryID = $ARGV[1];

if (!defined $textFile || !defined $repositoryID) {
    print "Usage: $0 textFile repositoryID\n".
    "Specify \"LOCAL\" as repository if using local file system.\n";
    exit;
}

my $wsdl = "$FindBin::Bin/../wsdl/ParsCit.wsdl";

my $parsCitService = SOAP::Lite
    ->service("file:$wsdl")
    ->on_fault(
           sub {
           my($soap, $res) = @_;
           die ref $res ? $res->faultstring :
               $soap->transport->status;
           });

my ($citations, $citeFile, $bodyFile) =
    $parsCitService->extractCitations($textFile, $repositoryID);

#print "$citations\n";
#print "CITEFILE: $citeFile\n";
#print "BODYFILE: $bodyFile\n";
like image 379
patrick Avatar asked Mar 20 '12 02:03

patrick


People also ask

What album was Def Leppard Too Late for Love?

"Too Late for Love" is a 1983 power ballad by English band Def Leppard from their Diamond album Pyromania. When released as a single, it reached #9 on the Mainstream Rock charts.


1 Answers

From perldoc perlrun, about the -C switch:

Note: Since perl 5.10.1, if the -C option is used on the "#!" line, it must be specified on the command line as well, since the standard streams are already set up at this point in the execution of the perl interpreter. You can also use binmode() to set the encoding of an I/O stream.

Which is presumably what the compiler means by it being "too late".

In other words:

perl -CSD parsCit-client.pl 
like image 134
TLP Avatar answered Sep 19 '22 10:09

TLP