in reply to Read the lines until a string exists in the array
until it finds the string in an array.
Which string into which array? In general, for finding a string in an array, you use grep.
BTW, your usage of @metadata looks odd. You are creating a local array at the end of a block, inside a function call????? So the whole push is meaningless. You are just creating an array, pushing something in it, and let the array disappear immediately.
UPDATE: Question for more experienced monks than I am: If I have my @NAME as parameter to the function, is the lifetime of @NAME only until the function ends, or is it until the end of the enclosing block?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read the lines until a string exists in the array
by Anonymous Monk on Aug 14, 2009 at 08:20 UTC | |
by rovf (Priest) on Aug 14, 2009 at 09:21 UTC | |
by Anonymous Monk on Aug 14, 2009 at 09:27 UTC | |
by rovf (Priest) on Aug 14, 2009 at 09:47 UTC | |
by Anonymous Monk on Aug 14, 2009 at 17:29 UTC | |
|