in reply to Finding a pattern in a string

What do you intend:

my $string = join '', map $chars rand @chars , 1 .. 100;

to do?


Perl is environmentally friendly - it saves trees

Replies are listed 'Best First'.
Re^2: Finding a pattern in a string
by blazar (Canon) on Oct 27, 2007 at 12:34 UTC

    I personally believe that due to the OP's failing to put his code in <code> tags, it rendered like that, but it's fairly obvious that he wrote and meant

    my $string = join '', map $chars[rand @chars], 1 .. 100;

    In doubt, check the xml source of the post.