in reply to println
Since print accepts an array of things to print, you'd think that the Perl println would provide a shortcut to adding a newline to each element of the array. :)#!/usr/bin/perl -w use strict; sub println(@) { print map{"$_\n"} @_; } println 'Foo', 'Bar'; println 'Baz';
That said, I've not really missed this shortcut (even though I have a java background), but if it was added, I might just use it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: println
by tlhf (Scribe) on Jun 07, 2002 at 19:21 UTC |