in reply to Data length in strings

More succinctly: just use the diamond in list context:
$str = join ' ',<>;

If you just want to slurp all the lines, concatenated (you usually don't want those spaces we just added):

{ local $/; # Temporarily set $/=undef: "total slurp mode" $str = <>; # Slurp it all in one go! }
Note the use of local (not my!) to set the special variable $/.

You're still working on your computer, though! So you cannot (or should not) read huge files into memory. Reading huge files into memory is grounds for LARTing on many systems!

How large is `huge' depends on your computer; it's almost certainly well below 2GB, though!


UPDATE

Thanks to ar0n for pointing out I meant diamond not spaceship.

Replies are listed 'Best First'.
Re: Re: Data length in strings
by Hofmator (Curate) on Jul 24, 2001 at 15:38 UTC

    How large is `huge' depends on your computer; it's almost certainly well below 2GB, though!
    You have seen my computer, haven't you?

    scnr ;-)))

    -- Hofmator