use strict; use warnings; sub println { print((@_ ? join($,, @_) : $_))."\n"; } println "hello world"; println "goodbye world"; # output: Use of uninitialized value in join or string at foo line 4. Use of uninitialized value in join or string at foo line 4. hello worldgoodbye world
Secondly, your implementation is broken
my bad.
sub println { $\ = "\n"; @_ = ($_) unless @_; print @_; }
In reply to Re: Re: Re: println
by Anonymous Monk
in thread println
by tlhf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |