question

DBSMITH_at_OhioHealth.com
Date: 08/04/04


To: beginners@perl.org
Date: Wed, 4 Aug 2004 17:49:04 -0400

Is the last unless statement saying "break out of the loop only when @a is
read completely through?
I also have a formatting question. The output is printing a ' after a
newline and I have played with the code by moving "print $tick in and
outside the loop, but cannot get it to work. Here is what I mean:

        -w 'barcode=E01497 or barcode=E01496 or barcode=E01332 or
barcode=E00405
        'edm01:/usr/local/bin/perld>>

I would like to have the tick right after the last element E string

#!/usr/local/bin/perl -w
use strict;
open (FH,"/usr/local/bin/perld/derektapes") or die "cannot open FH: $!
\n";
my $w_param="-w ";
my $tick="'";
my $b_param="barcode=";
my $or_string=" or ";
chomp ( my @a = <FH>);

# $a[$i]=$_;
# $i++;
# print map {$_, "\n"} @a;

        print $w_param, $tick;
        while (@a) {
        my @output = ();
                for ( 1..4 ) {
                        push @output, $b_param . shift @a;
                        last unless @a;
                }
        print join ($or_string, @output),"\n";
        }
print $tick;

thank you,
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams



Relevant Pages

  • Re: question about thread scheduling
    ... I doubt you will need to mess with the system tick to get what ... I will try what you suggested, the reason that I didn't use the sleep ... If the NN run in a different thread as the control loop ... Sleepputs your thread to sleep for 3 timer ticks and ...
    (microsoft.public.windowsce.platbuilder)
  • Re: question about thread scheduling
    ... whatsoever to tamper with the timer tick. ... If the NN run in a different thread as the control loop ... least* 3 ms and because Sleep is synchonized on timer ticks, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: question about thread scheduling
    ... In essential, it is a control problem, and I must send a voltage to the ... You have put this loop in a high-priority thread started by the XXX_Init ... You during a portion of this slice and reenter ... means the time remaining in the current tick + 3 ms. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: question about thread scheduling
    ... write them over KITL, since heavy transitions from KITL to application make ... You have put this loop in a high-priority thread started by the ... You are using CE 6.0 on a CEPC. ... Sleepreturns from sleeping right after the third tick and a new ...
    (microsoft.public.windowsce.platbuilder)
  • Re: question about thread scheduling
    ... Chris Tacke - Embedded MVP ... Managed Code in the Embedded World ... You have put this loop in a high-priority thread started by the ... Sleepreturns from sleeping right after the third tick and a new 1ms ...
    (microsoft.public.windowsce.platbuilder)