Jürgen Exner <> wrote in comp.lang.perl.misc:
> wrote:
> > I am a newer for PERL. I want to concat two strings into one string,
> > like this,
> >
> > $stringA='This is ';
> > $stringB='A concat example!';
> >
> > I want to $stingC to be this: $stringC="This is A concat example!";
>
> Some ways to do it:
> $stringC = $stringA . $stringB;
> $stringC = "$stringA$stringB";
> $stringC = join('', ($stringA, $stringB));
>
> I'm sure there are more.
$stringC = '';
substr( $stringC, length $stringC, 0, $_) for $stringA, $stringB;
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.