Ron Smith wrote:
> How do you print elements of an array, each on its own line, in a
> Windows' console?

This works under Cygwin:

    perl -e 'use ExtUtils::Installed; my $inst =
ExtUtils::Installed->new(); my @modules = $inst->modules(); print join
"\n", @modules'

Notes:

1.  Single quotes around the script to be evaluated; double quotes
around the newline escape.

2.  Use of join() to put a newline between each element of the array.


For some good Perl books, see this message:

    http://www.mail-archive.com/beginners@perl.org/msg99864.html


HTH,

David


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to