Sorry to post this here, but this little script has been giving me a headache for like 4 hours.
I keep getting a premature end of script headers on this file. It is chmod to 755, but still gives me the error:
I've made sure to upload it in ascii format, and removed any whitespaces, but still it doesn't work.
If it's not the script, what else could it be?
Thanks!
I keep getting a premature end of script headers on this file. It is chmod to 755, but still gives me the error:
PHP:
#!/usr/bin/perl
use strict;
open FILE, "<BF41.MS" or die "$!\n";
chomp(my @a=<FILE>) or die "$!\n";
close FILE;
my @b = ();
foreach (@a) {
$_ =~ s/"//gs;
my ($a, $b, $c, $d) = split /\|/, $_;
$a =~ s/\\/\\\\/gs; $a =~ s/'/\\'/gs;
$b =~ s/\\/\\\\/gs; $b =~ s/'/\\'/gs;
$c =~ s/\\/\\\\/gs; $c =~ s/'/\\'/gs;
$d =~ s/\\/\\\\/gs; $d =~ s/'/\\'/gs;
push @b, qq|insert into allparts (part_number, description, price, weight) values ('$a', '$b', '$c', '$d');|;
}
open FILE, ">allparts.sql" or die "$!\n";
foreach (@b) { print FILE "$_\n"; }
close FILE;
If it's not the script, what else could it be?
Thanks!