in reply to Re: regular expressions query
in thread regular expressions query

I just tried the following:
#!/usr/local/perl $test = " foo bar"; ($var1, $var2) = ($1, $2) if ($test =~ /\s+(\S+)\s+(\S+)/); print "Var1: $var1\nVar2: $var2"; exit;

...and it grabbed the text out and printed fine, so I'm not sure what you mean when you say none of the suggestions are working for you, can you be more specific?

If you're ever lost and need directions, ask the guy on the motorcycle.