[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] Hans -script for dissapearing data, some errors
****** message to minivend-users from "Michael Schwartz" <michael@panamacom.com> ******
Hi Hans,
This is the script as I typed it, following your email, it has one
error.....maybe you can help me out, again :-)
#!/usr/bin/perl -w
#Analog File
$file1 = "/home/www/test.html";
#New file
$out ="/home/gandalf/test3.asc";
$i = 0;
open(IN, $in) || die "can´t open $in: $!";
open(OUT, ">$out") || die "can´t open $out: $!";
while(defined($line = <IN>) {
$out = $i."\t".$line;
$i++
print OUT $out;
}
close(IN)
close(OUT)
-----snipp analog2mv.pl-------
This is the error:
syntax error at analog2mv.pl line 15, near "$i"
Execution of analog2mv.pl aborted due to compilation errors.
Thanks !!!!!!!!!!!!!!
----- Original Message -----
From: Hans-Joachim Leidinger <jojo@buchonline.net>
To: <minivend-users@minivend.com>
Sent: Saturday, January 29, 2000 3:43 PM
Subject: Re: [mv] dissapearing data if repeated codes are used; how can i
call the data?
> ****** message to minivend-users from Hans-Joachim Leidinger
<jojo@buchonline.net> ******
>
> You can use any editor, which can handle table. For example Excel,
> Access, Word, etc...
> Import the analog.file into a table. Insert a new column and autofill in
> with a number. Remove the old column "code".
>
> If you use UNIX (crontab=UNIX?). Unix has perl and this is standard.
> Otherwise you are not able to use Minivend.
> I will try to fit Christians perl script for you:
>
>
> -----snipp analog2mv.pl-------
> # if "!/usr/bin/perl is not right, go to minivend root and
> # look into bin/minivend at the top of this file. Copy the
> # line, which looks similar like "#!......perl" and paste
> # this line here ....
> #!/usr/bin/perl -w
>
> # where is the analog.file? PLEASE EDIT THIS!
> $file1 = "/yourroot/youranotherroot/analogroot/the-analog.file";
>
> # where is the new analog.file for minivend? PLEASE EDIT THIS!
> $out =
> "/minivendroot/yourcatalogroot/yourcatalogname/products/products.asc";
>
> $i = 0;
> open(IN, $in) || die "can´t open $in: $!";
> open(OUT, ">$out") || die "can´t open $out: $!";
>
> while(defined($line = <IN>) )
> $out = $i."\t".$line;
> $i++
> print OUT $out;
> }
> close(IN)
> close(OUT)
> -----snipp analog2mv.pl-------
>
> You can use this with this command "perl analog2mv.pl"
>
> Regards,
>
> Joachim
>
>
> Michael Schwartz wrote:
> >
> > ****** message to minivend-users from "Michael Schwartz"
<michael@panamacom.com> ******
> >
> > Ok, i think something like this is what i need....i dont have a perl
program
> > to do this and i dont know how to write it....so im screwed...
> > the table wont be used for shopcart....ill try changing analog's
ouput......
> > if anyone has a suggestions, feel free....
> >
> > ----- Original Message -----
> > From: Christian J. Müller <cmueller@polinet.ch>
> > To: <minivend-users@minivend.com>
> > Sent: Saturday, January 29, 2000 9:22 AM
> > Subject: Re: [mv] dissapearing data if repeated codes are used; how can
i
> > call the data?
> >
> > > ****** message to minivend-users from "Christian J.
> > =?iso-8859-1?Q?M=FCller?=" <cmueller@polinet.ch> ******
> > >
> > > You could run your file through a perl program that adds a first
column
> > > that auto-increments.
> > > Something like:
> > > $i = 0;
> > > open(IN, analog.file)
> > > open(OUT, new.file)
> > > print OUT all\tfiled\tnames
> > > while $line = <IN> {
> > > $out = $i."\t".$line;
> > > $i++
> > > print OUT $out;
> > > }
> > > close(IN)
> > > close(OUT)
> > >
> > > This code will not work! However, it shows the principle.
> > > Chris
> > >
>
>
>
>
> --
> -------------Hans-Joachim Leidinger---------------------
>
>
> -
> To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
>
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list