in reply to Read Text line by line & modify with a delimiter

please use <code>tags for your examples

I think you want(?) this:

open my $fh,"<","textfile"; my @lines = <$fh>; close $fh; print join "|", @lines;

untested!

Cheers Rolf

Replies are listed 'Best First'.
Re^2: Read Text line by line & modify with a delimiter
by Anonymous Monk on Dec 21, 2012 at 04:25 UTC

    Thx, but what can we do if the name contains a leading space or trailing space and I want to delete those spaces?

    Thx for your help.

Re^2: Read Text line by line & modify with a delimiter
by Anonymous Monk on Dec 21, 2012 at 00:01 UTC
    thx for doing my homework! :)