nysus has asked for the wisdom of the Perl Monks concerning the following question:

What does the following do?

my $ltrs = '\w'; my $gunk = '/#~:.?+=&%@!\-'; my $punc = '.:?\-'; my $any = "${ltrs}${gunk}${punc}";
I'm curious about that last line.

Replies are listed 'Best First'.
Re: Quickie code question
by yakko (Friar) on Mar 26, 2001 at 10:37 UTC
    The last line simply concatenates the previous three lines' vars together into $any. It could've also been written as
    my $any = $ltrs . $gunk . $punc;

    --
    Me spell chucker work grate. Need grandma chicken.

      Cool...thanks. Weird way of doing it.