in reply to Re: RegEx needed
in thread RegEx needed

You shouldn't assign to the number variables. It won't work, and if i remember well will even raise an exception. The regex engine does it by itself, when you don't apply list context to m//g.

You can do something like
m/(\S+\s)(\S+\s)(\S+\s)(\S+\s)(\S+\s)/;

To be more along the lines of what you've tried, and $1 .. $5 will have the correct values in them. But that is redundant.

You also placed $_ in the parens for some odd reason. It attempts to find the string within itself. I think you mean

$_ =~ m//g

Anyway, best of luck.

-nuffin
zz zZ Z Z #!perl