in reply to Can't / won't print pipe delimiter?

Try
print join('|',@my_list);

----
I Go Back to Sleep, Now.

OGB

Replies are listed 'Best First'.
Re^2: Can't / won't print pipe delimiter?
by Marshall (Canon) on May 18, 2009 at 21:39 UTC
    Almost perfect!
    just need one final | to get output requested.
    #!/usr/bin/perl -w use strict; my @list = (3, 5, 2, 9); print join('|',@list),'|'; #prints: 3|5|2|9|
Re^2: Can't / won't print pipe delimiter?
by Anonymous Monk on May 18, 2009 at 16:51 UTC
    print join "\x7c", @my_list; # :D print join chr 124, @my_list; # :D