in reply to Re^3: Looking for function similer to member() in SKILL
in thread Looking for function similer to member() in SKILL
Now on to specific problems with your code. The next unless /@arr[$index]/ should be using the $ sigil as you are talking about a single element. In fact, this line makes little sense anyway as you are checking to see if the line matches your array, and then you are checking it again by matching using a regex. There is no need to match twice. Of course, this won't work for a couple of reasons - the first is that you are not chomping the line so it will never match because of a newline at the end. The second is that you aren't even reading the file - your while () { ... } should really be while ( <IN> ) { ... }.
There are more problems but I think you need to take a step back. Try starting out with the smallest piece of working code you can imagine and build on it checking the result each time. The first time it doesn't do what you expect, look there for the problem. For instance - start out reading a file and printing the contents.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Looking for function similer to member() in SKILL
by Anonymous Monk on Jun 27, 2005 at 14:27 UTC | |
by Limbic~Region (Chancellor) on Jun 27, 2005 at 14:31 UTC |