in reply to Help Me!
A for loop over the "words" is not going to do it for you. The array name should be words btw (there's probably more than one of them)! You can access individual words using their index (starting at 0) as $words[0] (for the ID) so you could print out the id using:
print "ID: $words[0]\n";
for example. You ought to be able to take it from there.
Out of curiosity, how did you get to the code you have already? There are some good things about it, and a couple of less good things. Using strictures is excellent. But you should be using the three parameter version of open and lexical file handles:
open my $inFile, '<', $filename or die "Can't open $filename: $!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help Me!
by ajbrewe (Novice) on Apr 10, 2011 at 01:50 UTC | |
by GrandFather (Saint) on Apr 10, 2011 at 02:00 UTC | |
|
Re^2: Help Me!
by JavaFan (Canon) on Apr 10, 2011 at 05:57 UTC |