Patricia E Gorden-Ozgul wrote:
>
> List,
>
> I got an answer elsewhere and thought I'd share it -
>
> my $newdata = 1;
> my $counter = 0;
> while(<DATA>) {
> chomp;
> my @data = split('\|');
> if($newdata) {
> $newdata = 0;
> if($data[7] == 1) {
> $counter = 1;
> } elsif($data[7] == 2) {
> $counter = 2;
> } elsif($data[7] == 3) {
> $counter = 3;
> }
Why the if, elsif structure? Why not just:
$counter = $data[7];
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]