- or download this
syntax error at validate.pl line 29, near "() "
syntax error at validate.pl line 35, near "}"
Execution of validate.pl aborted due to compilation errors.
- or download this
#!/usr/local/bin/perl -w
...
#
# Version 0.1
#
- or download this
Variable "$log_file" is not imported at validate.pl line 25.
Variable "$spec_file" is not imported at validate.pl line 26.
...
Global symbol "$spec_line" requires explicit package name at validate.
+pl line 32.
syntax error at validate.pl line 32, near "() "
validate.pl has too many errors.
- or download this
my ($spec_file, $data_in_file, $data_out_file, $log_file, $max_errors)
+ = @ARGV;
- or download this
# Note that you don't have to put quotes "..." around $spec_file
open ($spec_file, $spec_file) or die "Can not open file $spec_file, $!
+";
- or download this
open ($log_file, ">", $log_file) or die "Can not open file $log_file,
+$!";
- or download this
my $syntax = "
syntax: $0 <specfile> <data_in> <data_out> <logfile> <max errors
+>
...
(my $data_in_file = shift) or die $syntax;
(my $data_out_file = shift) or die $syntax;
# etc...
- or download this
$i++; # Increment $i (duh!)
- or download this
foreach my $attribute (@data_in_attributes) {
if ($attribute =~ m/$spec_all_attributes[$attribute_position][1]/) { #
+ validate data attribute type by performing
...
last DATALINE if ($total_errors >= $max_errors); # terminate if too ma
+ny errors
$attribute_position++;
}
- or download this
foreach my $attribute (@data_in_attributes) {
# validate data attribute type by performing
...
last DATALINE if ($total_errors >= $max_errors);
$attribute_position++;
}