Digging deeper into this Pew study, Kalsoom Lakhani ferrets out a contradiction:

Many Muslims in Pakistan say there is a struggle between groups that want to modernize their country and Islamic fundamentalists (44 percent), and of those who see a struggle, most identify with the modernizers (61 percent). At the same time though, a solid majority of Pakistanis polled said they would favor making gender segregation in the workplace a law in the country (85 percent), as well as punishments like whippings and cutting off of hands for crimes like theft and robbery (82 percent), and stoning people who commit adultery (82 percent).

So what explains this obvious paradox between people who side with modernization but simultaneously support punishments like stoning and flogging? According to Peter Mandaville, professor of Government and Islamic Studies at George Mason University and author of Global Political Islam, this reflects "a mistaken tendency to conflate modernization with the adoption of liberal social and religious values. When many Pakistanis think of "modernizing" their country, they think primarily in terms of economic development and technology -- both of which can comfortably coexist alongside conservative religious attitudes."