On Wed, 29 Jan 2003, Dave Cross wrote:

> And that can be simplified to
>
> my @array = $input =~ /(..)/g;

And that can be simplified in turn to

my $output = join '-', $input =~ /(..)/g;

As operators can give each other list context, which is a whole other
conversation (one that's in Chapter 3.8 of Learning Perl 3rd Edition.)

Mark.

-- 
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, [EMAIL PROTECTED], http://twoshortplanks.com/};

Reply via email to