Firstly, I don't see how my implementation is broken in anyway
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 @_;
}
|