in reply to Selenium waitForXXXX in Perl

So, how can use these wait for commnads in one line in perl?

Put that code in a sub.