On Sat, 11 Nov 2006 17:11:45 +0000
Nigel Peck <[EMAIL PROTECTED]> wrote:
> my ( $val1, $val2 ) = $data =~ /^([^:]+):([^:]+)$/
>       || die 'Failed to parse data';

Just use brackets around the regexp:
my ($val1, $val2) = ($data =~ //); 
die unless $val1 && $val2;

Greetings
Sebastian
-- 
VI VI VI - The editor of the beast.
- perlhacker.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to