At 6:48 PM +0200 4/8/02, Louis Pouzin wrote:
>Hi listers,
>
>I want to read several text files into a single string.
>
>use strict;
>@ARGV=('fil1','fil2','fil3');
>my $fil = do{local $/; <>};
>print $fil;
>__END__
>
>This prints only the contents of fil1.

   The <> operator reads to the newline.  You have made a local of $/, 
but haven't changed the value.  You probably want to undef it.

>I may misunderstand "concatenation", as I read <> should do.
>What construct would yield a single string ?

   So undef $/.  Then you have newlines in the string.

-Andrew
-- 

Reply via email to