[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] problem with perl
ACC&S wrote:
> some shocking code;
Any time your trying to write some perl stuff for minivend/interchange try
seeing if it will work in a proper perl program first.
so If i was writing the above I would have tested it with somethng like this...
------------------------------
#!/usr/bin/perl -w
use strict;
my %Scratch ;
$Scratch->{var1}= 2;
$Scratch->{var2}= 3;
print test();
sub test{
$_= $Scratch->{var1} * $Scratch->{var2};
return $_;
}
----------------------------
Save it in a file say test.pl and run it with "perl -c test.pl && perl test.pl"
and look at the debug info.
Once your sub routine is working at is a good bet that the algorithm will work
in minivend.
--
____
\__/ Murray Gibbins murray@scotweb.ltd.uk
/ \ Programmer
_ \__/ _ ================================================
\\ || // Scotweb Limited, info@scotweb.ltd.uk
\\||// 13a Albert Terrace, http://www.scotweb.ltd.uk
\||/ Edinburgh EH10 5EA Tel: +44 (0) 131 270 82 33
|| Scotland. Europe. Fax: +44 (0) 7020 93 49 04
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users