> -----Original Message-----
> From: Andrew Savige [mailto:[EMAIL PROTECTED]]
> 
> I am interested to learn the fastest and shortest way to convert a
> textfile-like string to an array and back again (chopping newlines).
> Test program follows. Improvements (golf or speed) welcome.

# String to array:
@lines=$x=~/[^\n]/g;

# Array to string:
$x.=$_.$/for@lines;


-Christian Winter

Reply via email to