in reply to regex question

"If" doesn't loop, so when the test returns true, it prints $1. You'll need to replace the if with a looping construct or (my preference) use the regex in list context:

@text = ( $text =~ /([a-zA-Z0-9]+\s+[z]{15}\s+[a-z0-9]+)/g) if(@text){ print "first: " . shift(@text) . "\n" if (@text); print "second: " . shift(@text) . "\n" if (@text); } else{ print "Search failed\n"; }

emc

Login incorrect.
Only perfect spellers may
enter this system.

Jason Axley