Meaning of や in this sentence


> 美人だときく **や** 友藏{ともぞう}もヒロシも身を乗り出した。  
>  _When?_ they heard that she was a beautiful women both 友藏 and ヒロシ leaned
> forward.

I have no idea what the や in bold is. It seems like it ought to be とき, but
I've never seen や used to mean 'when'.




I think this や is closer to the phrase "as soon as" than "when". See the first
definition (classified as 接助 = conjunctive particle) in this link.
<http://dictionary.goo.ne.jp/jn/220994/meaning/m0u/%E3%82%84/>

And this usage of や is very literary. I have not ever heard that in
conversation.




I think this や is closer to the phrase "as soon as" than "when". See the first
definition (classified as 接助 = conjunctive particle) in this link.
<http://dictionary.goo.ne.jp/jn/220994/meaning/m0u/%E3%82%84/>

And this usage of や is very literary. I have not ever heard that in
conversation.

