Hi

Below is a Perl script which won't compile. My operating system is Windows XP Home and Perl version is 5.10.1.3.

#!/usr/bin/perl
# import_track.prl
use warnings;
use strict;

open (INFILE, "track.txt") or die $!;
open (OUTFILE, ">outtrack.plt") or die $!;

my $outstring;

while (<INFILE>)
   {
$outstring = (" " . substr($_,0,10) . ", " . substr($_,14,10) + ",0, " . substr($_,28,6));
   print OUTFILE "$outstring\n";
   }

close (INFILE);
close (OUTFILE);

When I attempt to compile I get the error messages:
Syntax error at import_track.pl line 11, near ")   {"
Syntax error at import_track.pl line 14, near "}"
This appears to me to be related to the "{" and "}" but I am a beginner!

I would appreciate help on this.

Thanks
Bill Casey




--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to