And here is the program that I am running against it. Please tell me why this is producing NO output at all."PER" "A1" "Denise Johnson" "red,orange,yellow,green,blue,purple" 09/25/2001 "PER" "A2" "Suzanne Summers" "blue,green,yellow,blue-green" 07/24/1995 "EMP" "A1" "X & Y Bank" "Teller" 05/17/1994 "Brian's Point" "WI" 54997 24000 +.00 "EMP" "A2" "Acme Corp" "Computer Programmer" 07/24/1997 "Maxwell" "WI" 53224 + 45000.00 "EOS"
I keep going over this and over this and over this, but cannot figure it out. I am hoping it is easy, but i don't know. Please help me as I am at a high level of frustration and groveling here. peace, LOVE and ((code)) basicdez#!/usr/bin/perl-Tw use strict; use Text::ParseWords; open(DATA,"CommaSample.dat") || die "Cannot open datfile: $!\n"; my @data; my $i = 0; my $new_record = 0; while (<DATA>) { chomp; last if /^"EOS"$/; { @data = "ewords('\s+', 0, $_); } if (/^PER\s*$/) { @data = "ewords('\s+', 0, $_); my @colors=split(/,/, $data[2]); print "Entity = $data[0]\n"; print "Name = $data[1]\n"; for (@colors) { # print each color print "Color = $_ \n"; } print "Date = $data[3]\n"; @data = "ewords ('\s+', 0, $_); } elsif (/^EMP\s*$/) { @data = "ewords('\s+', 0, $_); print "Entity = $data[0]\n"; print "Employment = $data[1]\n"; print "Job Title = $data[2]\n"; print "Hire Date = $data[3]\n"; print "Location = $data[4], $data[5] $data[6]\n"; print "Salary = $data[7]\n"; } }
In reply to Why NO output??? by basicdez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |