while() { while (1) { last if not /(\w+)/g; print $1,"\n"; } } #### while() { my @ar= /(\w+)/g; print @ar,"\n"; }