in reply to Re: summarize similar strings
in thread summarize similar strings

my ($Pattern, $c1, $c2) = '';
FYI the above code only initializes $Pattern to an empty string. To init all 3 vars:
my ($Pattern, $c1, $c2) = ('') x 3;

Replies are listed 'Best First'.
Re^3: summarize similar strings
by harangzsolt33 (Deacon) on Dec 28, 2019 at 21:45 UTC
    Oh, okay. Well, I only wanted to initialize the first variable there. And I was suspecting that that's what my code does. I wasn't sure though. Thank you for confirming that. I never knew I could initialize all three by doing ('') x 3. Thanks! I always learn something new!