Ask a Question related to PERL Beginners, Design and Development.
-
SL_McManus #1
Possible logic issue
Hi;
What I am trying to do is to read the input file and and pull a
10 byte section of lines 4 - 6 to a variable. I would take these in
order and drop the numbers into $x, $y, & $z. I'm not sure if I have
something mislabled or my logic is incorrect. I commented out two
sections to try to isolate one variable. Any thoughts are welcomed.
Input File (6 lines long)
Initial Check file for auditing
Initial Input File TC 849
Greater than 9.99 File TC 847
Less than/equal to 9.99 File TC 2
$linecount = 6;
$lineread=0;
$value=1;
$count=0;
# start output
my @lines = ( );
open(AUDTFILE, '>'.$audtfile) || die "Unable to open $audtfile $!\n";
binmode(AUDTFILE);
for $line (@lines) {
# split it up per-line
for $linecount (split(/\r?\n/, $line)) {
# this is the line we care about
if ($linecount == 4) {
# substr($line, [col to start], [number of char's to go])
my $x = substr($line, 37, 10);
}
#else ($linecount == 5) {
# my $y = substr($line, 37, 10);
# }
#else ($linecount == 6) {
# my $z = substr($line, 37, 10);
# }
}
}
close(AUDTFILE);
SL_McManus Guest
-
Logic
I need some help. I have 2 loops. One to find a RadioButtonList in datagrid and second in Session("Answ"). I am trying to assing value from... -
ColdFusion Logic
Hello I am new to scripting. I decided to learn CF. And i have been asked to make a paint calculator, that calculates the amount of paint u need to... -
CMS logic problem
Hi All Yet again, I know this is a try it yourself, but I just want to get your feedback/comments on this. I'm creating a CMS that will allow... -
Logic Error
Hi There I am developing a small Purchase Order application and have run into a small issue I have a two tables called PODetails and POHeader... -
logic help please
Hi, I need a sprite to check where its member's position is in a large nested list (which is a combination property and linear list). Here is the...



Reply With Quote

