George Schlossnagle wrote:

> my $size;
> $out =~ /(\d+)/ && $size = $1;
> 
> Regular expressions are good for this sort of task.

Yes, especially as it can be written in a very natural way:

my ($size) = $out =~ /(\d+)/;

Please note that the (...) around $size are important to force list context.


Greetings,
Janek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to