Thanx for your suggestion.But I found that it was not due to leading white space in ' protmethod'.It was due to I am using mech->submit().I have to use mech->click().Now I am getting the required output.