in reply to Re: uninitialized value error
in thread uninitialized value error

Hi all,
Thanks for all ur responses
First I would like to explain what is this script all about.
The arguments passed are file_name and Search phrases (for eg: reject:, total rejected recors:, total rejected rows:, and so on...)

The number of arguments passed may vary... But the first argument is always the file_name.

first it will check for phrase 1 and then from that line number phrase 2 and then phrase 3 and return phrase 3 value .

that is why the order in which we search is very important...

lets say we have 4 arguments including file name...

if (phrase 1 exists) ---------- if (phrase 1 doesnt exists)

from that line number ----------- search for phrase 2

search for phrase 2 ---------- if (phrase 2 also doesnt exists)
from that line number ---------- search for phrase 2 and return phrase 3

even if last phrase was present before, we shud ignore it and follow the order in which the phrases are passed as arguments.... and return the last phrase's value (ie., 45)


if the last phrase was not found in that file then it should print -1 and exit


if the last phrase is given twice, it shud return the last found value in that given order.

and one more last thing, this script works only for returning the value which is at the end of the line..
but doesnt return the value which is at the beginning of the line.
for eg:
total rejected rows: 90
it returns 90 or whatever value it is
but not
50 rows rejected
that it doesnt return 50
thanks,
Mercury.